I am using leaflet routine machine to get a route between 2 points. I want to be able to draw an invisible polyline around the route and use this as a geofence and if the user goes out of the bounds then reload another route.

Not quite sure how to go about this and the closest thing I have found is this


Where do I start?

Most examples use googles routine machine.

| improve this question | | | | |