2013-10-02 41 views
0

谷歌地圖什麼事件名稱觸摸初始化標記,以顯示標題或描述? google.maps.event.addListener(標記, 'touchstart',< < <代碼在這裏:是事件名稱正確 VAR的標記=新google.maps.Marker(的MarkerOptions);'touchstart',<<<代碼這裏:是事件名稱正確的谷歌地圖標記

var infoWindowOptions = { 
    content: content, 
    position: latlong 
}; 

var infoWindow = new google.maps.InfoWindow(infoWindowOptions); 

google.maps.event.addListener(marker, 'touchstart', function(event) { 
    event.stopPropagation(); // 'click touchstart'['click',] 
    event.preventDefault(); 
    if(event.handled !== true) { 
     // Do your magic 
    infoWindow.open(map); 
     event.handled = true; 
    } 
}); 

回答

相關問題