1
|
/*
|
2
|
License: LGPL as per: http://www.gnu.org/copyleft/lesser.html
|
3
|
$Id$
|
4
|
*/
|
5
|
|
6
|
// Ensure this object's dependancies are loaded.
|
7
|
mapbuilder.loadScript(baseDir+"/widget/WidgetBase.js");
|
8
|
|
9
|
/**
|
10
|
* PanZoomBar - drag, zoom, zoomBar wheelMouse and keyboard events
|
11
|
* @constructor
|
12
|
* @base WidgetBase
|
13
|
* @author Olivier Terral olivier.terralAtgeomatys.fr
|
14
|
* @param widgetNode The widget node from the Config XML file.
|
15
|
* @param model The model for this widget
|
16
|
*/
|
17
|
function PanZoomBar(widgetNode, model) {
|
18
|
// Extend ButtonBase
|
19
|
WidgetBase.apply(this, new Array(widgetNode, model));
|
20
|
|
21
|
this.cursor = 'crosshair';
|
22
|
|
23
|
this.init = function(objRef) {
|
24
|
objRef.model.map.addControl(new OpenLayers.Control.PanZoomBar());
|
25
|
objRef.model.map.addControl(new OpenLayers.Control.Navigation());
|
26
|
objRef.model.map.addControl(new OpenLayers.Control.KeyboardDefaults());
|
27
|
}
|
28
|
|
29
|
this.model.addListener("refresh",this.init, this);
|
30
|
}
|
31
|
|