How to display a label next to a Marker for Google Maps?

后端 未结 6 490
醉酒成梦
醉酒成梦 2020-12-13 07:22

I would like to display a text label next to the markers on google maps. I\'ve used Virtual Earth before and I\'m just starting to use Google Maps. I tried setting the Tit

6条回答
  •  余生分开走
    2020-12-13 07:33

    Here is some sample code which would solve the problem: https://github.com/printercu/google-maps-utility-library-v3-read-only/tree/master/markerwithlabel/examples

    This is a custom class called InfoBox. You can see the API ref on the link above

    The js file can be included from here: https://github.com/printercu/google-maps-utility-library-v3-read-only/blob/master/infobox/src/infobox.js

    Cheers!

提交回复
热议问题