Global variables and functions used in the state of each session emulation
Methods
# inner assignVariableParameters(jsonData)
Assign Variable Parameters from JSON file
Parameters:
| Name | Type | Description |
|---|---|---|
jsonData |
JSON
|
JSON Data object |
# inner catchWallsOfMapFeaturesData(mapFeaturesData, geojson_walls, filter_walls_keywords, filter_walls_level) → {Array}
Catch Walls Of Map Features Data array and filter
Parameters:
| Name | Type | Description |
|---|---|---|
mapFeaturesData |
Array
|
Array of Map features |
geojson_walls |
Array
|
Array of Map walls features |
filter_walls_keywords |
Array
|
Array of keywords to filter Map walls features |
filter_walls_level |
Array
|
Array of levels to filter Map walls features |
Array of geojson_walls filtered by arguments keywords and levels
Array
# inner convertDMSLat(lat) → {string}
Convert Latitude from Decimal Degree Format to DMS (Degrees° Minutes' Seconds")
Parameters:
| Name | Type | Description |
|---|---|---|
lat |
number
|
Latitude value where to apply the conversion |
Coverted longitude value to DMS [Degrees° Minutes' Secconds"]
string
# inner convertDMSLng(lng) → {string}
Convert Longitude from Decimal Degree Format to DMS (Degrees° Minutes' Seconds")
Parameters:
| Name | Type | Description |
|---|---|---|
lng |
number
|
Longitude value where to apply the conversion |
Coverted longitude value to DMS [Degrees° Minutes' Secconds"]
string
# inner forwardGeocoder(query, mapFeaturesData) → {Array}
Definition of Geocoder Search Bar
Parameters:
| Name | Type | Description |
|---|---|---|
query |
string
|
Query string to search |
mapFeaturesData |
Array
|
Array of Map features |
Array of queried matching features
Array
# async inner getGeoJsonObject(url) → {JSON}
Return JSON object from given URL sting path
Parameters:
| Name | Type | Description |
|---|---|---|
url |
string
|
URL string path |
GeoJSON Data Object
JSON
# inner getRandomArbitrary(min, max) → {number}
Get a random number between max and min arguments
Parameters:
| Name | Type | Description |
|---|---|---|
min |
number
|
minimum number |
max |
number
|
maximum number |
Math.random() between max and min arguments
number
# inner loadJsonFile(url, callback)
Load a JSON object from the path
Parameters:
| Name | Type | Description |
|---|---|---|
url |
string
|
URL string path |
callback |
XMLHttpRequest
|
Callback function |
# inner removeItemAll(arr, value) → {Array}
Remove all item occurrencies from an array
Parameters:
| Name | Type | Description |
|---|---|---|
arr |
Array
|
Array from where we want remove element |
value |
any
|
Element to be removed |
Argument array without all occurrencies of removed element
Array
# inner removeItemOnce(arr, value) → {Array}
Remove an item occurrency from an array
Parameters:
| Name | Type | Description |
|---|---|---|
arr |
Array
|
Array from where we want remove element |
value |
any
|
Element to be removed |
Argument array without removed element
Array
# inner rescrictTo180Degrees(value) → {number}
Rectrict the value of an angle to be between -180° to 180° (continuous mapping problem)
Parameters:
| Name | Type | Description |
|---|---|---|
value |
number
|
Value where to apply the restriction |
Angle restricted between -180° to 180°
number
# inner toDegreesMinutesAndSeconds(coordinate) → {string}
Conversion of Latitude and Longitude, from Decimal Degrees Format to DMS [Degrees° Minutes' Secconds"]
Parameters:
| Name | Type | Description |
|---|---|---|
coordinate |
number
|
Value where to apply the conversion |
Coverted value to DMS [Degrees° Minutes' Secconds"]
string
Type Definitions
Object
# LongLat
Get bearing between two point locations
Properties:
| Name | Type | Description |
|---|---|---|
Long |
number
|
Longitude value |
Lat |
number
|
Latitude value |