1
|
/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for
|
2
|
* full list of contributors). Published under the 2-clause BSD license.
|
3
|
* See license.txt in the OpenLayers distribution or repository for the
|
4
|
* full text of the license. */
|
5
|
|
6
|
/**
|
7
|
* @requires OpenLayers/Control/Button.js
|
8
|
*/
|
9
|
|
10
|
/**
|
11
|
* Class: OpenLayers.Control.ZoomToMaxExtent
|
12
|
* The ZoomToMaxExtent control is a button that zooms out to the maximum
|
13
|
* extent of the map. It is designed to be used with a
|
14
|
* <OpenLayers.Control.Panel>.
|
15
|
*
|
16
|
* Inherits from:
|
17
|
* - <OpenLayers.Control>
|
18
|
*/
|
19
|
OpenLayers.Control.ZoomToMaxExtent = OpenLayers.Class(OpenLayers.Control.Button, {
|
20
|
|
21
|
/**
|
22
|
* Method: trigger
|
23
|
*
|
24
|
* Called whenever this control is being rendered inside of a panel and a
|
25
|
* click occurs on this controls element. Actually zooms to the maximum
|
26
|
* extent of this controls map.
|
27
|
*/
|
28
|
trigger: function() {
|
29
|
if (this.map) {
|
30
|
this.map.zoomToMaxExtent();
|
31
|
}
|
32
|
},
|
33
|
|
34
|
CLASS_NAME: "OpenLayers.Control.ZoomToMaxExtent"
|
35
|
});
|