【发布时间】:2011-04-14 16:07:59
【问题描述】:
这是一个简单的 Google 地图的绝佳示例: Google Maps JS API v3 - Simple Multiple Marker Example
我正在尝试在此示例中添加为每个制造商分配自定义图标的功能。 给定链接示例:
var locations = [
['Bondi Beach', -33.890542, 151.274856, 4],
['Coogee Beach', -33.923036, 151.259052, 5],
['Cronulla Beach', -34.028249, 151.157507, 3],
['Manly Beach', -33.80010128657071, 151.28747820854187, 2],
['Maroubra Beach', -33.950198, 151.259302, 1] ];
我在想这样的事情:
var locations = [
['Bondi Beach', -33.890542, 151.274856, 4,'images/icon1.png'],
['Coogee Beach', -33.923036, 151.259052, 5,'images/icon2.png' ],
['Cronulla Beach', -34.028249, 151.157507, 3,'images/icon3.png' ],
['Manly Beach', -33.80010128657071, 151.28747820854187, 2,'images/icon4.png' ],
['Maroubra Beach', -33.950198, 151.259302, 1,'images/icon5.png' ] ];
提前感谢您的回答!
【问题讨论】:
标签: javascript google-maps google-maps-api-3