Change default map

This commit is contained in:
Anton Tananaev 2024-11-13 09:55:29 -08:00
parent 10577b3b0c
commit 45afb3fe18
4 changed files with 5 additions and 5 deletions

View File

@ -80,8 +80,8 @@ const MapView = ({ children }) => {
const [mapReady, setMapReady] = useState(false); const [mapReady, setMapReady] = useState(false);
const mapStyles = useMapStyles(); const mapStyles = useMapStyles();
const activeMapStyles = useAttributePreference('activeMapStyles', 'openFreeMap,locationIqStreets,locationIqDark'); const activeMapStyles = useAttributePreference('activeMapStyles', 'locationIqStreets,locationIqDark,openFreeMap');
const [defaultMapStyle] = usePersistedState('selectedMapStyle', usePreference('map', 'openFreeMap')); const [defaultMapStyle] = usePersistedState('selectedMapStyle', usePreference('map', 'locationIqStreets'));
const mapboxAccessToken = useAttributePreference('mapboxAccessToken'); const mapboxAccessToken = useAttributePreference('mapboxAccessToken');
const maxZoom = useAttributePreference('web.maxZoom'); const maxZoom = useAttributePreference('web.maxZoom');

View File

@ -108,7 +108,7 @@ const PreferencesPage = () => {
<InputLabel>{t('mapActive')}</InputLabel> <InputLabel>{t('mapActive')}</InputLabel>
<Select <Select
label={t('mapActive')} label={t('mapActive')}
value={attributes.activeMapStyles?.split(',') || ['openFreeMap', 'locationIqStreets', 'locationIqDark']} value={attributes.activeMapStyles?.split(',') || ['locationIqStreets', 'locationIqDark', 'openFreeMap']}
onChange={(e, child) => { onChange={(e, child) => {
const clicked = mapStyles.find((s) => s.id === child.props.value); const clicked = mapStyles.find((s) => s.id === child.props.value);
if (clicked.available) { if (clicked.available) {

View File

@ -102,7 +102,7 @@ const ServerPage = () => {
<InputLabel>{t('mapDefault')}</InputLabel> <InputLabel>{t('mapDefault')}</InputLabel>
<Select <Select
label={t('mapDefault')} label={t('mapDefault')}
value={item.map || 'openFreeMap'} value={item.map || 'locationIqStreets'}
onChange={(e) => setItem({ ...item, map: e.target.value })} onChange={(e) => setItem({ ...item, map: e.target.value })}
> >
{mapStyles.filter((style) => style.available).map((style) => ( {mapStyles.filter((style) => style.available).map((style) => (

View File

@ -187,7 +187,7 @@ const UserPage = () => {
<InputLabel>{t('mapDefault')}</InputLabel> <InputLabel>{t('mapDefault')}</InputLabel>
<Select <Select
label={t('mapDefault')} label={t('mapDefault')}
value={item.map || 'openFreeMap'} value={item.map || 'locationIqStreets'}
onChange={(e) => setItem({ ...item, map: e.target.value })} onChange={(e) => setItem({ ...item, map: e.target.value })}
> >
{mapStyles.filter((style) => style.available).map((style) => ( {mapStyles.filter((style) => style.available).map((style) => (