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 |
appendOnEdit
Should a new empty feature be appended after creating one? |
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
|
Fields inherited from class ButtonBase |
htmlTagId, panelHtmlTagId, buttonType, olButtonType, action, cursor, selected, control, active, superclass, objRef, panel_div, div
|
Constructor Summary |
EditButtonBase
(widgetNode, model)
Base class for tools which update GML by clicking on the mapPane.
|
Method Summary |
Object
|
createControl(objRef)
OpenLayers DrawFeature control.
|
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
|
newSession(objRef)
start a new editing session
|
void
|
setEditingLayer(objRef)
Set editing layer and register for editing events in OL,
called after model loads.
|
void
|
setFeature(objRef)
Add a geometry to the enclosing GML model.
|
appendOnEdit
Object appendOnEdit
Should a new empty feature be appended after creating one?
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
createControl
Object createControl(objRef)
OpenLayers DrawFeature control.
Parameters:
objRef
- reference to this object.
Returns:
{OpenLayers.Control} class of the OL control.
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.
newSession
void newSession(objRef)
start a new editing session
Parameters:
objRef
- reference to this widget
setEditingLayer
void setEditingLayer(objRef)
Set editing layer and register for editing events in OL,
called after model loads.
Parameters:
objRef
- Pointer to this object.
setFeature
void setFeature(objRef)
Add a geometry to the enclosing GML model.
Parameters:
objRef
- Pointer to this object.
Documentation generated by
JSDoc on Thu Jul 16 13:34:28 2009