2010-12-22 3 views
2

I initiallize Karte in meiner Anwendung wie folgt aus:Zoom von dbclick Ereignis onmap in Google Maps Version 3

function doLoad() { 
    var parnitha= new google.maps.LatLng(38.155428,23.718739); 
    var myOptions = { 
     zoom:16, 
     mapTypeId: google.maps.MapTypeId.SATELLITE, 
     center: parnitha, 
     disableDefaultUI: true, 
       navigationControl: true, 
       scrollwheel: false, 
       navigationControlOptions: { 
     style: google.maps.NavigationControlStyle.SMALL, 
     position: google.maps.ControlPosition.TOP_LEFT}, 
    } 
    map= new google.maps.Map(document.getElementById("map_canvas"), myOptions); }. 

Mit Doppelklick auf die Karte, es Zoom zu machen, und ich dies nicht wünschen, denn Ich möchte das dbClick-Ereignis aus einem anderen Grund verwenden. Bitte helfen Sie mir, das dbClick-Standardereignis auf der Karte zu entfernen.

Vielen Dank ..

+0

Heute bin ich auch bei diesem seltsamen Problem mit V3. Der Doppelklick wurde nicht durch Methode (google.maps.Map) .setOptions (disableDoubleClickZoom: false) deaktiviert. Ich sollte zu (google.maps.Map) .setOptions (disableDoubleClickZoom: true) wechseln !!! – cavila

Antwort

13

Versuchen disableDoubleClickZoom zu true in der Karte Objekt Optionen einstellen. Es ist auch bei http://code.google.com/apis/maps/documentation/javascript/reference.html

aktualisieren dokumentiert Ihre myOptions wie folgt aussehen Objekt (die erste Option) Hinweis:

var myOptions = { 
    disableDoubleClickZoom: true, 
    zoom:16, 
    mapTypeId: google.maps.MapTypeId.SATELLITE, 
    center: parnitha, 
    disableDefaultUI: true, 
      navigationControl: true, 
      scrollwheel: false, 
      navigationControlOptions: { 
    style: google.maps.NavigationControlStyle.SMALL, 
    position: google.maps.ControlPosition.TOP_LEFT}, 
}