Giter VIP home page Giter VIP logo

maplibre-navigation-android's Introduction

Jitpack

Maplibre Navigation SDK for Android

The Maplibre Navigation SDK for Android is built on a fork of the Mapbox Navigation SDK v0.19 which is built on top of the Mapbox Directions API and contains the logic needed to get timed navigation instructions.

With this SDK you can implement turn-by-turn navigation in your own Android app while hosting your Map tiles and Directions API.

MapLibre Navigation Android

License

Why have we forked

  1. Mapbox decided to put a closed-source component to their navigation SDK and introduced a non-open-source license. Maplibre wants an open-source solution.
  2. Mapbox decided to put telemetry in their SDK. We couldn't turn this off without adjusting the source.
  3. We want to use the SDK without paying Mapbox for each MAU and without Mapbox API keys.

All issues are covered with this SDK.

What have we changed

  • We completely removed the UI part from the SDK so it will only contain the logic for navigation and not the visuals.
  • We upgraded the Mapbox Maps SDK for Android to MapLibre Native for Android version 9.4.0.
  • We upgraded the NavigationRoute with the possibility to add an interceptor to the request.
  • We changed the locationLayerPlugin to the location component
  • We updated the logic around the implementation of the locationEngine so it can be used with the new locationEngine from the Mapbox SDK.
  • We removed the telemetry class from the project. Nothing is being sent to Mapbox or Maplibre.

Getting Started

If you are looking to include this inside your project, you have to follow the following steps:

Gradle

Step 1. Add it to your root build.gradle at the end of repositories:

  allprojects {
    repositories {
      ...
      maven { url 'https://jitpack.io' }
    }
  }

Step 2. Add the dependency

  implementation 'com.github.maplibre:maplibre-navigation-android:3.0.0'

Maven

Step 1. Add it to your root build.gradle at the end of repositories:

  <repositories>
    <repository>
      <id>jitpack.io</id>
      <url>https://jitpack.io</url>
    </repository>
  </repositories>

Step 2. Add the dependency

  <dependency>
	    <groupId>com.github.maplibre</groupId>
	    <artifactId>maplibre-navigation-android</artifactId>
	    <version>3.0.0</version>
	</dependency>

sbt

Step 1. Add it in your build.sbt at the end of resolvers:

  resolvers += "jitpack" at "https://jitpack.io"

Step 2. Add the dependency

  libraryDependencies += "com.github.maplibre" % "maplibre-navigation-android" % "3.0.0"

leiningen

Step 1. Add it in your project.clj at the end of repositories:

  :repositories [["jitpack" "https://jitpack.io"]]

Step 2. Add the dependency

  :dependencies [[com.github.maplibre/maplibre-navigation-android "3.0.0"]]	

To run the sample code on a device or emulator, include your Mapbox access token and map tile provider URL in developer-config.xml found in the project.

Getting Help

  • Have a bug to report? Open an issue. If possible, include the version of MapLibre Services, a full log, and a project that shows the issue.
  • Have a feature request? Open an issue. Tell us what the feature should do and why you want the feature.

We've added one navigation example to this repo's test app. We are planning to add more to help you get started with the SDK and to inspire you.

In order to see the map or calculate a route you need your own Maptile and Direction services.

Contributing

We welcome feedback, translations, and code contributions! Please see CONTRIBUTING.md for details.

maplibre-navigation-android's People

Contributors

1ec5 avatar abcdan avatar archdoog avatar avalanchas avatar bertuccellimatteo avatar birkskyum avatar boldtrn avatar brammos avatar danesfeder avatar electrostat avatar ericrwolfe avatar fabi755 avatar frankkienl avatar frederoni avatar gbiervliet avatar guardiola31337 avatar ianthetechie avatar jdilshodbek avatar joshhood avatar kartikdot avatar kkaefer avatar rubenmx avatar sarahsnow1 avatar sjoerdperfors avatar skienzl avatar tallongsun avatar zugaldia avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

maplibre-navigation-android's Issues

Update route onProgress (cut trail)

Android API: 29

Maplibre Navigation SDK version : Latest

Steps to trigger behavior

I want to update route in realtime and cut the trail of the route til the user has been travelled

This is how I do it

class MapRouteProgressChangeListener(private val mapRoute: NavigationMapRoute) :
    ProgressChangeListener {
    private val executorService = Executors.newCachedThreadPool()
    private val handler = Handler(Looper.getMainLooper())
    override fun onProgressChange(location: Location, routeProgress: RouteProgress) {
        val directionsRoutes = mapRoute.retrieveDirectionsRoutes()
        val primaryRouteIndex = mapRoute.retrievePrimaryRouteIndex()
        if (!executorService.isShutdown) {
            executorService.execute {
                val newRoute = getNewRoute(routeProgress, location)
                handler.postDelayed({
                    addNewRoute(newRoute, directionsRoutes, primaryRouteIndex)
                    mapRoute.addUpcomingManeuverArrow(routeProgress)
                }, 1350)
            }
        }else {
            mapRoute.removeRoute()
        }
    }

    /**
     * this must be removed on exit button call
     */
    fun removeHandler() {
        handler.removeCallbacksAndMessages(null)
        executorService.shutdown()
    }

    private fun addNewRoute(
        currentRoute: DirectionsRoute?, directionsRoutes: List<DirectionsRoute>,
        primaryRouteIndex: Int
    ) {
        if (isANewRoute(currentRoute, directionsRoutes, primaryRouteIndex)) {
            mapRoute.addRoute(currentRoute)
        }
    }

    private fun getNewRoute(progress: RouteProgress, loc: Location): DirectionsRoute {
        val step = progress.currentLegProgress().currentStep()
        if (step.geometry() == null) {
            return progress.directionsRoute()
        }
        val start = Point.fromLngLat(loc.longitude, loc.latitude)
        val points = PolylineUtils.decode(step.geometry()!!, 5)
        val end = points.last()
        if (start.latitude() == end.latitude() && start.longitude() == end.longitude()) {
            return progress.directionsRoute()
        }
        step.geometry()?.let {
            val newGeoMetre = getSlicedLine(it, start, end)
            val polyline = progress.directionsRoute()
            val newStep = polyline.legs()?.get(progress.legIndex())?.steps()?.get(
                progress.currentLegProgress()
                    .stepIndex()
            )?.toBuilder()?.geometry(newGeoMetre)?.build()
            val newRoute = updatePolyLine(polyline, start)
            newRoute?.let { route ->
                route.legs()?.get(progress.legIndex())?.steps()?.set(
                    progress.currentLegProgress().stepIndex(), newStep
                )
                return newRoute
            }
        }
        return progress.directionsRoute()
    }

    private fun updatePolyLine(polyline: DirectionsRoute?, start: Point): DirectionsRoute? {
        polyline?.geometry()?.let {
            val points = PolylineUtils.decode(
                it, 5
            )
            val newGeoRetry = getSlicedLine(start, points)
            return polyline.toBuilder().geometry(newGeoRetry).build()
        }
        return null
    }

    private fun getSlicedLine(polyline: String, start: Point, end: Point): String {
        val points = PolylineUtils.decode(polyline, 5)
        val finalLine = TurfMisc.lineSlice(start, end, LineString.fromLngLats(points))
        return finalLine.toPolyline(5)
    }

    private fun getSlicedLine(start: Point, points: List<Point>): String {
        val finalLine =
            TurfMisc.lineSlice(start, points.last(), LineString.fromLngLats(points))
        return finalLine.toPolyline(5)
    }

    private fun isANewRoute(
        currentRoute: DirectionsRoute?, directionsRoutes: List<DirectionsRoute>,
        primaryRouteIndex: Int
    ): Boolean {
        val noRoutes = directionsRoutes.isEmpty()
        return noRoutes || currentRoute != directionsRoutes[primaryRouteIndex]
    }
}

This works but as you can see I am giving 1350 ms delay to keep this in sync with user current location marker.
This also depends on the speed of the user from which he is travelling. Sometime it does not get synced properly and current location marker move a little ahead with some lag. Can you help me how can get implement it correctly. I want it to behave as Google Maps. (remove the trail of the route respective of current user location)

route should be updated in sync with the current user location and trail should be removed irrespective of user speed.

update route is not syncing with the current user location

Mapview not displayed

Trying to use the test app, no map is shown.
I tried adding this style url in all locations: mapbox://styles/mapbox/streets-v12 and also the access token, with no luck.

Steps to trigger behavior

  1. Download the latest repo
  2. Start the test app
  3. No map is displayed on either of the 2 screens.

Wrong off route state for route snapping

While using off-route detection combined with route snapping, the off route position is always snapped.

I already looked inside the code and found the problem. Before the snapped route is calculated, the code is checking for off-route state. If location is off-route the raw location is returned. But the off route function is only return off-route state once, until we will reach again the minimumDistanceBeforeRerouting() from the latest re-route point. But we don't use a re-route logic, and have only one available route.

On OffRouteDetector.java#L132 you see, the off-route is only fired when we above the threshold again.
When this check is removed (return true) the off-route event is fired on every location update. That is good for our route snapping, but will also fire our custom off-route callback in our activity/view.

The the location puck should be showed on the red marked position.


Android API: 12 (API 31)
Maplibre Navigation SDK version: 2.0.0

Steps to trigger behavior

  1. Enable route snapping & off-routing. Do not support a re-route logic
  2. Start navigation and leave route
  3. Your position will hanging on the last route position. Sometimes it will jump to your current location.

Expected behavior

Route progress will return my raw location all the time.

Actual behavior

Route progress will return snapped location most the time. And if threshold checked, the raw position once.
Your position will hanging on the last route position. Sometimes it will jump to your current location.

How To: Force to Android GPS and Network Providers (no gms)

How can I force LocationEngineProvider to use Android GPS and Network Providers instead Google's Fused Location Providers ?

Short story:

The problem start from the last line:

MapboxNavigationOptions options = MapboxNavigationOptions.builder()
                .isDebugLoggingEnabled(true)
                .build();
navigation = new MapboxNavigation(requireContext(), options);
navigation.addNavigationEventListener(this);
navigation.addMilestoneEventListener(this);
navigation.setLocationEngine(LocationEngineProvider.getBestLocationEngine(requireContext()));

I have this dependencies in my app

implementation 'com.google.android.gms:play-services-location:21.0.1'
implementation 'com.github.maplibre:maplibre-navigation-android:84e9f77a55' 
implementation 'org.maplibre.gl:android-sdk:9.6.0'    

The gms v21.0.1 is not compatible with maplibre-gl v9.6.0, throwing this error:

java.lang.IncompatibleClassChangeError: Found interface com.google.android.gms.location.FusedLocationProviderClient....

I have tried to update maplibre-gl to the last version v10.0.1, but there are 2 problems;

  1. I don't understand the documentation to obtain a valid LocationEngine to pass in navigation.setLocationEngine
  2. On run app I get errors about icons not found linked in the library file values.xml at pos: 9711:
....
    <style name="mapbox_LocationLayer">
        <item name="mapbox_foregroundDrawable">@drawable/mapbox_user_icon</item>
        <item name="mapbox_backgroundDrawable">@drawable/mapbox_user_stroke_icon</item>
        <item name="mapbox_bearingDrawable">@drawable/mapbox_user_bearing_icon</item>
        <item name="mapbox_gpsDrawable">@drawable/mapbox_user_puck_icon</item>

        <item name="mapbox_foregroundDrawableStale">@drawable/mapbox_user_icon_stale</item>
        <item name="mapbox_backgroundDrawableStale">@drawable/mapbox_user_stroke_icon</item>

        <item name="mapbox_accuracyAlpha">0.15</item>
        <item name="mapbox_accuracyColor">@color/mapbox_location_layer_blue</item>
....

where can i find these icons?

So, the alternative is to use Android GPS and Network Providers instead of Google's Fused Location Providers.

Fix tests on main and run tests on CI

Currently we don't execute the tests in the CI. The tests are failing on the main branch. We should run these tests for every commit including PRs.

The sdk is triggering the reroute process when speed = 0

I don't know if the issue is linked to #63, but when the user stop to move (when the speed reduces to zero), the SDK trigger the rerouting process and gets a new route.

App configuration setup

  implementation 'com.github.maplibre:maplibre-navigation-android:2.0.0'
  implementation 'org.maplibre.gl:android-sdk:10.0.2'
  implementation 'org.maplibre.gl:android-plugin-annotation-v9:1.0.0'

Expected behaviour

The navigation should continue as usual.

Actual behaviour

The SDK trigger the reroute process.

Can't use like implementation

Android API: 33
Maplibre Navigation SDK version: 2.0.0

Steps to trigger behavior

  1. Use implementation 'com.github.maplibre:maplibre-navigation-android:2.0.0'
  2. No objects after com.mapbox.mapboxsdk.* available

Expected behavior

Have access to, for example, com.mapbox.mapboxsdk.Mapbox.

Actual behavior

Have no access to classes.
But inside example with this libraries is work perfect.

Create local Models for Navigation

Upstream, the Mapbox SDK was removed - maplibre/maplibre-java#8

This removes the Model classes we need for the navigation. This is not necessarily an issue, as there is a release that contains the required models, but as it is right now, we can't change anything about these models.

We could do a few things:

  • Copy the classes we need into this repository.
  • Use Mapbox-Java (I am not a fan of this, they only release Mapbox-Java through their private Maven repository, we could probably build our own and release this on a public repository)
  • Create our own models and build an api agnostic solution that can easily be used with different routing apis (my favourite option, but this will require quite some work)

Offroute listener issue?

Yesterday I updated the dependancies to last versions (before v1.2.0 & v10.0.0-pre.0)

implementation 'com.github.maplibre:maplibre-navigation-android:2.0.0'
implementation 'org.maplibre.gl:android-sdk:10.2.0'

This is the inizialitation (it's the same as before. Only changed LocationEngineProvide (deprecated) with LocationEngine)

// Initialize MapboxNavigation and add listeners
MapboxNavigationOptions options = MapboxNavigationOptions.builder()
        .isDebugLoggingEnabled(true)
        .build();
navigation = new MapboxNavigation(context, options);
navigation.addNavigationEventListener(this);
navigation.addMilestoneEventListener(this);

LocationEngine locationEngine = new LocationEngineProxy(new MapboxFusedLocationEngineImpl(context.getApplicationContext()));
navigation.setLocationEngine(locationEngine);

For each navigation, the userOffRoute listener is always called even if you follow the route (about every 100 meters).

I tried to add in the MapboxNavigationOptions options = MapboxNavigationOptions.builder()

.maximumDistanceOffRoute(20)
.minimumDistanceBeforeRerouting(50)

but nothing.

Did I forget to add something?

Implementation Issues

Android API:33
Maplibre Navigation SDK version:2.0.0

Steps to trigger behavior

1.Use another app
2. add dependency
3. implementation ('org.maplibre.gl:android-sdk:10.0.2') {
exclude group: 'com.mapbox.mapboxsdk', module: 'mapbox-sdk-geojson'
exclude group: 'com.mapbox.mapboxsdk', module: 'mapbox-sdk-turf'
}
implementation 'com.github.maplibre:maplibre-navigation-android:2.0.0'
4. Put code from NavigationUIActivity
5. Firstly You get "Error inflating class com.mapbox.mapboxsdk.maps.MapView"
6. After adding to onCreate "Mapbox.getInstance(this)", everything will work
7. After start navigation you will get "Error inflating class com.mapbox.services.android.navigation.ui.v5.NavigationView".
P.S. developer-config.xml created
What I do wrong?

Expected behavior

All work like in example

Actual behavior

Errors

DirectionsRoute.builder() issue

I'm using OSMDroid server to get routes.

Then, I convert the obtained OSMDroid route class in DirectionRoute class with the DirectionsRoute.builder():

Road road; // Route obtained from OSMDroid server

  1. Covert the list of OSMDroid points in List:
List<Point> pointsFromResponse = new ArrayList<>();
ArrayList<org.osmdroid.util.GeoPoint> points;

points = road.mRouteHigh;
for (org.osmdroid.util.GeoPoint point : points) 
            pointsFromResponse.add(Point.fromLngLat(point.getLongitude(), point.getLatitude()));
  1. Create a RouteOptions class with the builder():
RouteOptions routeOptions = RouteOptions.builder()
                            .geometries(DirectionsCriteria.GEOMETRY_POLYLINE6)
                            .profile(DirectionsCriteria.PROFILE_DRIVING)
                            .accessToken(accessToken)
                            .user(userAgent)
                            .requestUuid("c945b0b4-9764-11ed-a8fc-0242ac120002")    // fake UUID ver.1
                            .baseUrl("www.fakeurl.com")       // fake url
                            .coordinates(pointsFromResponse)
                            .voiceInstructions(true)
                            .bannerInstructions(true)
                            .build();
  1. Create a List of RouteLeg
List<RouteLeg> routeLegs = new ArrayList<>();
                    for (RoadLeg leg: road.mLegs)
                    {
                        RouteLeg routeLeg = RouteLeg.builder()
                                .distance(leg.mLength)
                                .duration(leg.mDuration)
                                .build();

                        routeLegs.add(routeLeg);
                    }
  1. Finally, create the DirectionRoute:
route = DirectionsRoute.builder()
                            .legs(routeLegs)
                            .geometry(PolylineEncoder.encode(roads.mRouteHigh, 1)).   // from OSMDroid class
                            .weightName("auto")
                            .weight(1.0)    // I didn't understand what it is, so I assign this value. Can you help me?
                            .distance(roads[0].mLength * 1000)
                            .duration(roads[0].mDuration)
                            .routeOptions(routeOptions)
                            .build();

The issue came when I call:
navigation.startNavigation(route);

There is an issue in NavigationRouteProcessor.java class, because I obtain this error but the List of RouteLeg is never null and size is 1 (minimum).

FATAL EXCEPTION: mapbox_navigation_thread
                 Process: com.speedox.myride, PID: 2528
                 java.lang.NullPointerException: Attempt to invoke interface method 'int java.util.List.size()' on a null object reference
                 	at com.mapbox.services.android.navigation.v5.navigation.NavigationRouteProcessor.processNewIndex(NavigationRouteProcessor.java:198)
                 	at com.mapbox.services.android.navigation.v5.navigation.NavigationRouteProcessor.createFirstIndices(NavigationRouteProcessor.java:182)
                 	at com.mapbox.services.android.navigation.v5.navigation.NavigationRouteProcessor.checkNewRoute(NavigationRouteProcessor.java:125)
                 	at com.mapbox.services.android.navigation.v5.navigation.NavigationRouteProcessor.buildNewRouteProgress(NavigationRouteProcessor.java:87)
                 	at com.mapbox.services.android.navigation.v5.navigation.RouteProcessorHandlerCallback.handleRequest(RouteProcessorHandlerCallback.java:49)
                 	at com.mapbox.services.android.navigation.v5.navigation.RouteProcessorHandlerCallback.handleMessage(RouteProcessorHandlerCallback.java:33)
                 	at android.os.Handler.dispatchMessage(Handler.java:102)
                 	at android.os.Looper.loop(Looper.java:246)
                 	at android.os.HandlerThread.run(HandlerThread.java:67)

Crash while updating the Notification Views

Android: 7 - 13
Android API: 24 - 33
Maplibre Navigation SDK version: 2.0.0

Stacktrace

java.lang.RuntimeException: android.os.TransactionTooLargeException: data parcel size 671536 bytes
  at android.app.NotificationManager.notifyAsUser(NotificationManager.java:700)
  at android.app.NotificationManager.notify(NotificationManager.java:632)
  at android.app.NotificationManager.notify(NotificationManager.java:608)
  at com.mapbox.services.android.navigation.v5.navigation.MapboxNavigationNotification.updateNotificationViews(MapboxNavigationNotification.java:173)
  at com.mapbox.services.android.navigation.v5.navigation.MapboxNavigationNotification.updateNotification(MapboxNavigationNotification.java:79)
  at com.mapbox.services.android.navigation.v5.navigation.NavigationNotificationProvider.updateNavigationNotification(NavigationNotificationProvider.java:23)
  at com.mapbox.services.android.navigation.v5.navigation.RouteProcessorThreadListener.onNewRouteProgress(RouteProcessorThreadListener.java:33)
  at com.mapbox.services.android.navigation.v5.navigation.RouteProcessorHandlerCallback$1.run(RouteProcessorHandlerCallback.java:97)
  at android.os.Handler.handleCallback(Handler.java:942)
  at android.os.Handler.dispatchMessage(Handler.java:99)
  at android.os.Looper.loopOnce(Looper.java:226)
  at android.os.Looper.loop(Looper.java:313)
  at android.app.ActivityThread.main(ActivityThread.java:8741)
  at java.lang.reflect.Method.invoke(Method.java:-2)
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)
  Caused by: android.os.TransactionTooLargeException: data parcel size 671536 bytes
    at android.os.BinderProxy.transactNative(BinderProxy.java:-2)
    at android.os.BinderProxy.transact(BinderProxy.java:653)
    at android.app.INotificationManager$Stub$Proxy.enqueueNotificationWithTag(INotificationManager.java:4011)
    at android.app.NotificationManager.notifyAsUser(NotificationManager.java:697)
    at android.app.NotificationManager.notify(NotificationManager.java:632)
    at android.app.NotificationManager.notify(NotificationManager.java:608)
    at com.mapbox.services.android.navigation.v5.navigation.MapboxNavigationNotification.updateNotificationViews(MapboxNavigationNotification.java:173)
    at com.mapbox.services.android.navigation.v5.navigation.MapboxNavigationNotification.updateNotification(MapboxNavigationNotification.java:79)
    at com.mapbox.services.android.navigation.v5.navigation.NavigationNotificationProvider.updateNavigationNotification(NavigationNotificationProvider.java:23)
    at com.mapbox.services.android.navigation.v5.navigation.RouteProcessorThreadListener.onNewRouteProgress(RouteProcessorThreadListener.java:33)
    at com.mapbox.services.android.navigation.v5.navigation.RouteProcessorHandlerCallback$1.run(RouteProcessorHandlerCallback.java:97)
    at android.os.Handler.handleCallback(Handler.java:942)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loopOnce(Looper.java:226)
    at android.os.Looper.loop(Looper.java:313)
    at android.app.ActivityThread.main(ActivityThread.java:8741)
    at java.lang.reflect.Method.invoke(Method.java:-2)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)
  • This same crash happens with different parcel size: 671536, 232436, 2088980,1039932 bytes and many others.
  • Using the default NavigationNotification implementation.

Steps to trigger behavior

  1. Start Navigation
  2. Navigate through the route
  3. Crash

Expected behavior

Updating notification without crash

Actual behavior

Crashing while updating notification

Support for Ocean Navigation

Would like to know if this SDK work on Nautical charts for Ocean navigation. This is required to develop an Android application for boaters to navigate back to HOME from the ocean regions. Please let me know if this SDK can be considered?

Maplibre navigation

Hi,
first, many thanks for providing the fork.
In our fork of flitsmeister we added navigation-ui and ported it from Mapbox to Maplibre.

There is also an ongoing discussion about the state of maplibre navigation: #8
Is this interesting for you? It would be great if we could establish a real alternative to mapbox.

Documentation

I have tried to enable the route snapping. The missing documentation/example lead me to a wrong configuration. I only set the option snapToRoute(true). But I missed to set useDefaultLocationEngine(false) and call forceLocationUpdate(Location).

I want to add a new sample to the example app and also create some documentation.

Now my questions: Do you have a preferred place for write down this things? Some options are

  • Github Wiki
  • README
  • Markdown files in repo

Or don't you want a documentation area? Then I implement the example case and add some comment block above.

org.gradle.internal.resolve.ModuleVersionNotFoundException

Hi, when i add implementation 'com.github.flitsmeister:flitsmeister-navigation-android:v1.1.1' i get these errors:

org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all files for configuration ':app:mitDebugCompileClasspath'.

org.gradle.internal.resolve.ModuleVersionNotFoundException: Could not find com.github.flitsmeister:flitsmeister-navigation-android:v1.1.1.

Question for the future support of Maplibre Navigation SDK

Hello guys. I am checking MapLibre navigation SDK .It seems Libre version is forked from MapBox v9. It is expected to shutdown support on April 4, 2023. My question is, does Maplibre stop as well if they stop supporting? or will you have any plans with v10 with paid services?

Access token validation

Android API: 30
Maplibre Navigation SDK version: 1.1.1

Steps to trigger behavior

  1. use example project
  2. use access token without any of the prefixes pk., sk. or tk.
  3. app crashes with com.mapbox.core.exceptions.ServicesException: Using Mapbox Services requires setting a valid access token.

Expected behavior

map directions should send the find route request

Actual behavior

app crashing with validation error

The driving-traffic API does not work

symbol ficker when navagation

new mapbox navigation symbol animation.

GIF 2023-7-11 16-03-19

the maplibre navigation symbol animation.
GIF 2023-7-11 16-04-481

i had look into both some codes, the mapbox navigation is differed to maplibre. but still not get any help to archive the smooth animation in maplibre navigatio. so require maplibre team' help

[Question] Disabling / intercepting off route recalculation

I don't see discussions enabled on this repo for asking questions, so I'm opening an issue.

Android API: 33
Maplibre Navigation SDK version: 2.0.0

I am building a basic navigation app and am currently using the NavigationLauncher (as in part of the sample app) because it's easy and doing anything else looked like an inordinate amount of work to fit into a Jetpack Compose app. This cleanly launches everything in another activity... anyways...

My question is exactly how I'd go about either disabling or intercepting the off route detection -> forced recalculation. I am not using Mapbox, so the default behavior seems to just get the app into a broken state of "recalculating" but it will never actually succeed.

I believe it's possible to attach listeners and set more options on the MapboxNavigation object itself, but I can't quite figure out how this is supposed to be set up. It seems unsupported if using the launcher. Any pointers would be appreciated as to alternate approaches that would let us set up the listeners.

Current location heading resets when speed=0

Hello,

that's an existing issue on Mapbox side but was fixed normally in 2017 so before the fork of Maplibre if I'm not wrong.

Mapbox ticket:
mapbox/mapbox-navigation-android#95

We're facing the same issue, when we stop to move, the camera is doing weird moves.

App configuration setup

  implementation 'com.github.maplibre:maplibre-navigation-android:2.0.0'
  implementation 'org.maplibre.gl:android-sdk:10.0.2'
  implementation 'org.maplibre.gl:android-plugin-annotation-v9:1.0.0'

Expected behaviour
The camera should not move when the user stops to move

Actual behaviour
The camera is doing weird moves

Update gms location dependency

The current dependency com.google.android.gms:play-services-location:16.0.0 is quite old, we should update this dependency.

I tried this, but somehow it did not work. Not sure where this comes from 'com.google.android.gms:play-services-location:{strictly 16.0.0}' because of the following reason: debugRuntimeClasspath uses version 16.0.0, when you change 16.0.0 to 21.0.1 there is no v16 defined in the project anymore.

FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':libandroid-navigation:generateDebugRFile'.
> Could not resolve all files for configuration ':libandroid-navigation:debugCompileClasspath'.
   > Could not resolve com.google.android.gms:play-services-location:21.0.1.
     Required by:
         project :libandroid-navigation
      > Cannot find a version of 'com.google.android.gms:play-services-location' that satisfies the version constraints:
           Dependency path 'com.mapbox.mapboxsdk:libandroid-navigation:1.0.3' --> 'com.google.android.gms:play-services-location:21.0.1'
           Constraint path 'com.mapbox.mapboxsdk:libandroid-navigation:1.0.3' --> 'com.google.android.gms:play-services-location:{strictly 16.0.0}' because of the following reason: debugRuntimeClasspath uses version 16.0.0

Update to latest Maplibre Android SDK

I have seen that this library is currently using Maplibre 9.4.0. Is there a reason we are not at 9.5.2, which is the latest version? Would this be something a PR would be welcome for?

Route Snapping: Zero bearing between legs/waypoints

Maplibre Navigation SDK version: 2.0.0

Steps to trigger behavior

  1. Enable route snapping
  2. Navigate along a waypoint
  3. The snapped bearing is moved to zero by reaching waypoint.

For a working example, see snap to route use case of #73

Expected behavior

  • Snap to upcoming waypoint bearing.

Actual behavior

  • The snapped bearing is moved to zero by reaching waypoints

How decode geometries of DirectionsRoutes in Points?

Hi Guys,
I'm new here.

Can anyone tell me how decode geometries of DirectionsRoutes in Points? Because I want to convert them to display in another mapView (Mapsforge VTM).

I have seen this object DecodeUtils from MapBox package com.mapbox.navigation.base.utils.
fun DirectionsRoute.completeGeometryToPoints: List(Point)

Thanks
Andrew

Release new version

Can you release a new version that used maplibre version v10.0.2 and work with Google location service v21

Sample not working

Maplibre Navigation SDK version: latest

When we are trying to use the sample app, it doesn't compile:

The minCompileSdk (33) specified in a
dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
is greater than this module's compileSdkVersion (android-31).
Dependency: androidx.core:core:1.9.0.
AAR metadata file: /Users/id852260/.gradle/caches/transforms-2/files-2.1/b09cd5d78a19dc54ea90661aaa5e113f/core-1.9.0/META-INF/com/android/build/gradle/aar-metadata.properties.

Linked to that part of the code: compile "androidx.core:core-ktx:+"

Which version of the core-ktx should be compatible?

Update CHANGELOG

Currently the CHANGELOG.md is outdated, we should at least include the latest release to start adding all changes from now on.

Voice navigation

Can you tell me what is needed for voice navigation? I will add the language to speak and voiceInstructions are included
image

Navigation SDk crash when app theme change during active navigation

The app is crashing when app theme changed

Steps to trigger behavior

  1. Make an active navigation with valid route
  2. App theme is changed from Day to Night or vise version by AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES) or AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO)

App configuration setup

implementation 'org.maplibre.gl:android-sdk:10.0.2'
implementation('com.github.maplibre:maplibre-navigation-android:2.0.0') {
exclude group: 'com.github.maplibre.maplibre-navigation-android', module: 'libandroid-navigation-ui'
}
implementation 'org.maplibre.gl:android-plugin-annotation-v9:1.0.0'

Expected behavior

App should work without problem when changing app theme during active navigation

Actual behavior

App is crashing after changing theme during navigation

Crash log

2023-05-22 09:02:51.839 7075-7075 DEBUG crash_dump64 A Cmdline: com.uznewmax.mytaxidriver 2023-05-22 09:02:51.839 7075-7075 DEBUG crash_dump64 A pid: 5296, tid: 5296, name: ax.mytaxidriver >>> com.uznewmax.mytaxidriver <<< 2023-05-22 09:02:51.840 7075-7075 DEBUG crash_dump64 A #00 pc 000000000066d430 /data/app/~~pherX7L4TZD73MKDvel0iA==/com.uznewmax.mytaxidriver-p1gSwX2T2MocgTIdcl2IYg==/base.apk!libmapbox-gl.so (BuildId: d449d063f42831e0fba34c29bbe5f7f11738ed14) 2023-05-22 09:02:51.840 7075-7075 DEBUG crash_dump64 A #01 pc 0000000000497ae4 /data/app/~~pherX7L4TZD73MKDvel0iA==/com.uznewmax.mytaxidriver-p1gSwX2T2MocgTIdcl2IYg==/base.apk!libmapbox-gl.so (mbgl::android::Layer::getVisibility(_JNIEnv&)+44) (BuildId: d449d063f42831e0fba34c29bbe5f7f11738ed14) 2023-05-22 09:02:51.840 7075-7075 DEBUG crash_dump64 A #02 pc 0000000000499cc4 /data/app/~~pherX7L4TZD73MKDvel0iA==/com.uznewmax.mytaxidriver-p1gSwX2T2MocgTIdcl2IYg==/base.apk!libmapbox-gl.so (auto jni::NativeMethodMaker<jni::Unique<jni::Object<jni::ObjectTag>, jni::DefaultRefDeleter<&(_JNIEnv::DeleteLocalRef(_jobject*))> > (auto jni::NativePeerMemberFunctionMethod<jni::Unique<jni::Object<jni::ObjectTag>, jni::DefaultRefDeleter<&(_JNIEnv::DeleteLocalRef(_jobject*))> > (mbgl::android::Layer::*)(_JNIEnv&), &(mbgl::android::Layer::getVisibility(_JNIEnv&))>::operator()<mbgl::android::Layer, mbgl::android::Layer, void>(jni::Field<mbgl::android::Layer, long> const&)::‘lambda’(_JNIEnv&, jni::Object<mbgl::android::Layer>&)::*)(_JNIEnv&, jni::Object<mbgl::android::Layer>&) const>::operator()<auto jni::NativePeerMemberFunctionMethod<jni::Unique<jni::Object<jni::ObjectTag>, jni::DefaultRefDeleter<&(_JNIEnv::DeleteLocalRef(_jobject*))> > (mbgl::android::Layer::*)(_JNIEnv&), &(mbgl::android::Layer::getVisibility(_JNIEnv&))>::operator()<mbgl::android::Layer, mbgl::android::Layer, void>(jni::Field<mbgl::android::Layer, long> const&)::‘lambda’(_JNIEnv&, jni::Object<mbgl::android::Layer>&)>(char const*, auto jni::NativePeerMemberFunctionMethod<jni::Unique<jni::Object<jni::ObjectTag>, jni::DefaultRefDeleter<&(_JNIEnv::DeleteLocalRef(_jobject*))> > (mbgl::android::Layer::*)(_JNIEnv&), &(mbgl::android::Layer::getVisibility(_JNIEnv&))>::operator()<mbgl::android::Layer, mbgl::android::Layer, void>(jni::Field<mbgl::android::Layer, long> const&)::‘lambda’(_JNIEnv&, jni::Object<mbgl::android::Layer>&) const&)::‘lambda’(_JNIEnv*, jni::jobject*)::__invoke(_JNIEnv*, jni::jobject*)+104) (BuildId: d449d063f42831e0fba34c29bbe5f7f11738ed14) 2023-05-22 09:02:51.840 7075-7075 DEBUG crash_dump64 A #03 pc 0000000000499d6c /data/app/~~pherX7L4TZD73MKDvel0iA==/com.uznewmax.mytaxidriver-p1gSwX2T2MocgTIdcl2IYg==/base.apk!libmapbox-gl.so (auto auto jni::MakeNativeMethod<auto jni::NativeMethodMaker<jni::Unique<jni::Object<jni::ObjectTag>, jni::DefaultRefDeleter<&(_JNIEnv::DeleteLocalRef(_jobject*))> > (auto jni::NativePeerMemberFunctionMethod<jni::Unique<jni::Object<jni::ObjectTag>, jni::DefaultRefDeleter<&(_JNIEnv::DeleteLocalRef(_jobject*))> > (mbgl::android::Layer::*)(_JNIEnv&), &(mbgl::android::Layer::getVisibility(_JNIEnv&))>::operator()<mbgl::android::Layer, mbgl::android::Layer, void>(jni::Field<mbgl::android::Layer, long> const&)::‘lambda’(_JNIEnv&, jni::Object<mbgl::android::Layer>&)::*)(_JNIEnv&, jni::Object<mbgl::android::Layer>&) const>::operator()<auto jni::NativePeerMemberFunctionMethod<jni::Unique<jni::Object<jni::ObjectTag>, jni::DefaultRefDeleter<&(_JNIEnv::DeleteLocalRef(_jobject*))> > (mbgl::android::Layer::*)(_JNIEnv&), &(mbgl::android::Layer::getVisibility(_JNIEnv&))>::operator()<mbgl::android::Layer, mbgl::android::Layer, void>(jni::Field<mbgl::android::Layer, long> const&)::‘lambda’(_JNIEnv&, jni::Object<mbgl::android::Layer>&)>(char const*, auto jni::NativePeerMemberFunctionMethod<jni::Unique<jni::Object<jni::ObjectTag>, jni::DefaultRefDeleter<&(_JNIEnv::DeleteLocalRef(_jobject*))> > (mbgl::android::Layer::*)(_JNIEnv&), &(mbgl::android::Layer::getVisibility(_JNIEnv&))>::operator()<mbgl::android::Layer, mbgl::android::Layer, void>(jni::Field<mbgl::android::Layer, long> const&)::‘lambda’(_JNIEnv&, jni::Object<mbgl::android::Layer>&) const&)::‘lambda’(_JNIEnv*, jni::jobject*)>(char const*, char const*, auto jni::NativePeerMemberFunctionMethod<jni::Unique<jni::Object<jni::ObjectTag>, jni::DefaultRefDeleter<&(_JNIEnv::DeleteLocalRef(_jobject*))> > (mbgl::android::Layer::*)(_JNIEnv&), &(mbgl::android::Layer::getVisibility(_JNIEnv&))>::operator()<mbgl::android::Layer, mbgl::android::Layer, void>(jni::Field<mbgl::android::Layer, long> const&)::‘lambda’(_JNIEnv&, jni::Object<mbgl::android::Layer>&) const&, std::__ndk1::enable_if<std::is_class<auto jni::NativePeerMemberFunctionMethod<jni::Unique<jni::Object<jni::ObjectTag>, jni::DefaultRefDeleter<&(_JNIEnv::DeleteLocalRef(_jobject*))> > (mbgl::android::Layer::*)(_JNIEnv&), &(mbgl::android::Layer::getVisibility(_JNIEnv&))>::operator()<mbgl::android::Layer, mbgl::android::Layer, void>(jni::Field<mbgl::android::Layer, long> const&)::‘lambda’(_JNIEnv&, jni::Object<mbgl::android::Layer>&)>::value, void>::type*)::‘lambda’(_JNIEnv*, auto...)::__invoke<jni::jobject*>(_JNIEnv*, auto...)+44) (BuildId: d449d063f42831e0fba34c29bbe5f7f11738ed14) 2023-05-22 09:02:51.840 7075-7075 DEBUG crash_dump64 A #06 pc 00000000002b006a [anon:dalvik-classes19.dex extracted in memory from /data/app/~~pherX7L4TZD73MKDvel0iA==/com.uznewmax.mytaxidriver-p1gSwX2T2MocgTIdcl2IYg==/base.apk!classes19.dex] (com.mapbox.mapboxsdk.style.layers.Layer.getVisibility+10) 2023-05-22 09:02:51.841 7075-7075 DEBUG crash_dump64 A #08 pc 00000000002c2d74 [anon:dalvik-classes19.dex extracted in memory from /data/app/~~pherX7L4TZD73MKDvel0iA==/com.uznewmax.mytaxidriver-p1gSwX2T2MocgTIdcl2IYg==/base.apk!classes19.dex] (com.mapbox.services.android.navigation.v5.navigation.NavigationMapRoute.updateArrowLayersVisibilityTo+56) 2023-05-22 09:02:51.841 7075-7075 DEBUG crash_dump64 A #10 pc 00000000002c2180 [anon:dalvik-classes19.dex extracted in memory from /data/app/~~pherX7L4TZD73MKDvel0iA==/com.uznewmax.mytaxidriver-p1gSwX2T2MocgTIdcl2IYg==/base.apk!classes19.dex] (com.mapbox.services.android.navigation.v5.navigation.NavigationMapRoute.clearRoutes+8) 2023-05-22 09:02:51.841 7075-7075 DEBUG crash_dump64 A #12 pc 00000000002c1de0 [anon:dalvik-classes19.dex extracted in memory from /data/app/~~pherX7L4TZD73MKDvel0iA==/com.uznewmax.mytaxidriver-p1gSwX2T2MocgTIdcl2IYg==/base.apk!classes19.dex] (com.mapbox.services.android.navigation.v5.navigation.NavigationMapRoute.addRoutes+0) 2023-05-22 09:02:51.841 7075-7075 DEBUG crash_dump64 A #14 pc 00000000002c19ec [anon:dalvik-classes19.dex extracted in memory from /data/app/~~pherX7L4TZD73MKDvel0iA==/com.uznewmax.mytaxidriver-p1gSwX2T2MocgTIdcl2IYg==/base.apk!classes19.dex] (com.mapbox.services.android.navigation.v5.navigation.NavigationMapRoute.addRoute+16) 2023-05-22 09:02:51.841 7075-7075 DEBUG crash_dump64 A #16 pc 00000000002c5198 [anon:dalvik-classes19.dex extracted in memory from /data/app/~~pherX7L4TZD73MKDvel0iA==/com.uznewmax.mytaxidriver-p1gSwX2T2MocgTIdcl2IYg==/base.apk!classes19.dex] (com.mapbox.services.android.navigation.v5.route.MapRouteProgressChangeListener.addNewRoute+16) 2023-05-22 09:02:51.841 7075-7075 DEBUG crash_dump64 A #18 pc 00000000002c51d0 [anon:dalvik-classes19.dex extracted in memory from /data/app/~~pherX7L4TZD73MKDvel0iA==/com.uznewmax.mytaxidriver-p1gSwX2T2MocgTIdcl2IYg==/base.apk!classes19.dex] (com.mapbox.services.android.navigation.v5.route.MapRouteProgressChangeListener.onProgressChange+32) 2023-05-22 09:02:51.841 7075-7075 DEBUG crash_dump64 A #20 pc 00000000002bf834 [anon:dalvik-classes19.dex extracted in memory from /data/app/~~pherX7L4TZD73MKDvel0iA==/com.uznewmax.mytaxidriver-p1gSwX2T2MocgTIdcl2IYg==/base.apk!classes19.dex] (com.mapbox.services.android.navigation.v5.navigation.NavigationEventDispatcher.onProgressChange+36) 2023-05-22 09:02:51.841 7075-7075 DEBUG crash_dump64 A #22 pc 00000000002c43d6 [anon:dalvik-classes19.dex extracted in memory from /data/app/~~pherX7L4TZD73MKDvel0iA==/com.uznewmax.mytaxidriver-p1gSwX2T2MocgTIdcl2IYg==/base.apk!classes19.dex] (com.mapbox.services.android.navigation.v5.navigation.RouteProcessorThreadListener.onNewRouteProgress+14) 2023-05-22 09:02:51.841 7075-7075 DEBUG crash_dump64 A #24 pc 00000000002c4100 [anon:dalvik-classes19.dex extracted in memory from /data/app/~~pherX7L4TZD73MKDvel0iA==/com.uznewmax.mytaxidriver-p1gSwX2T2MocgTIdcl2IYg==/base.apk!classes19.dex] (com.mapbox.services.android.navigation.v5.navigation.RouteProcessorHandlerCallback$1.run+20) ---------------------------- PROCESS ENDED (5296) for package com.uznewmax.mytaxidriver ---------------------------- 2023-05-22 09:02:54.479 7152-7152 USNET pid-7152 E USNET: appName: com.uznewmax.mytaxidriver

image

Unable to run gradle build or gradle check

Maplibre Navigation SDK version: 3.0.0 (main branch)

Steps to trigger behavior

  1. Check out the repo
  2. Add some sensible values to developer-config.xml
  3. gradle build or gradle check

Expected behavior

Successful build.

Actual behavior

Lint fails. The initial errors are about missing permissions in the android manifest, which should probably be fixed. A subsequent build complains about missing telemetry providers (which should be missing!).

index f7631a2c..49584957 100644
--- a/libandroid-navigation/src/main/AndroidManifest.xml
+++ b/libandroid-navigation/src/main/AndroidManifest.xml
@@ -4,19 +4,12 @@
 
     <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
     <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
+    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
 
     <application>
         <service
             android:name="com.mapbox.services.android.navigation.v5.navigation.NavigationService"
             android:foregroundServiceType="location" />
-        <provider
-            android:name="com.mapbox.android.telemetry.provider.MapboxTelemetryInitProvider"
-            android:authorities="${applicationId}.mapboxtelemetryinitprovider"
-            android:exported="false"
-            android:initOrder="100"
-            tools:node="remove" />
-        <!-- Include the telemetry service to simplify set up (https://www.mapbox.com/telemetry) -->
-        <service android:name="com.mapbox.services.android.telemetry.service.TelemetryService"/>
     </application>
 
 </manifest>

Applying the above diff allows it to proceed to the next lint stage and it finds 3151 of them 😂

I think we probably need to do one or more of the following, but don't know the history of the project, hence opening an issue rather than a PR straightaway.

  • Fix the manifest as noted above. Anything I'm missing here?
  • Document clearly (in CONTRIBUTING.md?) how to build the project, and that the build and check tasks will not work. I tracked down a comment in the GitHub actions config: but that's only because I knew exactly what I was looking for.
  • OR disable the lints if they are not really helpful?

Permissions by default

The problem that fixed in #90 also appears on my app.

Similar to the location permission, we should thinking about to add the service permissions to the library AndroidManifest file.

If we don't want it, maybe for the reason that not all apps will use the active navigation notification, we should check for available permissions and use the given service only when permission is set.

I tend to add the permission to the library. What's your opinions to that?

Update to v1.2.0

Sorry for my stupid question...

I'm using the v1.1.1 as described here:

Step 1. Add it in your root build.gradle at the end of repositories:

  allprojects {
    repositories {
      ...

      jcenter()   // for Maplibre Navigation SDK for Android v1.1.1

      maven { url 'https://jitpack.io' }
    }
  }
Step 2. Add the dependency

  implementation 'com.github.maplibre:maplibre-navigation-android:1.1.1

but if I change the implementation to v1.2.0 I get a lot of compile errors.

can you help me?

Cannot update the library to v1.2.0

We would like to update the sdk from 1.1.1 to 1.2.0 to benefit of the fix on Android 31+.

But we're not able to install the package, we have this following error:

Could not determine the dependencies of task ':app:lintVitalRelease'.
> Could not resolve all artifacts for configuration ':app:debugRuntimeClasspath'.
   > Could not find com.github.maplibre:maplibre-navigation-android:1.2.0.
     Searched in the following locations:
       - file:/Users/builder/.m2/repository/com/github/maplibre/maplibre-navigation-android/1.2.0/maplibre-navigation-android-1.2.0.pom
       - file:/Users/builder/clone/example/node_modules/react-native/android/com/github/maplibre/maplibre-navigation-android/1.2.0/maplibre-navigation-android-1.2.0.pom
       - file:/Users/builder/clone/example/node_modules/jsc-android/dist/com/github/maplibre/maplibre-navigation-android/1.2.0/maplibre-navigation-android-1.2.0.pom
       - file:/Users/builder/clone/example/android/app/libs/maplibre-navigation-android-1.2.0.jar
       - file:/Users/builder/clone/example/android/app/libs/maplibre-navigation-android.jar
       - https://dl.google.com/dl/android/maven2/com/github/maplibre/maplibre-navigation-android/1.2.0/maplibre-navigation-android-1.2.0.pom
       - https://repo.maven.apache.org/maven2/com/github/maplibre/maplibre-navigation-android/1.2.0/maplibre-navigation-android-1.2.0.pom
       - https://www.jitpack.io/com/github/maplibre/maplibre-navigation-android/1.2.0/maplibre-navigation-android-1.2.0.pom

Installation:

app/build.gradle

  implementation 'com.github.maplibre:maplibre-navigation-android:1.2.0'

build.gradle

allprojects {
  repositories {
   ...
    maven { url 'https://www.jitpack.io' }
  }
}

Question about route progress updates

Is there a way to force instructions to jump into determined route lag and step based on the current user's location?
In our current project, we have a fixed route situation, like a delivery route from a warehouse to the factory for example. And for some scenarios, the user might be alongside and off route.
The problem is when the user goes in the route and start the trip, we are not receiving the updates in the instruction view, I already debugged the NavigationRouteProcessor, NavigationHelper and OffRouteDetector.
In this case the NavigationIndices are not receiving any updates in the NavigationRouteProcessor.

In this case, Is there any approach to solve the instructions update?

Enable integration with multiple routing services

Presently, MapLibre Nav carries a direct integration to Mapbox routing services. Configuring MapLibre Nav to work with any other routing service including opensource engines like Valhalla requires reworking a lot of existing code.

I propose an interface or plugin model that allows MapLibre Nav to connect to any routing engine available in the world. For example, integration with Valhalla will bring client-side map matching with Valhalla route tiles along with its routing capabilities.

Expected behavior

MapLibre Nav provides documentation and golden path solutions to integrate with existing routing engines.

Actual behavior

MapLibre Nav requires extensive code changes to test out behaviours with existing routing engines.

Compile Error with Mapbox Maps v10

Because the LocationEngine package was moved with Mapbox Maps v10, I cannot use any of the MapboxNavigation constructors other then MapboxNavigation(@NonNull Context context)

image

Even with the constructor without LocationEngine as input, I get a compile error

error: cannot access LocationEngine
        mapboxNavigation = new MapboxNavigation(requireContext(), options);
                           ^
  class file for com.mapbox.mapboxsdk.location.engine.LocationEngine not found

With the default constructor, a LocationEngine is being created somehow
image

Question: Is there a plan to allow the LocationEngine from Mapbox Maps v10?

Android API: 21 - 33
Maplibre Navigation SDK version: 3.0.0

Steps to trigger behavior

  1. Use MapboxNavigation(@NonNull Context context, @NonNull MapboxNavigationOptions options) Constructor
  2. Start compiling
  3. ERROR

Expected behavior

Compiling with Mapbox Maps v10

Actual behavior

Compile error with Mapbox Maps v10

Fix memory leak for NavigationService

I discovered that the navigation lib has a memory leak which is already fixed in the mapbox implementation:
mapbox/mapbox-navigation-android#275

I think it would be a good idea to adapt those changes to fix the leak.

I would be up to implement the changes.
What do you think? Any thoughts why we should not adapt to the new/fixed NavigationService implementation?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.