How to know if certain coordinate is in a bounding box?

Asked

Viewed 93 times

0

I have a coordinate (lat and Lon) and also a bounding box (minlon, minlat, maxlon, maxlat) and I have to find out if a certain coordinate is within the area. So far I did not find how I do, I searched the Google Maps API documentations and found nothing related.

  • Your bounding box is an object of the type LatLngBounds??

1 answer

0

Good,

I’m not sure if this is what you’re looking for, but you’ve tried it .getBounds() and .contains()?

Here’s a good one example that determines whether a particular location is within a Radius of a marker. If it finds one of the coordinates specified in the code, it returns "True".

Browser other questions tagged

You are not signed in. Login or sign up in order to post.