Google Maps Marker title no longer appears as tool

2019-02-23 05:41发布

问题:

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.

回答1:

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:

  • https://code.google.com/p/gmaps-api-issues/issues/detail?id=6931