Livemap
This component represents a React Native embed of the IOS and the Android SDK. It allows the developper to interact with it. This document mainly presents the props of the Livemap as well as its methods. To see the source code and an exemple, please check its repository.
Props
Shape
mapConfig
Required: false
Description: Your Livemap config. You have the choice between UFE and emmid mode.
If you don't provide any emmid, the default mode will be UFE.
If you want to display your map via an emmid, your config will need your personal token.
Properties:
name | type | required | description |
---|---|---|---|
ufe | bool | false | a boolean to display in ufe mode |
webappEndpoint | string | false | the Wemap endpoint you want to request |
emmid | number | false | the emmid of your map |
token | string | false | your personal token which is needed if you want to display your map |
Callbacks
prop | default | required | description |
---|---|---|---|
onMapReady | () => {} | false | The map is ready. |
onPinpointOpen | ({ id, name, description, latitude, longitude, external_data }) => {} | false | A pinpoint is opening. |
onPinpointClose | () => {} | false | A pinpoint is closing. |
onUserLogin | () => {} | false | An user log-in. |
onUserLogout | () => {} | false | An user log-out. |
onEventOpen | ({ id }) => {} | false | An event is opening. |
onEventClose | () => {} | false | An event is closing. |
onGuidingStarted | () => {} | false | The navigation started. |
onGuidingStopped | () => {} | false | The navigation stopped. |
Custom
prop | default | required | description |
---|---|---|---|
style | { flex: 1 } | false | By default, your Livemap's instance fill with its container. |
Methods
All the methods of the livemap are available from its reference. For more information see the example.
openEvent
Description: Open an event on the map. This can only be used for maps which use events.
Parameters:
name | type | optional | description |
---|---|---|---|
id | number | false | the id of the event to open |
closeEvent
Description: Close the current opened event. Go to the search view.
openPinpoint
Description: Open a pinpoint on the map.
Parameters:
name | type | optional | description |
---|---|---|---|
id | number | false | the id of the pinpoint to open |
closePinpoint
Description: Close the current opened pinpoint. Go to the search view.
setFilters
Description: Update search filters (dates, tags, text).
Parameters:
name | type | optional | description |
---|---|---|---|
startDate | string | false | start date at YYYY-MM-DD format |
endDate | string | false | end date at YYYY-MM-DD format |
query | string | false | text query |
tags | Array | false | array of string tags |
navigateToPinpoint
Description: Start navigation to a pinpoint. Can be an absolute navigation (start location based on phone sensors) or a relative navigation (given start location & heading). If start location and initialHeading are not provided, the navigation will start with the user location
Parameters:
name | type | optional | description |
---|---|---|---|
id | number | false | the pinpoint id to navigate to |
stopNavigation
Description: Stop the currently running navigation.
signInByToken
Description: Sign in to the UFE with a Wemap token.
Parameters:
name | type | optional | description |
---|---|---|---|
access_token | string | false | the acces_token property of your Wemap token |
refresh_token | string | false | the refresh_token property of your Wemap token |