﻿/* Copyright (c) 2006-2008 MetaCarta, Inc., published under the Clear BSD
* license.  See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

/**
* @requires OpenLayers/Control.js
* @requires OpenLayers/Handler/Drag.js
*/

/**
* Class: OpenLayers.Control.DragPan
* The DragPan control pans the map with a drag of the mouse.
*
* Inherits from:
*  - <OpenLayers.Control>
*/
OpenLayers.Control.MeasureButton = OpenLayers.Class(OpenLayers.Control, {

    /** 
    * Property: type
    * {OpenLayers.Control.TYPES}
    */
    type: OpenLayers.Control.TYPE_TOOL,

    measure: null,
    
    /**
    * Method: draw
    * Creates a Drag handler, using <panMap> and
    * <panMapDone> as callbacks.
    */
    draw: function() {
        this.handler = new OpenLayers.Handler.Drag(this, {
            "move": this.panMap,
            "done": this.panMapDone
        }, {
            interval: this.interval
        }
        );
    },    

    CLASS_NAME: "OpenLayers.Control.MeasureButton"
});

