-1

I have a situation, where i have certain location (y) is in the database (lat and lng) now i want to search a place ( lets say x) and need to search locations nearby (x) by time or distance (like 10min or 10km also (driving or walking)) to (x).

So get all the y's near x (by time or distance).

Is there a clean or simple way to do that. Thanks :)

  • Have you tried creating a store locator? https://developers.google.com/maps/articles/phpsqlsearch_v3?csw=1 – Nicolae Olariu Mar 29 '17 at 08:12
  • Sorry, i didn't but is it necessary to create a store first.All i need is to check that the locations that is in my database are nearer to a certain point or not (like 10 min or 20 min away&&| 10 km or 20km away ). – code cralwer Mar 29 '17 at 08:28
  • Have a look at http://stackoverflow.com/a/9486727/2674883 – Nicolae Olariu Mar 29 '17 at 08:42

1 Answers1

0

Found it!! Can be done using google maps

direction api and matrix api

https://developers.google.com/maps/documentation/directions/

https://developers.google.com/maps/documentation/distance-matrix

one or more locations separated by the pipe character (|), in the form of an address, latitude/longitude coordinates, or a place ID: