Welcome Guest, Not a member yet? Register   Sign In
Check bound latlng in special bound
#1

(This post was last modified: 02-03-2020, 01:49 AM by omid_student.)

Hi
I have specified bound(west,north-east-south) that need to check latlng in this bound
My code is:
PHP Code:
function inBounds($pointLat$pointLong$boundsNElat$boundsNElong$boundsSWlat$boundsSWlong) {

        
$eastBound $pointLong $boundsNElong;
        
$westBound $pointLong $boundsSWlong;

        if (
$boundsNElong $boundsSWlong) {
            
$inLong $eastBound || $westBound;
        } else {
            
$inLong $eastBound && $westBound;
        }

        
$inLat $pointLat $boundsSWlat && $pointLat $boundsNElat;

        return (boolean)
$inLat && $inLong;

    } 

But this code can only check latlng in north and south bound and not check from west to east
Do you can help me?

I think i found it
https://stackoverflow.com/questions/5065...olygon-php

Is it?
Reply




Theme © iAndrew 2016 - Forum software by © MyBB