How to create route between 2 points using flutter_map package

Issue

I display a map using flutter_map package and mapbox but how can I make a routing between 2 points?

Like leaflet routing machine can we request a route using mapbox? If so how can I achieve that? I know I can draw a polyline but I don’t know how to get the routing points.

Solution

I know this question has been inactive for a while (but it might still help). I’d like to bring attention to http://project-osrm.org/. It’s a free routing machine based on Open Street Maps.

I’m currently in the process of making a plugin for this (or a separate package with extra support for flutter_map), but I’m quite busy at the moment, so there’s no ETA.

See this comment on GitHub at https://github.com/fleaflet/flutter_map/issues/461#issuecomment-896993785

Answered By – JaffaKetchup

Answer Checked By – Candace Johnson (FlutterFixes Volunteer)

Leave a Reply

Your email address will not be published. Required fields are marked *