Reputation: 514
Is there a way to update the latlng of a marker in mapbox-android 3.1.0? The setLocation method is private and the Marker class is final. I'm trying to avoid removing and readding a marker to the mapview. Another option would be implement a moveable marker and build mapbox.
Upvotes: 0
Views: 269
Reputation: 3168
in the upcoming 4.0.0
version of the Android Mapbox SDK you'll be able to update the marker position. pretty handy for making cool animations with the marker. To use it now you can use the 4.0.0-SNAPSHOT
by adding this to your app build.gradle:
repositories {
...
maven { url "http://oss.sonatype.org/content/repositories/snapshots/" }
}
dependencies {
...
compile('com.mapbox.mapboxsdk:mapbox-android-sdk:4.0.0-SNAPSHOT@aar') {
transitive = true
}
}
Upvotes: 1