可移动标记Android Mapbox 3.1.0(Moveable Marker Android Mapbox 3.1.0)

编程入门 行业动态 更新时间:2024-10-28 13:14:12
可移动标记Android Mapbox 3.1.0(Moveable Marker Android Mapbox 3.1.0)

有没有办法在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

更多推荐

本文发布于:2023-04-28 15:58:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1332459.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:标记   Android   Mapbox   Marker   Moveable

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!