Android的图形页面拖动标记拖动、标记、图形、页面

2023-09-05 09:52:02 作者:你是我的全世界/我的世界全给你

我想创建Android的图形页面(com.google.android.maps.MapView)可拖动标记,完全是这样的:的 http://koti.mbnet.fi/ojalesa/exam/draggable.html 。

I would like to create a draggable marker in Android MapView (com.google.android.maps.MapView), exactly like this: http://koti.mbnet.fi/ojalesa/exam/draggable.html.

我已经有了一个覆盖指向我想要的位置,但我想标记图标,可拖动就像上面的例子。有什么准备利用这个还是要落实拖着自己的逻辑?

I've already got an overlay pointing to the location I want, but I'd like the marker icon to be draggable like in the above example. Is there something ready to use for this or is it necessary to implement the dragging logic myself?

推荐答案

您需要实现拖动自己。 这里是展示阻力的下降和示例项目 OverlayItem ItemizedOverlay

You need to implement the dragging yourself. Here is a sample project demonstrating drag and drop of an OverlayItem from an ItemizedOverlay.