Google地图标记标题不再显示为悬停时的工具提示 [英] Google Maps Marker title no longer appears as tooltip on hover

查看:77
本文介绍了Google地图标记标题不再显示为悬停时的工具提示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Google地图文档表示添加如果标题属性标记为标记对象,则当用户将鼠标悬停在标记上时,其值将显示为工具提示。这用于完美工作(包括在API的第3版中),但在过去几个月它已停止工作,包括在简单标记示例。我不再在Chrome或Firefox上看到工具提示。



API最近有些事情没有被记录下来吗?我知道我可以使用InfoWindow或 mouseOver 事件,但根据文档,这两者都不是必需的。



您应该始终使用发布版本( https://maps.googleapis.com/maps/api/js? v = 3 )当您在生产环境中使用API​​时,工具提示将与发行版一起工作: http://jsfiddle.net/doktormolle/6kUaU/

Google Maps API问题跟踪器




The Google Maps documentation indicates that adding a title property to a Marker object will result in its value appearing as a tooltip when the user hovers over that Marker. This used to work perfectly (including in v3 of the API), but at some point over the past few months it has stopped working, including on the simple marker example provided in the documentation. I no longer see a tooltip on either Chrome or Firefox.

Has something changed in the API recently that hasn't been documented? I'm aware that I could use an InfoWindow or a mouseOver event, but neither of these should be necessary based on the documentation.

解决方案

The linked example uses the experimental version.

You should always use the release-version( https://maps.googleapis.com/maps/api/js?v=3) when you use the API in production, the tooltip will work with the release-version: http://jsfiddle.net/doktormolle/6kUaU/ .

Possibly related issue in the Google Maps API issue tracker:

这篇关于Google地图标记标题不再显示为悬停时的工具提示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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