]> dev.renevier.net Git - syp.git/blob - openlayers/lib/OpenLayers/Control/ZoomToMaxExtent.js
fixes notices
[syp.git] / openlayers / lib / OpenLayers / Control / ZoomToMaxExtent.js
1 /* Copyright (c) 2006-2008 MetaCarta, Inc., published under the Clear BSD
2  * license.  See http://svn.openlayers.org/trunk/openlayers/license.txt for the
3  * full text of the license. */
4
5 /**
6  * @requires OpenLayers/Control.js
7  */
8
9 /**
10  * Class: OpenLayers.Control.ZoomToMaxExtent 
11  * The ZoomToMaxExtent control is a button that zooms out to the maximum
12  * extent of the map. It is designed to be used with a 
13  * <OpenLayers.Control.Panel>.
14  * 
15  * Inherits from:
16  *  - <OpenLayers.Control>
17  */
18 OpenLayers.Control.ZoomToMaxExtent = OpenLayers.Class(OpenLayers.Control, {
19
20     /**
21      * Property: type
22      * {String} The type of <OpenLayers.Control> -- When added to a 
23      *     <Control.Panel>, 'type' is used by the panel to determine how to 
24      *     handle our events.
25      */
26     type: OpenLayers.Control.TYPE_BUTTON,
27     
28     /*
29      * Method: trigger
30      * Do the zoom.
31      */
32     trigger: function() {
33         if (this.map) {
34             this.map.zoomToMaxExtent();
35         }    
36     },
37
38     CLASS_NAME: "OpenLayers.Control.ZoomToMaxExtent"
39 });