Skip to content

Use Maplibre Navigation SDK via plugin#41

Open
karussell wants to merge 60 commits intomainfrom
navigation-plugin
Open

Use Maplibre Navigation SDK via plugin#41
karussell wants to merge 60 commits intomainfrom
navigation-plugin

Conversation

@karussell
Copy link
Copy Markdown
Collaborator

@karussell karussell commented Feb 3, 2026

This native navigation version has several advantages over the web-based solution:

  • should be less battery intense
  • feels a bit less "laggy"
  • will allow us features like screen off but still navigating via voice instructions
  • map viewed with tilt which gives a better overview
  • likely more battle tested navigation SDK (using the KMP version of the maplibre navigation SDK )
  • currently this means for the web (navi.graphhopper.org) the navigation would not work. However KMP also supports web as target so this should be solvable and for now we'd keep the navi branch running.
  • it uses the native-navigation branch of graphhopper-maps and has a lot less changes compared to master
image

Got it working within a few hours due to lots of help from claude with the maplibre integration etc. (although lack of documentation made it a real challenge for it)

Likely this will fix #31

TODOs:

  • make fake GPS optional
  • test rerouting
  • test custom_model and different profiles
  • include heading in request, i.e. force ch.disable=true
  • remove attribution for navigation
  • handle via points -> maplibre handles this (unfortunately some of the logic is not easy to use like the MapLibreRouteFetcher)
  • mile + mph support
  • show current max speed (works only with recent GraphHopper branch as distance annotations are required!)
  • arrow in the map on the route

Later:

  • navigaton for alternatives is currently disabled as this is rather tricky to implement because we submit a different request and couldn't guarantee that the selected alternative is the one in the navigation response. further more as soon as a re-routing occurs the picked alternatived might be invalidated and it might route towards the main one (issue is also present in main branch). One stable solution could be if the response for the alternative routes returns the via points that we would then being able to submit for a more stable routing experience along the alternative route.
  • "Could not connect to the Service. Try to reload!" => there should be a reload button!?
  • try snapToRoute again with info from Documentation maplibre/maplibre-navigation-android#67
  • if heading is opposite the first instruction is a uturn and is somehow not announced, just 'rerouting'. good test route.
  • zoom in for slower speed (or out for faster). already done from maplibre

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

run navigation in background

2 participants