1
|
/*
|
2
|
License: LGPL as per: http://www.gnu.org/copyleft/lesser.html
|
3
|
$Id: Reset.js 2956 2007-07-09 12:17:52Z steven $
|
4
|
*/
|
5
|
|
6
|
// Ensure this object's dependancies are loaded.
|
7
|
mapbuilder.loadScript(baseDir+"/widget/ButtonBase.js");
|
8
|
mapbuilder.loadScript(baseDir+"/util/openlayers/OpenLayers.js");
|
9
|
|
10
|
/**
|
11
|
* Reset button - resets the map to full extent.
|
12
|
* @constructor
|
13
|
* @base ButtonBase
|
14
|
* @author Andreas Hocevar andreas.hocevarATgmail.com
|
15
|
* @param widgetNode The widget node from the Config XML file.
|
16
|
* @param model The model for this widget
|
17
|
*/
|
18
|
function Reset(widgetNode, model) {
|
19
|
|
20
|
this.createControl = function() {
|
21
|
return OpenLayers.Control.ZoomToMaxExtent;
|
22
|
}
|
23
|
|
24
|
// Extend ButtonBase
|
25
|
ButtonBase.apply(this, new Array(widgetNode, model));
|
26
|
}
|
27
|
|