Hi! I am developing an app on flutter using osm flutter plugin, is there a way to get turn by turn navigation info along with time and distance remaining information ? could you please tell me where to look into in general ? asked 08 Jun '21, 18:36 Pannam |
You would either make an API call to a routing engine - observing the usage policy of that server which someone else makes available -, or compute the route on the device with a suitable library. The former is easier but makes you depend on (a) internet connection (b) goodwill of the server operator. See https://routing.openstreetmap.de/about.html for a free routing service you might use. answered 08 Jun '21, 19:07 Frederik Ramm ♦ I am already able to get the routing through the website mentioned by yourself.Apologies if my question wasn't clear but I am looking for 'turn by turn navigation'. I own a garmin watch with OSM which gives me turn by turn navigation. Pretty impressive for a watch with such low processing power and it works flawlessly offline. I am looking to do the same thing for mobile,, Could you please clarify on what do you mean by 'suitable library' and its availability?
(08 Jun '21, 20:24)
Pannam
1
There's three different problems you need to solve. One, convert OSM data into a graph structure that is suitable for handling on the device - this could potentially be done on some kind of server before the data goes onto the device. Bonus points if you can make it so that the user can load neighbouring data regions and route across them! Two, find the best route between two points in the routing graph. Three, describe this route to the user in a suitable way - graphically or verbally. None of these three points is already covered by the OMS Flutter plugin. Here are three Open Source things you might want to look at: https://wiki.openstreetmap.org/wiki/MoNav a very old but workable mobile routing engine; http://brouter.de/brouter/offline.html a currently maintained routing library for mobile; https://github.com/osmandapp/Osmand a full-fleged map display and mobile routing app. These are not the only ones of course. If you only need to make short routes, then processing OSM Data into a simple routing graph and running a hand-written Dijkstra algorithm on it isn't hard to do but it will be too slow and resource hungry for working on larger data sets.
(09 Jun '21, 00:21)
Frederik Ramm ♦
|
Pannam sorry to bother you. I noticed that you are using Garmin watch. I have tried to get OSM on my Tactix Bravo with a couple of apps without success. I like the watch it can mimic a firework display every few thousand steps which shows some ability, but i'd prefer a map. any suggestions. Thks Andy
You have to copy the maps into your watch from an external website. You could follow this https://www.dcrainmaker.com/2019/08/how-to-installing-free-maps-on-your-garmin-fenix-5-plus-forerunner-945-or-marq-series-watch.html
Thanks Pannam I'll try that. Andy