Skip to content

Commit

Permalink
feat(layer-selector): add string factory support for TileLayer base l…
Browse files Browse the repository at this point in the history
…ayers
  • Loading branch information
stdavis committed Sep 12, 2023
1 parent 45293b4 commit 27cd0f0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 2 additions & 0 deletions packages/layer-selector/src/LayerSelector.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ import LOD from '@arcgis/core/layers/support/LOD';
import TileInfo from '@arcgis/core/layers/support/TileInfo';
import WebTileLayer from '@arcgis/core/layers/WebTileLayer';
import FeatureLayer from '@arcgis/core/layers/FeatureLayer';
import TileLayer from '@arcgis/core/layers/TileLayer';

const commonFactories = {
FeatureLayer,
WebTileLayer,
TileLayer,
};

const ExpandableContainer = (props) => {
Expand Down
14 changes: 13 additions & 1 deletion packages/layer-selector/src/LayerSelectorWithMap.stories.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,19 @@ const WithMap = ({
quadWord: import.meta.env.VITE_QUAD_WORD,
baseLayers: baseLayers
? baseLayers
: ['Hybrid', 'Lite', 'Terrain', 'Topo', 'Color IR'],
: [
'Hybrid',
'Lite',
'Terrain',
'Topo',
'Color IR',
{
id: 'Vision Refresh Basemap',
Factory: 'TileLayer',
url: 'https://gis.wfrc.org/arcgis/rest/services/WC2050Vision/2023_Vision_Refresh_Basemap/MapServer/',
opacity: 1,
},
],
overlays: overlays ? overlays : ['Address Points'],
position: 'top-right',
showOpacitySlider,
Expand Down

0 comments on commit 27cd0f0

Please sign in to comment.