-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Labels
Description
Thank you for this library.
Not sure if it's possible, but can this library be used to check if a location is within specific bounds? Something like this:
function latLng($arr) {
return new Biscolab\GoogleMaps\Object\LatLng([
Biscolab\GoogleMaps\Fields\LatLngFields::LAT => $arr['lat'],
Biscolab\GoogleMaps\Fields\LatLngFields::LNG => $arr['lng']
]);
}
$bounds = new Biscolab\GoogleMaps\Object\LatLngBounds();
$bounds->extend(latLng([
"lat" => 132334323,
"lng" => 112143432
]));
$place = latLng([
"lat" => 133434323
"lng" => 5352523
]);
print_r($bounds->getCenter());
print_r($bounds->contains($place));