会社のポートフォリオを表示する Google マップ アプリケーションを作成しました。奇妙なことに、私のマーカーは ie8 でのみ表示されます。誰にも解決策がありますか?これはJavaScriptコードです。
var map;
function initialize() {
var myOptions = {
zoom: 6,
mapTypeId: google.maps.MapTypeId.ROADMAP
[arrays with data]
var infoWindow = new google.maps.InfoWindow;
map = new google.maps.Map(document.getElementById('map_canvas'), myOptions);
// Set the center of the map
var pos = new google.maps.LatLng(50.941641437268906, 9.088932512500037);
map.setCenter(pos);
function infoCallback(infowindow, marker) {
return function() {
infowindow.open(map, marker);
};
function setMarkers(map, all) {
for (var i in all) {
var adres = all[i][0];
var name = all[i][1];
var property = all[i][2];
var office = all[i][3];
var warehouse = all[i][4];
var other = all[i][5];
var total = all[i][6];
var parkingspaces = all[i][7];
var yearOfConstruction = all[i][8];
var lat = all[i][9];
var lng = all[i][10];
var latlngset;
latlngset = new google.maps.LatLng(lat, lng);
var marker = new google.maps.Marker({
map: map, title: adres, position: latlngset, icon: image
});
var image = 'images/pandklein.png';
var content = '<div id=content>' +'<img class="thumpnail" src="thumpnail/' + name + '.png" alt ="' + name + '">' + '<div class="map-content"><h3 class="title">' + adres + '</h3>' +
'Lettable floor area (m²):' + "<p class='tekst'>" + total + "</p>" + '<br />' + 'Property:' + ' ' + "<p class='tekst'>" + property + "</p>" +
'<br />' + 'Year of construction:' + ' ' + "<p class='tekst'>" + yearOfConstruction + "</p>" + '</div>';
var infowindow = new google.maps.InfoWindow();
infowindow.setContent(content);
google.maps.event.addListener(
marker,
'click',
infoCallback(infowindow, marker)
);
}
}
// Set all markers in the all variable
setMarkers(map, all);
};
// Initializes the Google Map
google.maps.event.addDomListener(window, 'load', initialize);