Google map API marker with letter on map

做~自己de王妃 提交于 2019-11-29 08:48:06

You must use :

http://chart.apis.google.com/chart?chst=d_map_pin_letter&chld=D|00FF00|000000

chld parameter is the letter you want to appear in your marker.
After the pipe, the first RGB code is the color of the marker, the second is the background color of the marker. The last one is optional.

So you can create your marker like this :

var myPin= new google.maps.MarkerImage("http://chart.apis.google.com/chart?chst=d_map_pin_letter&chld=D|00FF00|000000");

and use it like you want !

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