本文介绍了Android的谷歌地图V2永久的标记信息窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有关信息窗口的默认行为是隐藏如果地图标记处于,或标记本身被挖掘出来。

The default behavior for an InfoWindow is to hide if the map the marker is in, or the marker itself are tapped.

有没有什么办法,使信息窗口永久的,所以你不能隐藏?

Is there any way to make the InfoWindow permanent so you can't hide it?

我在地图上禁用了所有的手势,但信息窗口,当你点击还是消失了。

I have disabled all gestures in the map, but the InfoWindow still disappears when you tap.

推荐答案

visceralG的解决方案是什么,我会做摆在首位,但也有(未经测试)备选:

visceralG's solution is what I would do in the first place, but there is also (untested) alternative:

  • 在保持一个参考指标显示信息窗口(从 getInfoContents
  • onMapClick 呼叫 markerShowingInfoWindow.showInfoWindow()来迫使它返回
  • 如果以上不工作,把 markerShowingInfoWindow.showInfoWindow() Runnable.run()和与处理程序查看
  • 张贴
  • keep a reference to marker showing info window (from getInfoContents)
  • in onMapClick call markerShowingInfoWindow.showInfoWindow() to force it back
  • if the above doesn't work, put markerShowingInfoWindow.showInfoWindow() inside Runnable.run() and post it with Handler or View

这篇关于Android的谷歌地图V2永久的标记信息窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-15 11:18