地图V2标记pressed状态 [英] Maps V2 Marker pressed states

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

问题描述

在地图V2,哪能设置pssed状态记号的$ P $?

In Maps V2, how can I set a pressed state to a Marker?

的setIcon的()方法需要一个BitmapDesc​​riptor;我看不到的方式来传递一个XML选择,这将使一个pressed和选中状态。

The setIcon() method takes a BitmapDescriptor; I can't see a way to pass an XML selector which would give a pressed and selected state.

是实现这一覆​​盖OnMarkerClickListener和编程改变形象的唯一途径?

Is the only way to achieve this to override the OnMarkerClickListener and change the image programmatically?

推荐答案

有没有办法更改图标为标记的持续时间被pressed作为API V2版本3.1.36。

There is no way to change the icon for the duration of Marker being pressed as of API v2 version 3.1.36.

对于选定的状态,你可以围绕使用工作,它 OnMarkerClickListener ,设置一些图标,想起了参考这个标记,它更改回正常时的另一个标志是点击或其他一些动作occures,例如: onMapClick onMapLongClick 被调用。

For the selected state, you may work it around by using OnMarkerClickListener, setting some icon, remembering the reference to this marker and changing it back to normal when another marker is clicked or some other action occures, e.g. onMapClick or onMapLongClick is called.

这篇关于地图V2标记pressed状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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