Class WayPointEditor

This class contains methods fot WayPoints creation or modifications See theWayPointEditor for the one and only one instance of this class

Source : file core/WayPointEditor.js at line 43

Constructor

new WayPointEditor ( )

The constructor

Source : file core/WayPointEditor.js at line 117

Public methods

addWayPoint ( latLng )

This method add a WayPoint

Source : file core/WayPointEditor.js at line 126

Parameters

Name Type Description
latLng Array of Number

The latitude and longitude where the WayPoint will be added

addWayPointOnRoute ( initialLatLng, finalLatLng )

This method add a waypoint at a given position on the edited route. It's used to add a WayPoint by dragging

Source : file core/WayPointEditor.js at line 150

Parameters

Name Type Description
initialLatLng Array of Number

The latitude and longitude from witch the WayPoint is coming

finalLatLng Array of Number

The latitude and longitude where the WayPoint will be added

removeWayPoint ( wayPointObjId )

This method remove a WayPoint

Source : file core/WayPointEditor.js at line 211

Parameters

Name Type Description
wayPointObjId Number

The objId of the WayPoint to remove

reverseWayPoints ( )

This method reverse the waypoints order

Source : file core/WayPointEditor.js at line 183

setEndPoint ( latLng )

This method set the ending WayPoint

Source : file core/WayPointEditor.js at line 234

Parameters

Name Type Description
latLng Array of Number

The latitude and longitude where the WayPoint will be added

setStartAndEndPoint ( latLng )

This method set the starting and ending WayPoint

Source : file core/WayPointEditor.js at line 245

Parameters

Name Type Description
latLng Array of Number

The latitude and longitude where the WayPoints will be added

setStartPoint ( latLng )

This method set the starting WayPoint

Source : file core/WayPointEditor.js at line 223

Parameters

Name Type Description
latLng Array of Number

The latitude and longitude where the WayPoint will be added

wayPointDragEnd ( dragEndEvent )

This method is called when a drag of a WayPoint ends on the map

Source : file core/WayPointEditor.js at line 259

Parameters

Name Type Description
dragEndEvent Number

The drag event

wayPointProperties ( wayPointObjId )

This method shows the WayPointPropertiesDialog

Source : file core/WayPointEditor.js at line 273

Parameters

Name Type Description
wayPointObjId Number

The objId of the WayPoint that modify

Private methods

async #renameWayPointWithGeocoder ( wayPoint )

This method rename a WayPoint with data from Nominatim

Source : file core/WayPointEditor.js at line 50

Parameters

Name Type Description
wayPoint WayPoint

The wayPoint to rename

#setEndPoint ( latLng )

This method set the ending WayPoint

Source : file core/WayPointEditor.js at line 100

Parameters

Name Type Description
latLng Array of Number

The latitude and longitude where the WayPoint will be added

#setStartPoint ( latLng )

This method set the starting WayPoint

Source : file core/WayPointEditor.js at line 82

Parameters

Name Type Description
latLng Array of Number

The latitude and longitude where the WayPoint will be added