Class EditButtonBase
Object
|
+--WidgetBase
|
+--ButtonBase
|
+--EditButtonBase
-
Direct Known Subclasses:
-
EditPolygon, EditLine, EditPoint, Measurement
- class
EditButtonBase
- extends ButtonBase
Defined in EditButtonBase.js
Author: Cameron Shorter cameronATshorter.net
Field Summary |
Object |
cursor
|
Object |
defaultModelUrl
Empty GML to load when this tool is selected. |
Object |
featureXpath
Reference to GML node to update when a feature is added. |
Object |
trm
|
Constructor Summary |
EditButtonBase
(widgetNode, model)
Base class for tools which update GML by clicking on the mapPane.
|
Method Summary |
void
|
doSelect(objRef, selected)
If tool is selected and the Edit Tool has changed (eg, changed from
LineEdit to PointEdit) then load new default feature.
|
void
|
handleFeatureInsert(feature)
This is called by the OL onFeatureInsert handler.
|
void
|
initButton(objRef)
Create the array that will hold all OL feature layers
for editing buttons.
|
void
|
loadDefaultModel(objRef)
Load the defaultModel into the targetModel.
|
void
|
setEditingLayer(objRef)
Set editing layer and register for editing events in OL,
called after model loads.
|
cursor
Object cursor
defaultModelUrl
Object defaultModelUrl
Empty GML to load when this tool is selected.
featureXpath
Object featureXpath
Reference to GML node to update when a feature is added.
trm
Object trm
EditButtonBase
EditButtonBase(widgetNode, model)
Base class for tools which update GML by clicking on the mapPane.
Parameters:
widgetNode
- The node from the Config XML file.
model
- The ButtonBar widget.
Author: Cameron Shorter cameronATshorter.net
doSelect
void doSelect(objRef, selected)
If tool is selected and the Edit Tool has changed (eg, changed from
LineEdit to PointEdit) then load new default feature.
This function is called when a tool is selected or deselected.
Parameters:
objRef
- Pointer to this object.
selected
- True when selected.
handleFeatureInsert
void handleFeatureInsert(feature)
This is called by the OL onFeatureInsert handler. It will
call the superclass's setFeature() method to handle the
created feature.
Parameters:
feature
- OpenLayers feature
initButton
void initButton(objRef)
Create the array that will hold all OL feature layers
for editing buttons. Also register event handler to
create feature layers when the OL map is available.
Parameters:
objRef
- Pointer to this object.
loadDefaultModel
void loadDefaultModel(objRef)
Load the defaultModel into the targetModel.
setEditingLayer
void setEditingLayer(objRef)
Set editing layer and register for editing events in OL,
called after model loads.
Parameters:
objRef
- Pointer to this object.
Documentation generated by
JSDoc on Tue Aug 21 08:12:28 2007