I’m looking at implementing a PHP based application, where by you have a certain route for example London to Edinburgh. Along this route, I want to calculate say a 10mi Radius or Polygon around the whole route/driving directions, check whether certain defined points/lat-lon’s are within this radius. If so – Add them to the waypoint list, re-calculate the route and re-generate the driving directions.
I know there’s various different API’s for Google Maps, but I’m basically looking for some advice on which API’s I should be looking through. I believe the phrase I’m looking for is ‘Geofencing’, and for that I’ve seen the Google Tracks API has methods incorporating that (https://developers.google.com/maps/documentation/tracks/geofences) – But I can’t seem to work out how that would help me, or how I’d be able to use it.
Is it possible to do the lookup in an alternative method? For example, producing driving directions using 1 API call, storing all of the waypoints of this route in a MySQL DB and then using something along the lines of https://stackoverflow.com/questions/1078386/see-if-lat-long-falls-within-a-polygon-using-mysql? to see if each point is within the polygon/geofenced route?
2