maplibre / maplibre-navigation-android

Maplibre Navigation SDK for Android
MIT License
86 stars 44 forks source link

Upgrade to MapLibre 11.0.0 #110

Open Fabi755 opened 3 months ago

Fabi755 commented 3 months ago

Upgrade MapLibre to major version 11.x.x.

Closes #104

Following things have done for this:

  1. Upgrade MapLibre a. Update maplibre-native to version 11.0.0 b. Update maplibre-java modules to version 6.0.1 c. Rename affected imports d. Replace MapLibre hosted mapbox-sdk-services (5.9.0) by Mapbox hosted mapbox-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.
  2. Rename Mapbox classes to MapLibre

Things we should thinking about, before release the new major version:

  1. Change package naming/structure. For example remove v5 from path.
  2. Rename the Gradle modules. For example in 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.

Fabi755 commented 3 months ago

I see always existing Mapbox names on resources that could changed. I will updates this near time.

Fabi755 commented 2 months ago

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.

Fabi755 commented 2 months ago

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
nitrag commented 2 months ago

@boldtrn Can you review this?

boldtrn commented 2 months ago

@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.

rubenmx commented 2 months ago

@Fabi755 Thanks for taking the time to do this! While implementing your changes into our Flitsmeister app we noticed two things in NavigationRoute:

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.

frankkienl commented 1 month ago

Can this PR be merged, or are additional changes needed?

Fabi755 commented 1 month ago

There are still issues, that I need to fix. I'm currently on holiday until august. I will continue working after this.

nitrag commented 1 week ago

I'll be happy to test this when it's finished.