source:
trunk/workshop-routing-foss4g/web/OpenLayers/lib/OpenLayers/Control/ZoomToMaxExtent.js
@
81
Revision 76, 1.1 KB checked in by djay, 12 years ago (diff) | |
---|---|
|
Line | |
---|---|
1 | /* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for |
2 | * full list of contributors). Published under the Clear BSD license. |
3 | * See http://svn.openlayers.org/trunk/openlayers/license.txt for the |
4 | * full text of the license. */ |
5 | |
6 | /** |
7 | * @requires OpenLayers/Control.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, { |
20 | |
21 | /** |
22 | * Property: type |
23 | * {String} The type of <OpenLayers.Control> -- When added to a |
24 | * <Control.Panel>, 'type' is used by the panel to determine how to |
25 | * handle our events. |
26 | */ |
27 | type: OpenLayers.Control.TYPE_BUTTON, |
28 | |
29 | /* |
30 | * Method: trigger |
31 | * Do the zoom. |
32 | */ |
33 | trigger: function() { |
34 | if (this.map) { |
35 | this.map.zoomToMaxExtent(); |
36 | } |
37 | }, |
38 | |
39 | CLASS_NAME: "OpenLayers.Control.ZoomToMaxExtent" |
40 | }); |
Note: See TracBrowser
for help on using the repository browser.