Hi,

I have to check does certain location(pair of coordinates) belong to a 
direction. (google maps directions api response). I've come up with idea to 
iterate through all steps of the direction response and check if the 
coordinates belong to one of the direction's steps (it's polyline), 
calculating the distance between the point and the polyline and i the 
distance is reasonable small, then the point belongs to the route.

However, there is also a performance issue with this approach because there 
are many many coordinates stored in a database and I have to figure out 
which of all coordinates from the database belong to the specified route. 
So, I think that this solution will be very time consuming for the users 
because for every coordinate in the database, I have to iterate through all 
steps from the route and calculate the distance between the step's polyline 
and the location specified by the coordinates.

Any ideas for better approach?

Thanks in advance. 


-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to google-maps-js-api-v3@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to