Class MapEditor extends MapEditorViewer

This class performs all the read/write updates on the map

See theMapEditor for the one and only one instance of this class

Source : file core/mapEditor/MapEditor.js at line 62

Constructor

new MapEditor ( )

The constructor

Source : file core/mapEditor/MapEditor.js at line 90

Public methods

addItineraryPointMarker ( objId, latLng )

This method add an itinerary point marker to the map (= a leaflet.circleMarker object). This method is called by the 'additinerarypointmarker' event listener.

Source : file core/mapEditor/MapEditor.js at line 292

Parameters

Name Type Description
objId Number

A unique identifier to attach to the circleMarker

latLng Array of Number

The latitude and longitude of the itinerary point marker

addRectangle ( objId, bounds, properties )

This method add a rectangle to the map. This method is called by the 'addrectangle' event listener.

Source : file core/mapEditor/MapEditor.js at line 347

Parameters

Name Type Description
objId Number

A unique identifier to attach to the rectangle

bounds Array of Array of Number

The lower left and upper right corner of the rectangle

properties LeafletObject

The Leaflet properties of the rectangle

addSearchPointMarker ( objId, latLng, geometry )

This method add an search point marker to the map (= a leaflet.circleMarker object or a polyline, depending of the zoom and the geometry parameter). This method is called by the 'addsearchpointmarker' event listener.

Source : file core/mapEditor/MapEditor.js at line 309

Parameters

Name Type Description
objId Number

A unique identifier to attach to the circleMarker

latLng Array of Number

The latitude and longitude of the search point marker

geometry null or Array of Array of Number

The latitudes and longitudes of the search point marker when a polyline can be showed

addWayPoint ( wayPoint, letter )

This method add a WayPoint to the map. This method is called by the 'addwaypoint' event listener.

Source : file core/mapEditor/MapEditor.js at line 238

Parameters

Name Type Description
wayPoint WayPoint

The wayPoint to add

letter String or Number

The letter or number to show with the WayPoint

removeAllObjects ( )

This method removes all objects from the map. This method is called by the 'removeallobjects' event listener

Source : file core/mapEditor/MapEditor.js at line 221

removeObject ( objId )

This method removes an object from the map. This method is called by the 'removeobject' event listener

Source : file core/mapEditor/MapEditor.js at line 214

Parameters

Name Type Description
objId Number

The objId of the object to remove

setLayer ( layer )

This method changes the background map. This method is called by the 'layerchange' event listener.

Source : file core/mapEditor/MapEditor.js at line 360

Parameters

Name Type Description
layer MapLayer

The layer to set

updateNote ( removedNoteObjId, addedNoteObjId )

This method update a note on the map. This method is also used for removing a note with the addedNoteObjId = INVALID_OBJ_ID. This method is also used for adding a note with the removedNoteObjId = INVALID_OBJ_ID. This method is called by the 'noteupdated' event listener.

Source : file core/mapEditor/MapEditor.js at line 182

Parameters

Name Type Description
removedNoteObjId Number

The objId of the note to remove

addedNoteObjId Number

The objId of the note to add

updateRoute ( removedRouteObjId, addedRouteObjId )

This method update a route on the map. This method is also used for removing a route with the addedRouteObjId = INVALID_OBJ_ID. This method is also used for adding a route with the removedRouteObjId = INVALID_OBJ_ID. This method is called by the 'routeupdated' event listener.

Source : file core/mapEditor/MapEditor.js at line 103

Parameters

Name Type Description
removedRouteObjId Number

The objId of the route to remove

addedRouteObjId Number

The objId of the route to add

updateRouteProperties ( routeObjId )

This method update the properties of a route on the map This method is called by the 'routepropertiesupdated' event listener.

Source : file core/mapEditor/MapEditor.js at line 161

Parameters

Name Type Description
routeObjId Number

The objId of the route to update

Private getters and setters

readonly static get #MARKER_BOUNDS_PRECISION : Number

Simple constant for computing if we add a polyline or a marker for the search

Source : file core/mapEditor/MapEditor.js at line 70

Private methods

#RemoveFromMap ( objId )

Remove a Leaflet object from the map

Source : file core/mapEditor/MapEditor.js at line 77

Parameters

Name Type Description
objId Number

The objId of the object to remove