multiRouter.EditorAddon
- Fields
- Events
- Methods
- Fields details
- Events details
- beforemidpointadd
- beforemidpointdrag
- beforemidpointpinshow
- beforeviapointdrag
- beforeviapointdragstart
- beforeviapointremove
- beforewaypointadd
- beforewaypointdrag
- beforewaypointdragstart
- beforewaypointremove
- midpointadd
- midpointdrag
- midpointdragend
- midpointpinshow
- start
- stop
- viapointdrag
- viapointdragend
- viapointdragstart
- viapointremove
- waypointadd
- waypointdrag
- waypointdragend
- waypointdragstart
- waypointremove
- Methods details
Note
The constructor of the multiRouter.EditorAddon class is hidden, as this class is not intended for autonomous initialization.
Extends ICustomizable, IEventEmitter.
Add-on for the multiroute editor.
Creates an add-on for the multiroute editor.
Fields
Name |
Type |
Description |
Event manager. Inherited from IEventEmitter. |
||
Options manager. Inherited from ICustomizable. |
||
The state manager of the multiroute editor. |
Events
Name |
Description |
Event preceding the "midpointadd" event. Instance of the Event class. Names of fields that are available via the Event.get method:
|
|
The event preceding the "midpointdrag" event. Instance of the Event class. Names of fields that are available via the Event.get method:
|
|
The event preceding the "midpointpinshow" event. Instance of the Event class. Names of fields that are available via the Event.get method:
|
|
The event preceding the "viapointdrag" event. Instance of the Event class. Names of fields that are available via the Event.get method:
|
|
The event preceding the "viapointdragstart" event. Instance of the Event class. Names of fields that are available via the Event.get method:
|
|
The event preceding the "viapointremove" event. Instance of the Event class. Names of fields that are available via the Event.get method:
|
|
Event preceding the "waypointadd" event. Instance of the Event class. Names of fields that are available via the Event.get method:
|
|
The event preceding the "waypointdrag" event. Instance of the Event class. Names of fields that are available via the Event.get method:
|
|
The event preceding the "waypointdragstart" event. Instance of the Event class. Names of fields that are available via the Event.get method:
|
|
The event preceding the "waypointremove" event. Instance of the Event class. Names of fields that are available via the Event.get method:
|
|
Adding a midpoint (intermediate point) to the route. The point type is determined by the value of the midPointsType option. Instance of the Event class. Names of fields that are available via the Event.get method:
|
|
Dragging the added midpoint. Instance of the Event class. Names of fields that are available via the Event.get method:
|
|
End of dragging the added midpoint. Instance of the Event class. |
|
Displaying the draggable placemark when you hover over the active route. Instance of the Event class. Names of fields that are available via the Event.get method:
|
|
Change to the object options. Inherited from ICustomizable. |
|
Enabling the editor. Instance of the Event class. |
|
Disabling the editor. Instance of the Event class. |
|
Throughpoint dragging. Instance of the Event class. Names of fields that are available via the Event.get method:
|
|
End of throughpoint dragging. Instance of the Event class. Names of fields that are available via the Event.get method:
|
|
Start of throughpoint dragging. Instance of the Event class. Names of fields that are available via the Event.get method:
|
|
Deleting a throughpoint. Instance of the Event class. Names of fields that are available via the Event.get method:
|
|
Adding a waypoint. Instance of the Event class. Names of fields that are available via the Event.get method:
|
|
Waypoint dragging. Instance of the Event class. Names of fields that are available via the Event.get method:
|
|
End of waypoint dragging. Instance of the Event class. Names of fields that are available via the Event.get method:
|
|
Start of waypoint dragging. Instance of the Event class. Names of fields that are available via the Event.get method:
|
|
Deleting a waypoint. Instance of the Event class. Names of fields that are available via the Event.get method:
|
Methods
Name |
Returns |
Description |
isActive() |
Boolean |
Returns a flag for whether the editor is currently enabled. |
Enables the editor. |
||
stop() |
Disables the editor. |
Fields details
state
{data.Manager} state
The state manager of the multiroute editor.
Events details
beforemidpointadd
Event preceding the "midpointadd" event. Instance of the Event class. Names of fields that are available via the Event.get method:
- coords: Number[] - Coordinates for adding a midpoint.
- pointType: String - Type ID for the midpoint being added.
- insertIndex: Integer - The insertion index of the midpoint in the set of reference points for the multiroute.
Names of methods that are accessible via Event.callMethod: - setPointType - The method that allows you to set the type of the added point. Takes a string identifier of the type as the argument (see the description of the midPointsType option).
- setInsertIndex - The method that allows you to adjust the insertion index of a midpoint before it is applied. Takes the new index as the argument.
If you call the Event.preventDefault method of this event, the next midpoint to add, as well as the "midpointadd" event, will be canceled.
beforemidpointdrag
The event preceding the "midpointdrag" event. Instance of the Event class. Names of fields that are available via the Event.get method:
- pixelOffset: Number[] - Pixel shift along the axes at the given step.
Names of methods that are accessible via Event.callMethod: - setPixelOffset - This method is for correcting the value of the pixel offset that will actually be applied. It takes an argument with the new pixel offset in the form of an array of two numbers.
If the Event.preventDefault method is called for this event, the subsequent "midpointdrag" event will be canceled.
beforemidpointpinshow
The event preceding the "midpointpinshow" event. Instance of the Event class. Names of fields that are available via the Event.get method:
- pin: Placemark - Reference to the placemark object.
- globalPixels: Number[] - Global pixel coordinates of the placemark.
- segment: multiRouter.driving.Segment - Reference to the segment of the route where the placemark should appear.
If the Event.preventDefault method is called for this event, a subsequent "midpointpinshow" event will be canceled and the placemark will be hidden.
beforeviapointdrag
The event preceding the "viapointdrag" event. Instance of the Event class. Names of fields that are available via the Event.get method:
- pixelOffset: Number[] - Pixel shift along the axes at the given step.
- viaPoint: multiRouter.ViaPoint - A reference to the throughpoint object being dragged.
Names of methods that are accessible via Event.callMethod: - setPixelOffset - This method is for correcting the value of the pixel offset that will actually be applied. It takes an argument with the new pixel offset in the form of an array of two numbers.
If the Event.preventDefault method is called for this event, a subsequent "viapointdrag" event will be canceled.
beforeviapointdragstart
The event preceding the "viapointdragstart" event. Instance of the Event class. Names of fields that are available via the Event.get method:
- domEvent: DomEvent - The source DOM event, if there is one.
- viaPoint: multiRouter.ViaPoint - A reference to the throughpoint object being dragged.
If the Event.preventDefault method is called for this event, any subsequent dragging, as well as the "viapointdragstart" event, will be canceled.
beforeviapointremove
The event preceding the "viapointremove" event. Instance of the Event class. Names of fields that are available via the Event.get method:
- viaPoint: multiRouter.ViaPoint - A reference to the throughpoint object being deleted.
If the Event.preventDefault method is called for this event, deletion of a throughpoint, as well as a subsequent "viapointremove" event, will be canceled.
beforewaypointadd
Event preceding the "waypointadd" event. Instance of the Event class. Names of fields that are available via the Event.get method:
- coords: Number[] - Coordinates of the added waypoint.
Names of methods that are accessible via Event.callMethod: - setCoords - Method that allows you to adjust the coordinates of the waypoint being added. It takes an argument with the new pixel shift in the form of an array of two numbers.
If the Event.preventDefault method is called for this event, addition of a waypoint, as well as a subsequent "waypointadd" event, will be canceled.
beforewaypointdrag
The event preceding the "waypointdrag" event. Instance of the Event class. Names of fields that are available via the Event.get method:
- pixelOffset: Number[] - Pixel shift along the axes at the given step.
- wayPoint: multiRouter.WayPoint - A reference to the waypoint object being dragged.
Names of methods that are accessible via Event.callMethod: - setPixelOffset - This method is for correcting the value of the pixel offset that will actually be applied. It takes an argument with the new pixel offset in the form of an array of two numbers.
If the Event.preventDefault method is called for this event, a subsequent "waypointdrag" event will be canceled.
beforewaypointdragstart
The event preceding the "waypointdragstart" event. Instance of the Event class. Names of fields that are available via the Event.get method:
- domEvent: DomEvent - The source DOM event, if there is one.
- wayPoint: multiRouter.WayPoint - A reference to the waypoint object being dragged.
If the Event.preventDefault method is called for this event, any subsequent dragging, as well as the "waypointdragstart" event, will be canceled.
beforewaypointremove
The event preceding the "waypointremove" event. Instance of the Event class. Names of fields that are available via the Event.get method:
- wayPoint: multiRouter.WayPoint - A reference to the waypoint object being deleted.
If the Event.preventDefault method is called for this event, removal of the waypoint, as well as a subsequent "waypointremove" event, will be canceled.
midpointadd
Adding a midpoint (intermediate point) to the route. The point type is determined by the value of the midPointsType option. Instance of the Event class. Names of fields that are available via the Event.get method:
- coords: Number[] - Coordinates for adding a midpoint.
- pointType: String - Type ID for the midpoint being added.
- insertIndex: Integer - The insertion index of the midpoint in the set of reference points for the multiroute.
midpointdrag
Dragging the added midpoint. Instance of the Event class. Names of fields that are available via the Event.get method:
- pixelOffset: Number[] - Pixel shift along the axes at the given step.
midpointdragend
End of dragging the added midpoint. Instance of the Event class.
midpointpinshow
Displaying the draggable placemark when you hover over the active route. Instance of the Event class. Names of fields that are available via the Event.get method:
- pin: Placemark - Reference to the placemark object.
- globalPixels: Number[] - Global pixel coordinates of the placemark.
- segment: multiRouter.driving.Segment - Reference to the segment of the route where the placemark appeared.
start
Enabling the editor. Instance of the Event class.
stop
Disabling the editor. Instance of the Event class.
viapointdrag
Throughpoint dragging. Instance of the Event class. Names of fields that are available via the Event.get method:
- pixelOffset: Number[] - Pixel shift along the axes at the given step.
- viaPoint: multiRouter.ViaPoint - A reference to the throughpoint object being dragged.
viapointdragend
End of throughpoint dragging. Instance of the Event class. Names of fields that are available via the Event.get method:
- viaPoint: multiRouter.ViaPoint - A reference to the throughpoint object being dragged.
viapointdragstart
Start of throughpoint dragging. Instance of the Event class. Names of fields that are available via the Event.get method:
- domEvent: DomEvent - The source DOM event, if there is one.
- viaPoint: multiRouter.ViaPoint - A reference to the throughpoint object being dragged.
viapointremove
Deleting a throughpoint. Instance of the Event class. Names of fields that are available via the Event.get method:
- viaPoint: multiRouter.ViaPoint - A reference to the deleted throughpoint object.
waypointadd
Adding a waypoint. Instance of the Event class. Names of fields that are available via the Event.get method:
- coords: Number[] - Coordinates of the added waypoint.
waypointdrag
Waypoint dragging. Instance of the Event class. Names of fields that are available via the Event.get method:
- pixelOffset: Number[] - Pixel shift along the axes at the given step.
- wayPoint: multiRouter.WayPoint - A reference to the waypoint object being dragged.
waypointdragend
End of waypoint dragging. Instance of the Event class. Names of fields that are available via the Event.get method:
- wayPoint: multiRouter.WayPoint - A reference to the waypoint object being dragged.
waypointdragstart
Start of waypoint dragging. Instance of the Event class. Names of fields that are available via the Event.get method:
- domEvent: DomEvent - The source DOM event, if there is one.
- wayPoint: multiRouter.WayPoint - A reference to the waypoint object being dragged.
waypointremove
Deleting a waypoint. Instance of the Event class. Names of fields that are available via the Event.get method:
- wayPoint: multiRouter.WayPoint - A reference to the deleted waypoint object.
Methods details
isActive
{Boolean} isActive()
Returns a flag for whether the editor is currently enabled.
start
{} start(state)
Enables the editor.
Parameters:
Parameter |
Default value |
Description |
— |
Type: Object The initial state of the editor. |
* Mandatory parameter/option.
stop
{} stop()
Disables the editor.
Mandatory parameter/option.