views:

7

answers:

1

I try to find how to get marker inside direction that user point in Google map

Suppose that User start at point A to point B and inside my Database has marker of Shopping store how could we know that Shopping store is in direction from A to B or not if yes then show marker of store on the map

Any suggestion to do that, Thank you

A: 

Gettings locations that are en route will be hard. A better way might be to use some math to get the point that is in the middle of the 2 locations. Use that point and use the haversine formula to select locations from your table that are 1/2 the distance of the entire trip away from that point. This will get you points close to the route.

Galen