2
即使在較小的屏幕上 - 初始化,標記,信息氣泡等等,一切有關Google地圖的工作都可以在不同的桌面瀏覽器中正常工作。但在iPhone/iPad上,單擊標記時InfoBubble不會顯示。谷歌地圖的標記不會在iPhone/iPad上顯示InfoBubble
#2經過研究和遵循的各種解決方案:
- Google Map Infowindow not showing properly
- Google Maps API v3: InfoWindow not sizing correctly
- Why does Safari on the iPad not display my marker on an embedded Google Maps page?
- how can i bind touch events for a marker in google maps?
- click event is not working in ipad
問題依然存在。任何人都可以幫忙先進的謝謝!
//set up infobubble
var infowindow = new InfoBubble({
map: map,
maxHeight: 380,
minWidth: 270,
shadowStyle: 0,
pixelOffset: new google.maps.Size(0, 35),
padding: 0,
borderRadius: 0,
arrowSize: 8,
borderWidth: 0,
borderColor: '#fff',
disableAutoPan: true,
hideCloseButton: true,
arrowPosition: 50,
arrowStyle: 0
});
// open infowindow when marker is clicked
var mm=[];
google.maps.event.addListener(marker, 'click', (function(marker, i) {
return function()
{
if(mm !='')
{
mm[0].setVisible(true);
mm=[];
}
mm.push(marker);
marker.setVisible(false);
infowindow.setContent(this.IWcontent);
infowindow.open(map, marker);
}
})(marker, i));