Livemap

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: true
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:

nametyperequireddescription
ufeboolfalsea boolean to display in ufe mode
webappEndpointstringfalsethe Wemap endpoint you want to request
emmidnumberfalsethe emmid of your map
tokenstringfalseyour personal token which is needed if you want to display your map

Callbacks

propdefaultrequireddescription
onMapReady() => {}falseThe map is ready.
onPinpointOpen({ id }) => {}falseA pinpoint is opening.
onPinpointClose() => {}falseA pinpoint is closing.
onUserLogin() => {}falseAn user log-in.
onUserLogout() => {}falseAn user log-out.
onEventOpen({ id }) => {}falseAn event is opening.
onEventClose() => {}falseAn event is closing.
onGuidingStarted() => {}falseThe navigation started.
onGuidingStopped() => {}falseThe navigation stopped.

Custom

propdefaultrequireddescription
style{ flex: 1 }falseBy 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:

nametypeoptionaldescription
idnumberfalsethe 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:

nametypeoptionaldescription
idnumberfalsethe 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:

nametypeoptionaldescription
startDatestringfalsestart date at YYYY-MM-DD format
endDatestringfalseend date at YYYY-MM-DD format
querystringfalsetext query
tagsArrayfalsearray 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:

nametypeoptionaldescription
idnumberfalsethe pinpoint id to navigate to

stopNavigation

Description: Stop the currently running navigation.


signInByToken

Description: Sign in to the UFE with a Wemap token.

Parameters:

nametypeoptionaldescription
access_tokenstringfalsethe acces_token property of your Wemap token
refresh_tokenstringfalsethe refresh_token property of your Wemap token