From 0aecbc3bf856b17f42e363eff2bac4fb0ce1f7ed Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 11 Jun 2022 16:51:50 -0700 Subject: Preference for map layers --- modern/src/settings/PreferencesPage.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'modern/src/settings') diff --git a/modern/src/settings/PreferencesPage.js b/modern/src/settings/PreferencesPage.js index 0b5cd466..c128e5e4 100644 --- a/modern/src/settings/PreferencesPage.js +++ b/modern/src/settings/PreferencesPage.js @@ -22,6 +22,7 @@ import SettingsMenu from './components/SettingsMenu'; import usePositionAttributes from '../common/attributes/usePositionAttributes'; import { prefixString, unprefixString } from '../common/util/stringUtils'; import SelectField from '../common/components/SelectField'; +import useMapStyles from '../map/core/useMapStyles'; const useStyles = makeStyles((theme) => ({ container: { @@ -42,6 +43,9 @@ const PreferencesPage = () => { const { languages, language, setLanguage } = useLocalization(); const languageList = Object.entries(languages).map((values) => ({ code: values[0], name: values[1].name })); + const mapStyles = useMapStyles(); + const [activeMapStyles, setActiveMapStyles] = usePersistedState('activeMapStyles', ['locationIqStreets', 'osm', 'carto']); + const positionAttributes = usePositionAttributes(t); const [positionItems, setPositionItems] = usePersistedState('positionItems', ['speed', 'address', 'totalDistance', 'course']); @@ -87,6 +91,19 @@ const PreferencesPage = () => { + + {t('mapActive')} + + {t('sharedAttributes')}