-1

Problem

I have two coordinates: A B

Solution?

Can I see if coordinate A is within 50 meters of coordinate B using Google Maps API?

Other Solution?

If not, is there a way to do this without using google API?

Jamie Hutber
  • 26,790
  • 46
  • 179
  • 291

2 Answers2

2

computeDistanceBetween() from the Google Maps API v3 geometry library returns the straight line distance between two google.maps.LatLng objects (the default units are meters).

Be sure to include the geometry library

geocodezip
  • 158,664
  • 13
  • 220
  • 245
1

Each phone, amd many other geo apis have a function to calculate the distance between two lat,lon coordinates.

If you dont have one, then use the haversine distance formula.

AlexWien
  • 28,470
  • 6
  • 53
  • 83