1
|
/*
|
2
|
License: LGPL as per: http://www.gnu.org/copyleft/lesser.html
|
3
|
$Id: EditPoint.js 3807 2008-01-18 13:57:21Z ahocevar $
|
4
|
*/
|
5
|
|
6
|
// Ensure this object's dependancies are loaded.
|
7
|
mapbuilder.loadScript(baseDir+"/widget/EditButtonBase.js");
|
8
|
|
9
|
/**
|
10
|
* When this button is selected, clicks on the MapPane will add a
|
11
|
* new point to a model.
|
12
|
* Requires an enclosing GML model.
|
13
|
* @constructor
|
14
|
* @base EditButtonBase
|
15
|
* @author Cameron Shorter cameronATshorter.net
|
16
|
* @param widgetNode The node from the Config XML file.
|
17
|
* @param model The ButtonBar widget.
|
18
|
*/
|
19
|
function EditPoint(widgetNode, model) {
|
20
|
// Extend EditButtonBase
|
21
|
EditButtonBase.apply(this, new Array(widgetNode, model));
|
22
|
|
23
|
this.instantiateControl = function(objRef, Control) {
|
24
|
return new Control(objRef.featureLayer, OpenLayers.Handler.Point);
|
25
|
}
|
26
|
}
|