diff options
Diffstat (limited to 'modern/src/map')
-rw-r--r-- | modern/src/map/core/MapView.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modern/src/map/core/MapView.js b/modern/src/map/core/MapView.js index 7ed5eae6..2c49b8ba 100644 --- a/modern/src/map/core/MapView.js +++ b/modern/src/map/core/MapView.js @@ -4,7 +4,7 @@ import React, { useRef, useLayoutEffect, useEffect, useState, } from 'react'; import { SwitcherControl } from '../switcher/switcher'; -import { useAttributePreference } from '../../common/util/preferences'; +import { useAttributePreference, usePreference } from '../../common/util/preferences'; import usePersistedState, { savePersistedState } from '../../common/util/usePersistedState'; import { mapImages } from './preloadImages'; import useMapStyles from './useMapStyles'; @@ -76,7 +76,7 @@ const MapView = ({ children }) => { const mapStyles = useMapStyles(); const activeMapStyles = useAttributePreference('activeMapStyles', 'locationIqStreets,osm,carto'); - const [defaultMapStyle] = usePersistedState('selectedMapStyle', 'locationIqStreets'); + const [defaultMapStyle] = usePersistedState('selectedMapStyle', usePreference('map', 'locationIqStreets')); const mapboxAccessToken = useAttributePreference('mapboxAccessToken'); const maxZoom = useAttributePreference('web.maxZoom'); |