Open Fabi755 opened 3 months ago
I see always existing Mapbox names on resources that could changed. I will updates this near time.
In favor of maplibre/maplibre-native#2505 I noticed that the layer IDs of the native project always on mapbox
naming. We need a follow up update, if the changes are released on their site.
I tried to rename all Mapbox names to MapLibre. But while we use at the moment Mapbox requests as our default API, it was not very easy to differentiate the components and which names should renamed and which not.
Feel free to have an own look, and give some hints to missing parts. Alternative we can create a follow up PR when we detect missing things.
From my side this PR is ready to merge. A test usage has worked for me.
To force Jitpack to rebuild I create a tag. I added the library with
implementation 'com.github.fabi755:maplibre-navigation-android:jitpack-test1
@boldtrn Can you review this?
@nitrag this PR is still on my review list. Please note, this PR is huge, while a lot of the changes are simple renames, I still have to take a look. If you like to help with the review, we are grateful for any feedback you have, so please feel free to also review the code and let us know if you spot an issue. Feel free to run the sample code an integrate this in your project so we catch possible issues early on.
@Fabi755 Thanks for taking the time to do this! While implementing your changes into our Flitsmeister app we noticed two things in NavigationRoute
:
origin(Point, Double, Double)
function on line 239
still uses com.mapbox.geojson.Point
instead of org.maplibre.geojson.Point
. I see you did change it in the other variant, so the toMapboxPoint()
needs to be moved to this one.addWayPoint(Point, Double, Double)
function on line 314
also uses com.mapbox.geojson.Point
instead of org.maplibre.geojson.Point
(this also requires the MapLibreRouteFetcher
to change to org.maplibre.geojson.Point
). After editing this, and changing all MapBox references to MapLibre, our app ran perfectly fine 👍. Edit; when calculating a route using the NavigationRoute.builder
, the app crashes on java.lang.NoClassDefFoundError: Failed resolution of: Lcom/mapbox/api/directions/v5/MapboxDirections;
. Could also have something to do with adding this sdk as a local aar file to test. I also needed to add retrofit2 dependencies.
Can this PR be merged, or are additional changes needed?
There are still issues, that I need to fix. I'm currently on holiday until august. I will continue working after this.
I'll be happy to test this when it's finished.
Upgrade MapLibre to major version
11.x.x
.Closes #104
Following things have done for this:
maplibre-native
to version11.0.0
b. Updatemaplibre-java
modules to version6.0.1
c. Rename affected imports d. Replace MapLibre hostedmapbox-sdk-services
(5.9.0
) by Mapbox hostedmapbox-sdk-services
(5.8.0
) to solve package conflicts. This step was required because the project is currently using some classes from the services module. But the module was removed from the MapLibre project, and therefore not upgraded to the new package name.Things we should thinking about, before release the new major version:
v5
from path.core
&ui
.Please note that the GL drawing is crashing (on emulator ?!) when roating the map. See: https://github.com/maplibre/maplibre-native/issues/2371.