maplibre / maplibre-navigation-android

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

Compile Error with Mapbox Maps v10 #95

Closed iboalali closed 10 months ago

iboalali commented 10 months ago

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

boldtrn commented 10 months ago

This repo is using Maplibre-Native and not Mapbox Maps. Can you clarify why you are using Mapbox Maps?

iboalali commented 10 months ago

Ok, I thought it is compatible with Mapbox Maps. My bad.

Because we use Mapbox for Maps and Navigation, but are trying to get away from them (Business decision), and we are looking for alternatives. Right now just for the navigation.

boldtrn commented 10 months ago

Supporting Mapbox Maps is not really something we are looking into. You should be able to make this repo work with Mapbox Maps with some effort, we have not removed compatibility on purpose, but we don't care about compatibility either.

iboalali commented 10 months ago

Ok, fair. Btw. I got it to work with Reflection 🙈