我试图在一张地图上获得多个自定义图标标记。我知道如何制作一个(icon = ...)但我只获得了最后一次......见下图,我创建了标记"测试1","测试2&#34 ;和"测试3"但只有"测试3"出现......
答案 0 :(得分:2)
您可以这样添加:markers=icon:
path_to_the_image |
lat ,
lng
https://maps.googleapis.com/maps/api/staticmap
?center=52.446925,4.815730&zoom=10&size=600x600&maptype=roadmap
&markers=icon:http://cdn2.iconfinder.com/data/icons/integers/60/number-one-32.png|52.373670, 4.896718
&markers=icon:http://cdn2.iconfinder.com/data/icons/integers/60/number-two-32.png|52.489908, 4.658677
&markers=icon:http://cdn2.iconfinder.com/data/icons/integers/60/number-three-32.png|52.553214, 4.673812
&key=API_KEY
希望这有帮助!