在Google地图中启用可点击的公交站点图标 [英] Enable bus stop icons clickable in Google Maps

查看:123
本文介绍了在Google地图中启用可点击的公交站点图标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Google Map API,我怎样才能设置巴士站图标是可点击的,并在infowindow中显示巴士号码服务?我可以在Google Map网站上看到它已启用。但是,当我使用Map API创建自己的代码时,它似乎默认禁用了它?

Using the Google Map API, how can I set the bus stop icons to be clickable and show the bus number services in an infowindow? I can see in Google Map site, it is enabled. But when I create my own code using the Map API, it seems that this is disabled by default?

如果我没有说清楚,请参阅图像链接。

If I'm not making myself clear, please see image link.

https:// dl.dropbox.com/u/46360728/diff.maps.png

左侧是maps.google.com网站中的地图,而正确的是我的谷歌地图的实施。正如你所看到的,与其他截图不同,我不能点击我的实现的公交站。

On the left is the map in maps.google.com site while on the right is my implementation of Google Maps. As you can see, I can't click the bus station of my implementation unlike with the other screenshot.

任何帮助都将不胜感激。

Any help would be much appreciated.

推荐答案

现在,您无法使其正常工作。这是gmap api中的一个'已知'错误: https:/ /code.google.com/p/gmaps-api-issues/issues/detail?id=145

For now you can't get it to work. It's an 'acknowledged' bug in gmap's api: https://code.google.com/p/gmaps-api-issues/issues/detail?id=145

您会注意到,在他们的正式运输在api网站上展示层代码演示,也没有交互性: https: //developers.google.com/maps/documentation/javascript/examples/layer-transit

You'll notice that in their official transit-layer code demo on the api site, there is also no interactivity: https://developers.google.com/maps/documentation/javascript/examples/layer-transit.

这篇关于在Google地图中启用可点击的公交站点图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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