This module manages MappedIn integration
https://www.mappedin.com/
- Source:
Methods
-
init()
-
Initializes class
- Source:
Fires:
- event:assignListeners()
-
assignListeners()
-
Assigns listeners to events used in this class.
- Source:
Listens to Events:
- event:EVENT_MODEL_READY
- event:EVENT_LANGUAGE_CONFIG_LOADED
- event:EVENT_SET_LANGUAGE
- event:iframe MappedIn web app 'message'
-
sendIframeEvent(sendData)
-
Send event with data to iframe web app
Parameters:
Name Type Description sendDataObject Data to send to iframe
- Source:
Fires:
- event:postMessage
-
getBaseWebAppUrl()
-
Returns the webapp URL
- Source:
Returns:
URL
- Type
- String
-
initWebApp()
-
Initialize iframe web app
- Source:
-
setIframeUrl(config)
-
Sets the iframe web app url
Parameters:
Name Type Description configObject to, location IDs
- Source:
Example
config = { context: "directions", to: location_id } config = { context: "location", location: location_id } -
parseIncomingUrl(url)
-
Parses incoming url from iframe web app and returns it as useful data
Parameters:
Name Type Description urlString - Source:
Returns:
- Type
- Object
Example
{ "_hash": "directions", "_url": "https://app-webmaps-prod-uksouth-001.azurewebsites.net/iframe/index.html?venue=numedia-princess-alexandra#/directions?to=653c557290a8958587cdae90&from=653c5e5790a8958587cdae94", "to": "653c557290a8958587cdae90", "from": "653c5e5790a8958587cdae94" } -
processIframeUrl(urlObj, iframeData)
-
Process the results of the iframe web app URL parsing
Parameters:
Name Type Description urlObjObject Object returned from parseIncomingUrl()
iframeDataObject Data returned from iframe
- Source:
Fires:
- event:EVENT_IHA_UPDATE_QR_CODE
Returns:
- Type
- Object
-
isSdk()
-
Getter if using the MappedIn SDK from project JSON map.mappedin.isUsingSDK
- Source:
Returns:
project JSON map.mappedin.isUsingSDK
- Type
- Boolean
-
initSDK()
-
Initializes MappedIn SDK
- Source:
Fires:
- event:EVENT_MAPPEDIN_SDK_READY
-
initStartingLocation()
-
Initializes starting location based on project JSON map.mappedin.startLocation. Override through index.html data-mappedin-start-loc-id config. Override through map_prsonas_loc_id Prsonas viewer commandline param.
- Source:
-
getLocation(location)
-
Gets MappedIn location object from location ID or name
Parameters:
Name Type Description locationString Location ID or name
- Source:
Returns:
MappedIn location object
- Type
- Object
-
showDirections(location, phraseObj)
-
Show directions to a given location
Parameters:
Name Type Description locationString Location ID or name
phraseObjObject Identifies if this is from speech
- Source:
-
onIframeMsg(iframeData)
-
Handles message object that comes from iframe web app
Parameters:
Name Type Description iframeDataObject - Source:
Fires:
- event:processIframeUrl()
-
onFocus(isFocus)
-
Handles activity when iframe MappedIn web app is in focus
Parameters:
Name Type Description isFocusBoolean - Source:
-
onInitMappedIn()
-
Initializes MappedIn iframe web app and SDK
- Source:
Fires:
- event:initWebApp()
- event:initSDK()
-
onJsonLoaded()
-
Handles private vaiables when project JSON is loaded
- Source: