Skip to content

Commit

Permalink
fix(map): set default baseLayer to OSM (#1600)
Browse files Browse the repository at this point in the history
* fix(map): set default baseLayer to OSM

* fix(layerSwitcher): mapbox layers remove
  • Loading branch information
NSUWAL123 authored Jun 27, 2024
1 parent 8a0a78a commit af254a0
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,8 @@ const LayerSwitcherControl = ({ map, visible = 'osm', pmTileLayerData = null })
layers: [
bingMaps(visible),
osm(visible),
mapboxMap(visible),
mapboxOutdoors(visible),
// mapboxMap(visible),
// mapboxOutdoors(visible),
none(visible),
// pmTileLayer(pmTileLayerData, visible),
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ const TaskSubmissionsMap = () => {
width: '100%',
}}
>
<LayerSwitcherControl />
<LayerSwitcherControl visible={'osm'} />
{taskBoundaries && (
<VectorLayer
setStyle={(feature, resolution) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const SubmissionInstanceMap = ({ featureGeojson }) => {
width: '100%',
}}
>
<LayerSwitcherControl />
<LayerSwitcherControl visible={'osm'} />
{featureGeojson?.type && (
<VectorLayer
geojson={featureGeojson}
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/src/components/home/ProjectListMap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ const ProjectListMap = () => {
width: '100%',
}}
>
<LayerSwitcherControl visible={'outdoors'} />
<LayerSwitcherControl visible={'osm'} />
{projectGeojson && projectGeojson?.features?.length > 0 && (
<ClusterLayer
map={map}
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/src/views/EditProjectArea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const EditProjectArea = ({ geojson }) => {
width: '100%',
}}
>
<LayerSwitcherControl />
<LayerSwitcherControl visible={'osm'} />
{geojson && (
<VectorLayer
geojson={geojson}
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/src/views/NewDefineAreaMap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const NewDefineAreaMap = ({
width: '100%',
}}
>
<LayerSwitcherControl />
<LayerSwitcherControl visible={'osm'} />
<MapControlComponent map={map} hasEditUndo={hasEditUndo} />
{splittedGeojson && (
<VectorLayer
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/src/views/ProjectDetailsV2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ const ProjectDetailsV2 = () => {
</div>
)}
<LayerSwitcherControl
visible={customBasemapData ? 'custom' : 'outdoors'}
visible={customBasemapData ? 'custom' : 'osm'}
pmTileLayerData={customBasemapData}
/>

Expand Down

0 comments on commit af254a0

Please sign in to comment.