gem.core. App

Members

(static) token

Properties
NameTypeDescription
gem.core.App.tokenstring

App token. Must be set before initApp() call

Methods

(static) checkLocationAccess(funcReturnError)

Checks if location access is granted.

Parameters:
NameTypeDescription
funcReturnErrorfunction

Callback function to handle error.

(static) createCamera(scene) → {Module.MapCamera}

Creates a new camera for the given scene.

Parameters:
NameTypeDescription
sceneobject

The scene for which to create a camera.

Returns:

The created camera.

Type: 
Module.MapCamera

(static) createElementCopyright()

Start the initilization process.Is an async process.Getting the resources. Please use gem.core.App.registerInitialCallFunction before calling this method,if you want to apply settings at application startup.

(static) destroyApp()

Destroy app resources. Should be called at page closing

(static) getBoundingBoxForCoordinates(coordinatesArray) → {gem.core.BoundingBox}

Returns bounding box for an array of coordinates

Parameters:
NameTypeDescription
coordinatesArrayArray.<gem.core.Coordinates>
Returns:
Type: 
gem.core.BoundingBox

(static) getCountryFlagImage(isoCode, bitmap)

Retrieves the image of the country flag based on the ISO code.

Parameters:
NameTypeDescription
isoCodestring

The ISO code of the country.

bitmapgem.core.BitmapContainer

The output bitmap container for the flag image.

(static) getDefaultScene() → {object}

Retrieves the default scene.

Returns:

The default scene.

Type: 
object

(static) getDefaultScreen() → {gem.d3Scene.Screen}

returns the default Screen

Returns:

default Screen

Type: 
gem.d3Scene.Screen

(static) getDistanceBetween2Coordinates(coordinate1, coordinate2) → {number}

Parameters:
NameTypeDescription
coordinate1gem.core.Coordinates
coordinate2gem.core.Coordinates
Returns:
  • returns distance between the 2 coordinates
Type: 
number

(static) getLanguage() → {string}

Retrieves the current language setting.

Returns:

The current language.

Type: 
string

(static) getLastKnownPosition() → {gem.core.Coordinates}

Get Last Known GPS position

Returns:
Type: 
gem.core.Coordinates

(static) getWorldMapVersion() → {string}

Retrieves the version of the world map.

Returns:

The version of the world map.

Type: 
string

(static) initApp(initOptions)

Init App . Mandatory to be called.

Parameters:
NameTypeDescription
initOptionsobject

init options

Properties
NameTypeAttributesDescription
containerstring

container element id

stylestring<optional>

url to map style

centerobject<optional>

map start-up center coordinate of type [latitude, longitude, altitude]

zoomnumber<optional>

map start-up zoom level

(static) initAppScreen(initOptions) → {gem.core.AppScreen}

Init App . Mandatory to be called.

Parameters:
NameTypeDescription
initOptionsobject

init options

Returns:
  • returns AppScreen Object
Type: 
gem.core.AppScreen

(static) registerConnectionStatusChanged(callback)

Register Connection status changed callback

Parameters:
NameTypeDescription
callback*

(static) registerInitialCallFunction(callFunction)

Register initial call function. Must be added before initApp() call

Parameters:
NameTypeDescription
callFunctioncallback

(static) registerPostInitializeCallback(callbackfunction)

Parameters:
NameTypeDescription
callbackfunction*

(static) registerPreRenderCallback(callbackfunction)

Parameters:
NameTypeDescription
callbackfunction*

(static) registerRouteCalculationFromParameters(callFunction)

Register route calculation from url parameters. Must be added before initApp() call

Parameters:
NameTypeDescription
callFunctioncallback

(static) requestLocationAccess()

Requests access to location services.

(static) setCanvas(image_data, width, height, canvas)

Parameters:
NameTypeDescription
image_dataArray.<Byte>

canvas image data

widthnumber

width of canvas

heightnumber

height of canvas

canvasobject

canvas element

(static) setCustomUrl(serviceCode, customURL)

Sets a custom URL for a specific service.

Parameters:
NameTypeDescription
serviceCodestring

The code of the service.

customURLstring

The custom URL to set.

(static) setDefaultStyle(styleFilePath)

Set the path to the style to be used at startup.Must be added before initApp() call

Parameters:
NameTypeDescription
styleFilePathstring

(static) stopLocationAccess()

Stops access to location services.

(static) updateHeader()

Update the url header with informations about location ( lat, lon, z = zoom level )