Class AppLoader

Loader for the app. Load all the json files needed (config, translations, map layers...) and add event listeners to the document

Source : file main/travelNotes/AppLoader.js at line 47

Constructor

new AppLoader ( )

The constructor

Source : file main/travelNotes/AppLoader.js at line 362

Public methods

async loadApp ( )

Load the complete app

Source : file main/travelNotes/AppLoader.js at line 373

Private properties

#errorMessage : String

An error message used when loading the json files

Source : file main/travelNotes/AppLoader.js at line 75

#language : String

The language in the lng parameter of the url

Source : file main/travelNotes/AppLoader.js at line 61

#originAndPath : String

The path of the app + TravelNotes ( first part of the json file names )

Source : file main/travelNotes/AppLoader.js at line 68

#travelUrl : String

The url of the TaN file in the fil parameter of the url

Source : file main/travelNotes/AppLoader.js at line 54

Private methods

async #loadConfig ( )

Loading the config.json file from the server

Source : file main/travelNotes/AppLoader.js at line 129

async #loadJsonFiles ( )

Loading json files from the server

Source : file main/travelNotes/AppLoader.js at line 298

async #loadMapLayers ( layersPromiseResult )

Loading map layers

Source : file main/travelNotes/AppLoader.js at line 278

Parameters

Name Type Description
layersPromiseResult Object

The response of the fetch for the TravelNotesLayers.json file

async #loadNoteDialogConfig ( noteDialogPromiseResult, defaultNoteDialogPromiseResult )

Loading the NoteDialog config

Source : file main/travelNotes/AppLoader.js at line 207

Parameters

Name Type Description
noteDialogPromiseResult Object

The response of the fetch for the TravelNotesNoteDialogXX.json file

defaultNoteDialogPromiseResult Object

The response of the fetch for the TravelNotesNoteDialogEN.json file

async #loadOsmSearchDictionary ( searchDictPromiseResult, defaultSearchDictPromiseResult )

Loading the OsmSearch dictionary

Source : file main/travelNotes/AppLoader.js at line 244

Parameters

Name Type Description
searchDictPromiseResult Object

The response of the fetch for the TravelNotesSearchDictionaryXX.csv file

defaultSearchDictPromiseResult Object

The response of the fetch for the TravelNotesSearchDictionaryEN.csv file

async #loadTranslations ( translationPromiseResult, defaultTranslationPromiseResult )

Loading translations

Source : file main/travelNotes/AppLoader.js at line 172

Parameters

Name Type Description
translationPromiseResult Object

The response of the fetch for the TravelNotesXX.json file

defaultTranslationPromiseResult Object

The response of the fetch for the TravelNotesEN.json file

#loadTravelNotes ( )

Loading theTravelNotes

Source : file main/travelNotes/AppLoader.js at line 337

#readURL ( )

Read the url. Search a 'fil' parameter and a 'lng' parameter in the url.

Source : file main/travelNotes/AppLoader.js at line 81