html- / styling of- tooltips in google maps api v3

坚强是说给别人听的谎言 提交于 2019-12-23 13:00:32

问题


I'm trying to work out how Google adds images and styling to their tooltips that appear over markers in google maps.

An example of the desired behaviour can be seen here:

http://maps.google.es/maps?oe=utf-8&q=hotels+in+sydney

If you mouseover one of the hotel markers, you will see different styles (bold text, normal text), paragraphs or line breaks, and images for the star-rating of the hotel. As far as I can see from the docs, these tooltips are created by giving each marker a 'title' attribute... however, any HTML in this attribute is escaped; you might end up with a tooltip that looks like:

<p class="tooltip-text">This doesn't work!</p> <image src="/images/myimage.png" />

... which is not the desired outcome.

Anyone have any ideas?


回答1:


Check out these tools. There's and infobox customization which pretty much replaces the default one but retains all it's properties. Hope it helps!



来源:https://stackoverflow.com/questions/3363323/html-styling-of-tooltips-in-google-maps-api-v3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!