Is there a way to create geo location search of closest points with javascript? for example, we have a list of points with their coordinates. I need to find points ~ in 5km radius.
Asked
Active
Viewed 351 times
2 Answers
1
You want the harvesine-formula for Javascript and Google Maps.

Micromega
- 12,486
- 7
- 35
- 72
-
You want to look for a space-filling-curve too. I've done an implementation in php ( hilbert-curve ). You can download it at phpclasses.org ( hilbert-curve ). – Micromega Mar 25 '11 at 11:43
0
You can use google geolocation API or Google map API

Vijay
- 5,331
- 10
- 54
- 88
-
sample? i don't need to show points on map i'm trying to create some thing like find_closest([point1, point2 ...] ) // => [point1] – OlegZ Mar 23 '11 at 13:29
-
http://stackoverflow.com/questions/407989/calculating-distance-between-zip-codes-in-php , You can get find the closest places by giving a specific zip in google maps api.. Read the google api manual completely.. – Vijay Mar 24 '11 at 04:38