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 48

Constructor

new NoteEditor ( )

The constructor

Source : file core/NoteEditor.js at line 211

Public getters and setters

readonly get osmSearchNoteDialog : Boolean

Get the status of the osmSearchNoteDialog flag

Source : file core/NoteEditor.js at line 220

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 415

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 233

detachNoteFromRoute ( noteObjId )

This method transform a route note into a travel note.

Source : file core/NoteEditor.js at line 446

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 317

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 359

newRouteNote ( routeObjId, latLng )

This method add a route note.

Source : file core/NoteEditor.js at line 243

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 263

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 281

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 292

Parameters

Name Type Description
latLng Array of Number

The latitude and longitude of the note

newUrlNote ( latLng )

This method add a travel note at the lat and lon given as url parameters

Source : file core/NoteEditor.js at line 303

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 330

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 383

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 465

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 69

#note : Note

The currently created or edited note

Source : file core/NoteEditor.js at line 55

#route : Route

The route to witch the created or edited note is linked

Source : file core/NoteEditor.js at line 62

#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 77

Private methods

#addNote ( )

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

Source : file core/NoteEditor.js at line 83

#newNote ( latLng )

This method construct a new Note object

Source : file core/NoteEditor.js at line 132

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 144

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 116