下面是一個簡單的谷歌地圖的一個很好的例子: Google Maps JS API v3 - Simple Multiple Marker Example谷歌地圖JS API V3 - 簡單多個標記示例使用自定義標記
我想加入到這個例子,各廠商指定自定義圖標的能力。 鑑於聯例如:
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' ] ];
謝謝您的回答!
歡迎來到SO! – kjy112 2011-04-14 16:25:58