icerockdev / moko-maps

Control your map from common code for mobile (android & ios) Kotlin Multiplatform development
https://moko.icerock.dev/
Apache License 2.0
86 stars 16 forks source link

What is Mapbox Navigation v1.5.1 dependency used for? #66

Open tsuz opened 2 years ago

tsuz commented 2 years ago

What's the problem?

dev.icerock.moko:maps:0.6.0 has a dependency of com.mapbox.navigation:core:1.5.1 (source via PR) and this means developers that use Mapbox maps will be charged Nav SDK pricing per MAU, even the users are not using any functionality of Mapbox Nav SDK.

Why is this occurring now?

dev.icerock.moko:maps:0.5.2 has a dependency of com.mapbox.mapboxsdk:mapbox-android-navigation:0.42.6 which doesn't charge Mapbox Nav SDK pricing.

What is Mapbox Navigation being used for?

From looking at the code, it doesn't look like we need this library. Can this dependency be removed?

Alex009 commented 2 years ago

hi! as i remember - navigation module needed for build route, here for example - https://github.com/icerockdev/moko-maps/blob/master/maps-mapbox/src/androidMain/kotlin/dev/icerock/moko/maps/mapbox/MapboxController.kt#L274 maybe it's not directly navigation module but some dependency of navigation module...need to check it. in 0.6.0 we update sdk and old android-navigation module was missed, so we change to navigation core

tsuz commented 2 years ago

@Alex009

Thanks for your quick response :)

Using Mapbox Nav SDK V2, the route can also be generated in a similar fashion, while there would be no charge to the end users unless the turn by turn navigation is used.

Is it possible to migrate Mapbox Navigation from v1.5.1 to v2?

tsuz commented 2 years ago

@Alex009

Btw, are you open to a PR that updates Mapbox Nav SDK from v1.5.1 to v2? I could give it a try if this is welcome 🙂

Alex009 commented 2 years ago

@tsuz yes, try please. any help is beautiful