单击Android标记Infowindow

时间:2013-10-09 15:26:35

标签: android marker infowindow

嗨我在Android谷歌地图上有关于infowindow的问题。

 @Override
        public View getInfoWindow(Marker arg0) {
            return null;
        }
像这张照片 infowindow with menus

我想在其中制作一个包含其他菜单的信息窗口。当我点击方向然后谷歌地图将出现,如果我点击另一个文本将显示另一个活动。 我知道goole地图javascript的图片

 @Override
        public View getInfoWindow(Marker arg0) {
            return null;
        }

1 个答案:

答案 0 :(得分:1)

这是不可能做到的。

来自文档

The info window that is drawn is not a live view. The view is rendered as an image (using View.draw(Canvas)) at the time it is returned. This means that any subsequent changes to the view will not be reflected by the info window on the map. To update the info window later (for example, after an image has loaded), call showInfoWindow(). Furthermore, the info window will not respect any of the interactivity typical for a normal view such as touch or gesture events. However you can listen to a generic click event on the whole info window as described in the section below.

因此窗口不是活动视图而是图像,您可以做的最好是在单击信息窗口时显示对话框