git-svn-id: http://svn.openlayers.org/trunk/openlayers@3767 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
34 lines
875 B
JavaScript
34 lines
875 B
JavaScript
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
|
* See http://svn.openlayers.org/trunk/openlayers/repository-license.txt
|
|
* for the full text of the license. */
|
|
|
|
/**
|
|
* @requires OpenLayers/Control.js
|
|
*
|
|
* Class: OpenLayers.Control.ZoomToMaxExtent
|
|
* Imlements a very simple button control. Designed to be used with a
|
|
* <OpenLayers.Control.Panel>.
|
|
*
|
|
* Inherits from:
|
|
* - <OpenLayers.Control>
|
|
*/
|
|
OpenLayers.Control.ZoomToMaxExtent = OpenLayers.Class(OpenLayers.Control, {
|
|
/**
|
|
* Property: type
|
|
* TYPE_BUTTON.
|
|
*/
|
|
type: OpenLayers.Control.TYPE_BUTTON,
|
|
|
|
/*
|
|
* Method: trigger
|
|
* Do the zoom.
|
|
*/
|
|
trigger: function() {
|
|
if (this.map) {
|
|
this.map.zoomToMaxExtent();
|
|
}
|
|
},
|
|
/** @final @type String */
|
|
CLASS_NAME: "OpenLayers.Control.ZoomToMaxExtent"
|
|
});
|