Skip to content

Commit

Permalink
FCRM-5476 Upgrade @defra-map to 0.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
markfee committed Jan 23, 2025
1 parent 1c2e6a4 commit 07c24a5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 17 deletions.
12 changes: 0 additions & 12 deletions client/js/defra-map/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,19 +70,7 @@ const surfaceWaterStyleLayers = [
// 'Risk of Flooding from Surface Water Depth CCSW1 > 1200mm/1'
// ]

const fixLocalStorage = () => {
// Temp fix until 0.5.0
// Map will not load if localStorage basemap is not one of default OR dark
// but 0.3.0 sets the value to 'default,light', which screws up
// the map component after an upgrade to 0.4.0
const basemap = window.localStorage.getItem('basemap')
if (basemap !== 'default' && basemap !== 'dark') {
window.localStorage.removeItem('basemap')
}
}

getDefraMapConfig().then((defraMapConfig) => {
fixLocalStorage() // Temp fix until 0.5.0
const getVectorTileUrl = (layerName) => `${defraMapConfig.agolVectorTileUrl}/${layerName + defraMapConfig.layerNameSuffix}/VectorTileServer`
const getFeatureLayerUrl = (layerName) => `${defraMapConfig.agolServiceUrl}/${layerName}/FeatureServer`
const getModelFeatureLayerUrl = (layerName) => `${defraMapConfig.agolServiceUrl}/${layerName + defraMapConfig.layerNameSuffix}/FeatureServer`
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"@babel/core": "^7.26.0",
"@babel/preset-env": "^7.26.0",
"@babel/preset-react": "^7.25.9",
"@defra/flood-map": "^0.4.0",
"@defra/flood-map": "^0.5.0",
"@esri/arcgis-rest-feature-service": "^4.0.6",
"@esri/arcgis-rest-request": "^4.2.3",
"@hapi/boom": "^9.1.4",
Expand Down

0 comments on commit 07c24a5

Please sign in to comment.