0
如何顯示特定製造商的信息?如地區,地址,電話等的名稱。 我使用eclipse和庫phonegap,並在我的項目中使用代碼html和jquery。 多個廠商的腳本是這樣的:如何在Google地圖中顯示標記信息?
var ltlng = [];
ltlng.push(new google.maps.LatLng(44.342377, 9.229788));
ltlng.push(new google.maps.LatLng(13.5, 79.2));
ltlng.push(new google.maps.LatLng(15.24, 77.16));
map.setCenter(ltlng[0]);
for (var i = 0; i <= ltlng.length; i++) {
marker = new google.maps.Marker({
map: map,
position: ltlng[i]
});
(function (i, marker) {
google.maps.event.addListener(marker, 'click', function() {
if (!infowindow) {
infowindow = new google.maps.InfoWindow({ content: 'Location info:<br/>Country Name:<br/>LatLng:');
};
infowindow.setContent("Message" + i);
infowindow.open(map, marker);
});
})(i, marker);
};
我嘗試添加代碼就像你發給我的鏈接一樣,但不起作用。 您能否告訴我代碼的哪一部分並在該確切位置替換? 謝謝 – Overnet 2013-04-26 14:11:18