From d155f711bf9d7a9ec46a1cc3d68d1b7b15b57f56 Mon Sep 17 00:00:00 2001 From: Rodrigo Lago Date: Fri, 14 Nov 2025 09:12:48 +0100 Subject: [PATCH 1/9] Add internal callback to receive MapView messages --- CHANGELOG_UNRELEASED.md | 7 +-- plugin/src/wayfinding/components/MapView.tsx | 50 ++++++++++++++------ 2 files changed, 40 insertions(+), 17 deletions(-) diff --git a/CHANGELOG_UNRELEASED.md b/CHANGELOG_UNRELEASED.md index 4c3882a..12eced5 100644 --- a/CHANGELOG_UNRELEASED.md +++ b/CHANGELOG_UNRELEASED.md @@ -1,8 +1,9 @@ ### Added -- We have added `SitumProvider.apiDomain`. This parameter is useful only in certain scenarios where configuring the Situm's environment is neccessary. +- Added a new callback `onInternalMapViewMessageDelegate` invoked with every MapView message. + It is used internally — no action is required on your side. ### Changed -- We have simplified the autenthication process of our plugin. Use SitumProvider at the root of your app to initialize & set your `SitumProvider.apiKey`. Now this step will prevent you from calling `SitumPlugin.init()` and `SitumPlugin.setApiKey()` methods, and from specifying the `MapViewConfiguration.situmApiKey` to display our map. -- Example app: we have now simplified the authentication process in our example app, using the new `SitumProvider.apiKey`. +- Made WebView message handling more robust with guarded JSON parsing and default fallbacks for + type and payload. This is also an internal change that requires no action on your side. diff --git a/plugin/src/wayfinding/components/MapView.tsx b/plugin/src/wayfinding/components/MapView.tsx index 931420e..35d7399 100644 --- a/plugin/src/wayfinding/components/MapView.tsx +++ b/plugin/src/wayfinding/components/MapView.tsx @@ -154,6 +154,10 @@ export interface MapViewProps { * @param event {@link OnFavoritePoisUpdatedResult} object. */ onFavoritePoisUpdated?: (event: OnFavoritePoisUpdatedResult) => void; + /** + * Internal callback invoked with every MapView message. + */ + onInternalMapViewMessageDelegate?: (type: string, payload: any) => void; } const MapView = React.forwardRef( @@ -168,6 +172,7 @@ const MapView = React.forwardRef( onFloorChanged = () => {}, onExternalLinkClicked = undefined, onFavoritePoisUpdated = () => {}, + onInternalMapViewMessageDelegate = () => {}, }, ref, ) => { @@ -523,8 +528,15 @@ const MapView = React.forwardRef( }, [mapLoaded]); const handleRequestFromViewer = (event: WebViewMessageEvent) => { - const eventParsed = JSON.parse(event.nativeEvent.data); - switch (eventParsed.type) { + let eventParsed: any = {}; + try { + eventParsed = JSON.parse(event.nativeEvent.data); + } catch (err) { + console.warn("Invalid JSON from viewer:", err); + } + const type = eventParsed?.type ?? "message.unknown"; + const payload = eventParsed?.payload ?? {}; + switch (type) { case "app.map_is_ready": init(); setMapLoaded(true); @@ -532,53 +544,63 @@ const MapView = React.forwardRef( onLoad && onLoad(""); break; case "directions.requested": - calculateRoute(eventParsed.payload, _onDirectionsRequestInterceptor); + calculateRoute(payload, _onDirectionsRequestInterceptor); break; case "navigation.requested": - startNavigation(eventParsed.payload, _onDirectionsRequestInterceptor); + startNavigation(payload, _onDirectionsRequestInterceptor); break; case "navigation.stopped": stopNavigation(); break; case "cartography.poi_selected": - onPoiSelected(eventParsed?.payload); + onPoiSelected(payload); break; case "cartography.poi_deselected": - onPoiDeselected(eventParsed?.payload); + onPoiDeselected(payload); break; case "ui.favorite_pois_updated": { const favoritePoisIds = { - currentPoisIdentifiers: eventParsed.payload.favoritePois - ? [...eventParsed.payload.favoritePois] + currentPoisIdentifiers: payload.favoritePois + ? [...payload.favoritePois] : [], }; onFavoritePoisUpdated(favoritePoisIds); break; } case "cartography.floor_selected": - onFloorChanged(eventParsed?.payload); + onFloorChanged(payload); break; case "cartography.building_selected": if ( - !eventParsed.payload.identifier || - eventParsed.payload.identifier.toString() === buildingIdentifier + !payload.identifier || + payload.identifier.toString() === buildingIdentifier ) { return; } else { - setBuildingIdentifier(eventParsed.payload.identifier.toString()); + setBuildingIdentifier(payload.identifier.toString()); } break; case "viewer.navigation.started": case "viewer.navigation.updated": case "viewer.navigation.stopped": - SitumPlugin.updateNavigationState(eventParsed.payload); + SitumPlugin.updateNavigationState(payload); break; case "ui.speak_aloud_text": - SitumPlugin.speakAloudText(eventParsed.payload); + SitumPlugin.speakAloudText(payload); break; default: break; } + // Internal callback that will receive every MapView message. This callback + // has been introduced to enable communication between MapView and the new AR + // module, serving as a direct and extensible mode that avoids the + // intermediation of this plugin. + try { + typeof onInternalMapViewMessageDelegate === "function" && + onInternalMapViewMessageDelegate(type, payload); + } catch (error) { + console.error(`Error delegating ${type}:`, error); + } }; const _onShouldStartLoadWithRequest = (request: any) => { From 7026baee9330354e35474d1ddfdb78a5ce6327d6 Mon Sep 17 00:00:00 2001 From: Rodrigo Lago Date: Fri, 14 Nov 2025 09:13:15 +0100 Subject: [PATCH 2/9] Change version to beta.0 --- plugin/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/package.json b/plugin/package.json index 30232c3..8501a4f 100644 --- a/plugin/package.json +++ b/plugin/package.json @@ -1,6 +1,6 @@ { "name": "@situm/react-native", - "version": "3.17.0", + "version": "3.17.0-beta.0", "description": "Situm Wayfinding for React Native. Integrate plug&play navigation experience with indoor maps, routes and turn-by-turn directions in no time. With the power of Situm.", "repository": "https://github.com/situmtech/react-native", "author": "Situm Technologies ", From 8f778ff6e940f1c8f5ecc23144aabcaeefe6ffe9 Mon Sep 17 00:00:00 2001 From: Rodrigo Lago Date: Fri, 14 Nov 2025 14:08:49 +0100 Subject: [PATCH 3/9] Add new callback with useImperativeHandle instead of props --- example/src/screens/WayfindingScreen.tsx | 15 +++++++-------- plugin/src/wayfinding/components/MapView.tsx | 16 +++++++++------- plugin/src/wayfinding/types/index.ts | 13 +++++++++++++ 3 files changed, 29 insertions(+), 15 deletions(-) diff --git a/example/src/screens/WayfindingScreen.tsx b/example/src/screens/WayfindingScreen.tsx index 6ec4853..2140a49 100644 --- a/example/src/screens/WayfindingScreen.tsx +++ b/example/src/screens/WayfindingScreen.tsx @@ -28,7 +28,6 @@ export const WayfindingScreen: React.FC = () => { if (!mapViewRef) { return; } - setController(mapViewRef.current); }, [mapViewRef]); @@ -36,7 +35,7 @@ export const WayfindingScreen: React.FC = () => { // The "onLoad" callback indicates that the map has been loaded and is // ready to receive calls to perform actions (e.g., selectPoi, navigateToPoi). setMapViewLoaded(true); - console.log("Situm > example > Map is ready, received event: ", event); + console.log("Situm> example> Map is ready, received event: ", event); }; // //////////////////////////////////////////////////////////////////////// @@ -45,33 +44,33 @@ export const WayfindingScreen: React.FC = () => { const onPoiSelected = (event: OnPoiSelectedResult) => { console.log( - "Situm > example > on poi selected detected: " + JSON.stringify(event) + "Situm> example> on poi selected detected: " + JSON.stringify(event) ); }; const onPoiDeselected = (event: OnPoiDeselectedResult) => { console.log( - "Situm > example > on poi deselected detected: " + JSON.stringify(event) + "Situm> example> on poi deselected detected: " + JSON.stringify(event) ); }; const onExternalLinkClicked = (event: OnExternalLinkClickedResult) => { // MapView will open the external link in the system's default browser if this callback is not set. - console.log("Situm > example > click on external link: " + event.url); + console.log("Situm> example> click on external link: " + event.url); }; const onFloorChanged = (event: any) => { - console.log("Situm > example > floor changed to: " + event.identifier); + console.log("Situm> example> floor changed to: " + event.identifier); }; const onFavoritePoisUpdated = (event: any) => { console.log( - "Situm > example > favorite pois updated: " + JSON.stringify(event.pois) + "Situm> example> favorite pois updated: " + JSON.stringify(event.pois) ); }; const onMapError = (error: any) => { - console.error("Situm > example > map error: " + error.message); + console.error("Situm> example> map error: " + error.message); }; // //////////////////////////////////////////////////////////////////////// diff --git a/plugin/src/wayfinding/components/MapView.tsx b/plugin/src/wayfinding/components/MapView.tsx index 35d7399..8e06649 100644 --- a/plugin/src/wayfinding/components/MapView.tsx +++ b/plugin/src/wayfinding/components/MapView.tsx @@ -31,6 +31,7 @@ import { } from "../store"; import { useSelector } from "../store/utils"; import { + OnInternalMapViewMessageDelegate, type CartographySelectionOptions, type MapViewDirectionsOptions, type MapViewError, @@ -154,10 +155,6 @@ export interface MapViewProps { * @param event {@link OnFavoritePoisUpdatedResult} object. */ onFavoritePoisUpdated?: (event: OnFavoritePoisUpdatedResult) => void; - /** - * Internal callback invoked with every MapView message. - */ - onInternalMapViewMessageDelegate?: (type: string, payload: any) => void; } const MapView = React.forwardRef( @@ -172,13 +169,14 @@ const MapView = React.forwardRef( onFloorChanged = () => {}, onExternalLinkClicked = undefined, onFavoritePoisUpdated = () => {}, - onInternalMapViewMessageDelegate = () => {}, }, ref, ) => { const webViewRef = useRef(null); const [_onDirectionsRequestInterceptor, setInterceptor] = useState(); + const internalMessageDelegateRef = + useRef(); // Local states const [mapLoaded, setMapLoaded] = useState(false); @@ -415,6 +413,11 @@ const MapView = React.forwardRef( search(payload): void { _search(payload); }, + onInternalMapViewMessageDelegate( + delegate: OnInternalMapViewMessageDelegate, + ): void { + internalMessageDelegateRef.current = delegate; + }, }; }, [ stopNavigation, @@ -596,8 +599,7 @@ const MapView = React.forwardRef( // module, serving as a direct and extensible mode that avoids the // intermediation of this plugin. try { - typeof onInternalMapViewMessageDelegate === "function" && - onInternalMapViewMessageDelegate(type, payload); + internalMessageDelegateRef.current?.(type, payload); } catch (error) { console.error(`Error delegating ${type}:`, error); } diff --git a/plugin/src/wayfinding/types/index.ts b/plugin/src/wayfinding/types/index.ts index e4007b3..b1013cb 100644 --- a/plugin/src/wayfinding/types/index.ts +++ b/plugin/src/wayfinding/types/index.ts @@ -100,6 +100,12 @@ export interface MapViewRef { * To use it, the feature 'Find My Car' must be enabled. */ navigateToCar: (params?: NavigateToCarPayload) => void; + /** + * Internal callback invoked with every MapView message. + */ + onInternalMapViewMessageDelegate: ( + delegate: OnInternalMapViewMessageDelegate, + ) => void; } export interface WayfindingResult { @@ -145,6 +151,13 @@ export interface OnDirectionsRequestInterceptor { (directionRequest: DirectionsRequest): void; } +/** + * Represents a message from the map viewer. + */ +export interface OnInternalMapViewMessageDelegate { + (type: string, payload: any): void; +} + export interface OnExternalLinkClickedResult { url: string; } From 2c25ab8df2505782ed01d71b9fec7120cd27ca49 Mon Sep 17 00:00:00 2001 From: Rodrigo Lago Date: Fri, 14 Nov 2025 14:09:22 +0100 Subject: [PATCH 4/9] Update version to beta.1 --- plugin/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/package.json b/plugin/package.json index 8501a4f..b2a4775 100644 --- a/plugin/package.json +++ b/plugin/package.json @@ -1,6 +1,6 @@ { "name": "@situm/react-native", - "version": "3.17.0-beta.0", + "version": "3.17.0-beta.1", "description": "Situm Wayfinding for React Native. Integrate plug&play navigation experience with indoor maps, routes and turn-by-turn directions in no time. With the power of Situm.", "repository": "https://github.com/situmtech/react-native", "author": "Situm Technologies ", From 845abe9cfd0525ff2dda803bff85473b175cfdb1 Mon Sep 17 00:00:00 2001 From: Rodrigo Lago Date: Tue, 30 Dec 2025 12:37:46 +0100 Subject: [PATCH 5/9] feat: send deviceId on map-is-ready. --- plugin/package.json | 2 +- plugin/src/wayfinding/components/MapView.tsx | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/plugin/package.json b/plugin/package.json index 2ce689a..eabfbd9 100644 --- a/plugin/package.json +++ b/plugin/package.json @@ -1,6 +1,6 @@ { "name": "@situm/react-native", - "version": "3.17.0-beta.2", + "version": "3.17.0", "description": "Situm Wayfinding for React Native. Integrate plug&play navigation experience with indoor maps, routes and turn-by-turn directions in no time. With the power of Situm.", "repository": "https://github.com/situmtech/react-native", "author": "Situm Technologies ", diff --git a/plugin/src/wayfinding/components/MapView.tsx b/plugin/src/wayfinding/components/MapView.tsx index 2968da0..e6e079c 100644 --- a/plugin/src/wayfinding/components/MapView.tsx +++ b/plugin/src/wayfinding/components/MapView.tsx @@ -519,7 +519,7 @@ const MapView = React.forwardRef( ViewerMapper.initialConfiguration(style), ); - _disableInternalWebViewTTSEngine(); + _sendViewerConfigItems(); } }, [webViewRef, mapLoaded, style]); @@ -685,11 +685,15 @@ const MapView = React.forwardRef( return finalBuildingIdentifier; }, [configuration.buildingIdentifier]); - const _disableInternalWebViewTTSEngine = () => { + const _sendViewerConfigItems = async () => { + const deviceId = await SitumPlugin.getDeviceId(); sendMessageToViewer( webViewRef.current, ViewerMapper.setConfigItems([ + // Disable webview TTS in embed mode: { key: "internal.tts.engine", value: "mobile" }, + // Device ID: + { key: "internal.deviceId", value: deviceId || "" }, ]), ); }; From aa90665eede967191ac90b662fefa56b518bced9 Mon Sep 17 00:00:00 2001 From: Rodrigo Lago Date: Tue, 30 Dec 2025 12:41:17 +0100 Subject: [PATCH 6/9] docs: Update CHANGELOG_UNRELEASED --- CHANGELOG_UNRELEASED.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG_UNRELEASED.md b/CHANGELOG_UNRELEASED.md index 12eced5..5e5b6a4 100644 --- a/CHANGELOG_UNRELEASED.md +++ b/CHANGELOG_UNRELEASED.md @@ -7,3 +7,4 @@ - Made WebView message handling more robust with guarded JSON parsing and default fallbacks for type and payload. This is also an internal change that requires no action on your side. +- Now the MapView receives the `deviceId` from the underlying SDK. From e77418d2f8327e2215e8d1373dd0faa3f6343347 Mon Sep 17 00:00:00 2001 From: Rodrigo Lago Date: Tue, 30 Dec 2025 12:43:26 +0100 Subject: [PATCH 7/9] refactor: restore version --- example/ios/Podfile.lock | 10 +++++----- plugin/package.json | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 85e78d5..c876a33 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -1681,7 +1681,7 @@ PODS: - React-logger (= 0.79.1) - React-perflogger (= 0.79.1) - React-utils (= 0.79.1) - - ReactNativeSitumPlugin (3.15.19): + - ReactNativeSitumPlugin (3.17.2): - DoubleConversion - glog - hermes-engine @@ -1705,7 +1705,7 @@ PODS: - ReactCodegen - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - - SitumSDK (= 3.34.6) + - SitumSDK (= 3.34.10) - Yoga - RNScreens (4.11.1): - DoubleConversion @@ -1756,7 +1756,7 @@ PODS: - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - Yoga - - SitumSDK (3.34.6): + - SitumSDK (3.34.10): - Protobuf (~> 3.18) - SSZipArchive (~> 2.4) - SocketRocket (0.7.1) @@ -2075,10 +2075,10 @@ SPEC CHECKSUMS: ReactAppDependencyProvider: f3426eaf6dabae0baec543cd7bac588b6f59210c ReactCodegen: 3288d61658273d72fbd348a74b59710b9790615f ReactCommon: 9f975582dc535de1de110bdb46d4553140a77541 - ReactNativeSitumPlugin: 9919bc4478237cf3d704bd4ca958d9baa403fd37 + ReactNativeSitumPlugin: c0f365b20d0368473061abf31fa649417a98a647 RNScreens: 3dbce61975990754e4eadd42e9155d327c3445e7 RNVectorIcons: ae8e1b95f3468a360896c6242d61885efcc64241 - SitumSDK: 218abb3562cc500e638c90e68c4db7e8212c13ef + SitumSDK: de58cad6f48b83451f820452e57f1586ab8b9d2a SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748 SSZipArchive: fe6a26b2a54d5a0890f2567b5cc6de5caa600aef Yoga: d15f5aa644c466e917569ac43b19cbf17975239a diff --git a/plugin/package.json b/plugin/package.json index eabfbd9..28e375b 100644 --- a/plugin/package.json +++ b/plugin/package.json @@ -1,6 +1,6 @@ { "name": "@situm/react-native", - "version": "3.17.0", + "version": "3.17.2", "description": "Situm Wayfinding for React Native. Integrate plug&play navigation experience with indoor maps, routes and turn-by-turn directions in no time. With the power of Situm.", "repository": "https://github.com/situmtech/react-native", "author": "Situm Technologies ", From 45b2099da8a935752052f56fb2c3c9f67a9f9ea1 Mon Sep 17 00:00:00 2001 From: Rodrigo Lago Date: Tue, 30 Dec 2025 13:47:34 +0100 Subject: [PATCH 8/9] refactor: Rename callback --- CHANGELOG_UNRELEASED.md | 2 +- plugin/src/wayfinding/components/MapView.tsx | 12 ++++++------ plugin/src/wayfinding/types/index.ts | 9 +++++---- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/CHANGELOG_UNRELEASED.md b/CHANGELOG_UNRELEASED.md index 5e5b6a4..05c1300 100644 --- a/CHANGELOG_UNRELEASED.md +++ b/CHANGELOG_UNRELEASED.md @@ -1,6 +1,6 @@ ### Added -- Added a new callback `onInternalMapViewMessageDelegate` invoked with every MapView message. +- Added a new callback `onInternalMapViewMessageCallback` invoked with every MapView message. It is used internally — no action is required on your side. ### Changed diff --git a/plugin/src/wayfinding/components/MapView.tsx b/plugin/src/wayfinding/components/MapView.tsx index e6e079c..355b76c 100644 --- a/plugin/src/wayfinding/components/MapView.tsx +++ b/plugin/src/wayfinding/components/MapView.tsx @@ -31,7 +31,7 @@ import { } from "../store"; import { useSelector } from "../store/utils"; import { - OnInternalMapViewMessageDelegate, + type OnInternalMapViewMessageCallback, type CartographySelectionOptions, type MapViewDirectionsOptions, type MapViewError, @@ -174,8 +174,8 @@ const MapView = React.forwardRef( const webViewRef = useRef(null); const [_onDirectionsRequestInterceptor, setInterceptor] = useState(); - const internalMessageDelegateRef = - useRef(); + const internalMessageCallbackRef = + useRef(); // Local states const [mapLoaded, setMapLoaded] = useState(false); @@ -413,9 +413,9 @@ const MapView = React.forwardRef( _search(payload); }, onInternalMapViewMessageDelegate( - delegate: OnInternalMapViewMessageDelegate, + delegate: OnInternalMapViewMessageCallback, ): void { - internalMessageDelegateRef.current = delegate; + internalMessageCallbackRef.current = delegate; }, }; }, [ @@ -598,7 +598,7 @@ const MapView = React.forwardRef( // module, serving as a direct and extensible mode that avoids the // intermediation of this plugin. try { - internalMessageDelegateRef.current?.(type, payload); + internalMessageCallbackRef.current?.(type, payload); } catch (error) { console.error(`Error delegating ${type}:`, error); } diff --git a/plugin/src/wayfinding/types/index.ts b/plugin/src/wayfinding/types/index.ts index b1013cb..aba9ac2 100644 --- a/plugin/src/wayfinding/types/index.ts +++ b/plugin/src/wayfinding/types/index.ts @@ -103,8 +103,8 @@ export interface MapViewRef { /** * Internal callback invoked with every MapView message. */ - onInternalMapViewMessageDelegate: ( - delegate: OnInternalMapViewMessageDelegate, + onInternalMapViewMessageCallback: ( + delegate: OnInternalMapViewMessageCallback, ) => void; } @@ -152,9 +152,10 @@ export interface OnDirectionsRequestInterceptor { } /** - * Represents a message from the map viewer. + * Represents an internal callback that will receive messages from the MapView. + * For internal use only. */ -export interface OnInternalMapViewMessageDelegate { +export interface OnInternalMapViewMessageCallback { (type: string, payload: any): void; } From d5ba5258f26c9b92af329fa538e21368697dba28 Mon Sep 17 00:00:00 2001 From: Rodrigo Lago Date: Tue, 30 Dec 2025 14:08:39 +0100 Subject: [PATCH 9/9] refactor: Internal callback now lives behind internal interface --- plugin/src/wayfinding/components/MapView.tsx | 9 +++++---- plugin/src/wayfinding/types/index.ts | 12 ++++++++++++ 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/plugin/src/wayfinding/components/MapView.tsx b/plugin/src/wayfinding/components/MapView.tsx index 355b76c..c5a8fb5 100644 --- a/plugin/src/wayfinding/components/MapView.tsx +++ b/plugin/src/wayfinding/components/MapView.tsx @@ -46,6 +46,7 @@ import { type OnPoiDeselectedResult, type OnPoiSelectedResult, type SearchFilter, + type InternalMapViewRef, } from "../types"; import { ErrorName } from "../types/constants"; import { sendMessageToViewer } from "../utils"; @@ -356,7 +357,7 @@ const MapView = React.forwardRef( * onLoad={onLoad} /> */ - useImperativeHandle(ref, () => { + useImperativeHandle(ref, (): InternalMapViewRef => { return { followUser() { _followUser(true); @@ -412,10 +413,10 @@ const MapView = React.forwardRef( search(payload): void { _search(payload); }, - onInternalMapViewMessageDelegate( - delegate: OnInternalMapViewMessageCallback, + onInternalMapViewMessageCallback( + callback: OnInternalMapViewMessageCallback, ): void { - internalMessageCallbackRef.current = delegate; + internalMessageCallbackRef.current = callback; }, }; }, [ diff --git a/plugin/src/wayfinding/types/index.ts b/plugin/src/wayfinding/types/index.ts index aba9ac2..fdfa0c5 100644 --- a/plugin/src/wayfinding/types/index.ts +++ b/plugin/src/wayfinding/types/index.ts @@ -19,6 +19,10 @@ export interface MapViewRef { * @param poiId You can obtain the identifiers of your POIs by retrieving them with [SitumPlugin.fetchIndoorPOIsFromBuilding()](https://developers.situm.com/sdk_documentation/react-native/typedoc/classes/default.html#fetchIndoorPOIsFromBuilding). */ selectPoi: (poiId: number) => void; + /** + * Deselects any selected POI in the MapView's UI. + */ + deselectPoi: () => void; /** * Selects the given POI category and displays the list of POIs that belong to the given category. * Also, the POIs that do not belong to this category will be hidden in the map. @@ -100,8 +104,16 @@ export interface MapViewRef { * To use it, the feature 'Find My Car' must be enabled. */ navigateToCar: (params?: NavigateToCarPayload) => void; +} + +/** + * For internal use only. + * @internal + */ +export interface InternalMapViewRef extends MapViewRef { /** * Internal callback invoked with every MapView message. + * @internal */ onInternalMapViewMessageCallback: ( delegate: OnInternalMapViewMessageCallback,