From 27cd0f08e8851da04196247c40c8f7d51a8ac997 Mon Sep 17 00:00:00 2001 From: stdavis Date: Tue, 12 Sep 2023 10:03:44 -0600 Subject: [PATCH] feat(layer-selector): add string factory support for TileLayer base layers --- packages/layer-selector/src/LayerSelector.jsx | 2 ++ .../src/LayerSelectorWithMap.stories.jsx | 14 +++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/packages/layer-selector/src/LayerSelector.jsx b/packages/layer-selector/src/LayerSelector.jsx index f642b6e2..58961d3c 100644 --- a/packages/layer-selector/src/LayerSelector.jsx +++ b/packages/layer-selector/src/LayerSelector.jsx @@ -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) => { diff --git a/packages/layer-selector/src/LayerSelectorWithMap.stories.jsx b/packages/layer-selector/src/LayerSelectorWithMap.stories.jsx index d8321f1e..9895d233 100644 --- a/packages/layer-selector/src/LayerSelectorWithMap.stories.jsx +++ b/packages/layer-selector/src/LayerSelectorWithMap.stories.jsx @@ -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,