拖放图标谷歌地图Android版V2 [英] drag and drop icons to google map v2 android

查看:170
本文介绍了拖放图标谷歌地图Android版V2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用在我的Andr​​oid项目谷歌地图V2。
我知道,它可以添加自定义标记作为一个图标作为显示在以下code:

I'm using Google map v2 in my android project. I know that its possible to add custom markers as an icons as shown in the following code:

MarkerOptions marker= new MarkerOptions()
    .position(location)
    .icon(BitmapDescriptorFactory.
                     fromResource(R.drawable.map_marker_cab_pickup));

 map.addMarker( marker );

时有任何可能通过拖动来移动该图标拖放到任何位置在地图上?

Is there are any possibility to move this icons by drag and drop to any location on the map?

推荐答案

您正在寻找 MarkerOptions.draggable(真)。同时检查 GoogleMap.OnMarkerDragListener ,如果你想,当用户拖动您的标记就知道了。

You are looking for MarkerOptions.draggable(true). Also check GoogleMap.OnMarkerDragListener , if you want to know when user drags your Marker.

这篇关于拖放图标谷歌地图Android版V2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆