有没有办法在mapbox-android 3.1.0中更新标记的latlng? setLocation方法是私有的,Marker类是final。 我试图避免删除和读取mapview的标记。 另一个选择是实现可移动标记和构建映射框。
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.
最满意答案
在即将推出的4.04版本的Android Mapbox SDK中,您将能够更新标记位置。 非常方便用标记制作炫酷的动画。 要立即使用它,您可以使用4.0.0-SNAPSHOT将其添加到您的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 } }资源
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 } }Source
更多推荐
发布评论