Class NoteEditor

This class contains all the needed methods fot Notes creation or modifications See theNoteEditor for the one and only one instance of this class

Source : file core/NoteEditor.js at line 47

Constructor

new NoteEditor ( )

The constructor

Source : file core/NoteEditor.js at line 210

Public getters and setters

readonly get osmSearchNoteDialog : Boolean

Get the status of the osmSearchNoteDialog flag

Source : file core/NoteEditor.js at line 219

Public methods

attachNoteToRoute ( noteObjId )

This method transform a travel note into a route note. The nearest point on a route is selected for the note

Source : file core/NoteEditor.js at line 400

Parameters

Name Type Description
noteObjId Number

The objId of the note

changeOsmSearchNoteDialog ( )

Change the status of the osmSearchNoteDialog flag

Source : file core/NoteEditor.js at line 232

detachNoteFromRoute ( noteObjId )

This method transform a route note into a travel note.

Source : file core/NoteEditor.js at line 431

Parameters

Name Type Description
noteObjId Number

The objId of the note

editNote ( noteObjId )

This method start the edition of a note

Source : file core/NoteEditor.js at line 302

Parameters

Name Type Description
noteObjId Number

The objId of the note to be edited

hideNotes ( )

This method hide all notes on the map. The notes are always visible in the roadbook and UI

Source : file core/NoteEditor.js at line 344

newRouteNote ( routeObjId, latLng )

This method add a route note.

Source : file core/NoteEditor.js at line 242

Parameters

Name Type Description
routeObjId Number

ObjId of the route to witch the note will be attached

latLng Array of Number

The lat and lng of the point selected by the user

newSearchRouteNote ( osmElement )

This method add a route note for a searh result from osm.

Source : file core/NoteEditor.js at line 262

Parameters

Name Type Description
osmElement OsmElement

An object with osm data ( see OsmSearch...)

newSearchTravelNote ( osmElement )

This method add a travel note for a searh result from osm.

Source : file core/NoteEditor.js at line 280

Parameters

Name Type Description
osmElement OsmElement

An object with osm data ( see OsmSearch...)

newTravelNote ( latLng )

This method add a travel note

Source : file core/NoteEditor.js at line 291

Parameters

Name Type Description
latLng Array of Number

The latitude and longitude of the note

removeNote ( noteObjId )

This method remove a note

Source : file core/NoteEditor.js at line 315

Parameters

Name Type Description
noteObjId Number

The objId of the note to be removed

showNotes ( )

This method show all notes on the map.

Source : file core/NoteEditor.js at line 368

travelNoteDropped ( draggedNoteObjId, targetNoteObjId, draggedBefore )

This method is called when a note is dropped in the TravelNotesPaneUI and then notes reordered.

Source : file core/NoteEditor.js at line 450

Parameters

Name Type Description
draggedNoteObjId Number

The objId of the dragged note

targetNoteObjId Number

The objId of the note on witch the drop was executed

draggedBefore Boolean

When true the dragged note is moved before the target note when false after

Private properties

#isNewNote : Boolean

A flag indicating when the note is created or edited

Source : file core/NoteEditor.js at line 68

#note : Note

The currently created or edited note

Source : file core/NoteEditor.js at line 54

#route : Route

The route to witch the created or edited note is linked

Source : file core/NoteEditor.js at line 61

#showSearchNoteDialog : Boolean

A flag indicating when the note dialog is show when creating a search note Must be set to null at the startup because theConfig is perhaps not initialized

Source : file core/NoteEditor.js at line 76

Private methods

#addNote ( )

This method add or update a note to theTravelNotesData and to the map

Source : file core/NoteEditor.js at line 82

#newNote ( latLng )

This method construct a new Note object

Source : file core/NoteEditor.js at line 131

Parameters

Name Type Description
latLng Array of Number

The latitude and longitude of the note

async #newSearchNote ( osmElement )

This method add a note for a searh result from osm.

Source : file core/NoteEditor.js at line 143

Parameters

Name Type Description
osmElement OsmElement

An object with osm data ( see OsmSearch...)

#noteDialog ( )

This method show the Note dialog and then add or update the note

Source : file core/NoteEditor.js at line 115