0

How can I calculate the distance between the user's current position and hundreds of addresses to only display places that are within 10km of the user using the Google Maps api?

1 Answers1

0

You may use GPS coordinate to calculate distance between two point. Once you did that, you can filter out the POI which are out of bound and only show the one within 10km.

An example of formula to calculate distance between two coordinates https://stackoverflow.com/a/365853/10691359

Pilpo
  • 1,236
  • 1
  • 7
  • 18