Files
openlayers/lib/OpenLayers/Control/ZoomToMaxExtent.js
crschmidt 07d333cc79 Tag RC4 release.
git-svn-id: http://svn.openlayers.org/tags/openlayers/release-2.4-rc4@3178 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-05-24 14:55:48 +00:00

25 lines
735 B
JavaScript

/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */
/**
* @class
*
* Imlements a very simple button control.
* @requires OpenLayers/Control.js
*/
OpenLayers.Control.ZoomToMaxExtent = OpenLayers.Class.create();
OpenLayers.Control.ZoomToMaxExtent.prototype =
OpenLayers.Class.inherit( OpenLayers.Control, {
/** @type OpenLayers.Control.TYPE_* */
type: OpenLayers.Control.TYPE_BUTTON,
trigger: function() {
if (this.map) {
this.map.zoomToMaxExtent();
}
},
/** @final @type String */
CLASS_NAME: "OpenLayers.Control.ZoomToMaxExtent"
});