0
我正在使用Google Maps API Javascript V3,並且我在Internet Explorer中遇到問題,我的標記圖像未顯示,但根據Adobe Browserlab,其他瀏覽器沒有問題。正在從稱爲「隱藏」的div讀取座標。這裏是我的代碼:Google Maps API標記圖像不在Internet Explorer中顯示
<script type="text/javascript">
function initialize() {
var cent = new google.maps.LatLng([security block]);
var myOptions = {
zoom: 11,
center: cent,
mapTypeId: google.maps.MapTypeId.ROADMAP
}
var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
var locations = document.getElementById("hidden").innerHTML;
var spLocations = locations.split("<br>");
var spLength = (spLocations.length)-1;
var letter = "A";
for(var i=0; i<spLength; i++){
var formLocations = spLocations[i].split(",");
var image = "http://www.google.com/intl/en_ALL/mapfiles/marker_black"+letter+".png";
var myLatLng = new google.maps.LatLng(formLocations[0], formLocations[1]);
var marker = new google.maps.Marker({
position: myLatLng,
icon: image,
map: map
});
letter = String.fromCharCode(letter.charCodeAt() + 1);
}
}
</script>