OpenLayers OpenLayers

Changeset 2236

Show
Ignore:
Timestamp:
02/16/07 17:12:22 (2 years ago)
Author:
crschmidt
Message:

Add double click action that zooms in. This mimics the functionality in
the existing mousedefaults, and was reported as being missing by gdavis.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • sandbox/vector/lib/OpenLayers/MouseListener/MouseDefaults.js

    r2171 r2236  
    2121    initialize: function() { 
    2222        OpenLayers.Control.prototype.initialize.apply(this, arguments); 
     23    }, 
     24     
     25    /** 
     26    * @param {Event} evt 
     27    */ 
     28    mouseDblClick: function (evt) { 
     29        var newCenter = this.map.getLonLatFromViewPortPx( evt.xy );  
     30        this.map.setCenter(newCenter, this.map.zoom + 1); 
     31        OpenLayers.Event.stop(evt); 
     32        return false; 
    2333    }, 
    2434