We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 62f09ae + 43be10c commit 5ba66a6Copy full SHA for 5ba66a6
src/components/AzureMap/AzureMap.tsx
@@ -99,11 +99,11 @@ const AzureMap = memo(
99
100
useEffect(() => {
101
if (mapRefSource.current === null) {
102
- if (!options.sessionId) {
+ mapRefSource.current = new atlas.Map(mapId, {
103
+ ...(options || {}),
104
// Assign default session ID with a prefix
- atlas.setSessionId(`react-azure-maps:${Guid.create().toString()}`)
105
- }
106
- mapRefSource.current = new atlas.Map(mapId, options)
+ sessionId: options?.sessionId || `react-azure-maps:${Guid.create().toString()}`
+ })
107
}
108
setMapRef(mapRefSource.current)
109
return () => {
0 commit comments