CodeIgniter Forums

Full Version: Check bound latlng in special bound
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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

Is it?