Class adf.EditingDrawPointAction
Extends
adf.EditingDrawAction.
Defined in: EditTask.js.
Constructor Attributes | Constructor Name and Description |
---|---|
This Editing Action is used to create point features
Extends adf.EditingDrawAction to take user interaction from the mouse in order to draw point feature
|
Field Attributes | Field Name and Description |
---|---|
Name of this action
|
- Fields borrowed from class adf.EditingDrawAction:
- clickTolerance, fillColor, fillOpacity, isEditing, lineOpacity, snapColor, snapDistance, snapGraphics, snappedPoint, snappedScreenPoint, snapping, snapPoint, snapRequestedPoint, snapSymbol, snapText, snapWidth
- Fields borrowed from class adf.Action:
- cursor, graphicsZIndex, symbol
Method Attributes | Method Name and Description |
---|---|
activate(element, callBack, continuousCallBack, graphicsElement, saveState)
This method activates the action and registers the required event listeners to draw a point.
|
|
Deactivates the event listeners set by this action
|
|
Reactivates the action
|
|
setSnapGraphicsSymbol(symbol)
|
- Methods borrowed from class adf.EditingDrawAction:
- clearSnapGraphics
Class Detail
adf.EditingDrawPointAction()
This Editing Action is used to create point features
Extends adf.EditingDrawAction to take user interaction from the mouse in order to draw point feature
Field Detail
{String}
name
Name of this action
- Default Value:
- "adf.EditingDrawPointAction"
Method Detail
activate(element, callBack, continuousCallBack, graphicsElement, saveState)
This method activates the action and registers the required event listeners to draw a point. The
In
callBack()
function passed to this function will be executed when the onclick
event has been fired.
The callback parametes are an instance of adf.Point representing where the user clicked on the element
and the optional second parameter is a boolean which determines whether this is a map point or a screen point.
When the action sends a map point, the server uses this without any conversions which is more accurate.
The continuousCallback()
function passed to this constructor is executed when the onMouseMove
is
triggered on the element
Node on which this action is attached to. In
continuousCallback()
the action sends snapping request to the server, the server returns a snappedPoint if there is one in Map Coordiantes, this is
used by the Action as is. In a scenarion when the user adds a point feature at this snapped Point itself, this
map coordinate is sent back using the callback()
which was described above
- Parameters:
- {DOMNode} element
- The HTMLElement that is the action's container on which the events are attached
- {Function} callBack
- callback function to be called after action is completed
- {Function} continuousCallBack
- Continuous Callback function is called as the line is being drawn
- {adf.graphics.element} graphicsElement
- Parameter to set Graphics Container for the action.
- {Boolean} saveState
- Should the state of this action be saved by adding to adf.EditingState toolitem collection
deactivate()
Deactivates the event listeners set by this action
reactivate()
Reactivates the action
resetSnappingGraphicsSymbol()
setSnapGraphicsSymbol(symbol)
- Parameters:
- symbol