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 mapStyles = useMapStyles();
const activeMapStyles = useAttributePreference('activeMapStyles', 'openFreeMap,locationIqStreets,locationIqDark');
const [defaultMapStyle] = usePersistedState('selectedMapStyle', usePreference('map', 'openFreeMap'));
const activeMapStyles = useAttributePreference('activeMapStyles', 'locationIqStreets,locationIqDark,openFreeMap');
const [defaultMapStyle] = usePersistedState('selectedMapStyle', usePreference('map', 'locationIqStreets'));
const mapboxAccessToken = useAttributePreference('mapboxAccessToken');
const maxZoom = useAttributePreference('web.maxZoom');

View File

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

View File

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

View File

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