Files
openlayers/lib/OpenLayers/Control/ZoomToMaxExtent.js
crschmidt 6194452b8a Since John already went ahead and committed the main change, I'm just going
to finish this one up. All commits are in comments, so a review doesn't seem
strictly neccesary. This closes #918 and fixes all the copyrights that I could 
find in the code.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@3984 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-08-23 11:29:06 +00:00

34 lines
850 B
JavaScript

/* Copyright (c) 2006-2007 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();
}
},
CLASS_NAME: "OpenLayers.Control.ZoomToMaxExtent"
});