Skip to content

Commit

Permalink
FCRM-5399 added a commented section that will show the style layers n…
Browse files Browse the repository at this point in the history
…ames in case they change
  • Loading branch information
markfee committed Dec 3, 2024
1 parent 3de221e commit b96280a
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions client/js/defra-map/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,16 +175,13 @@ getDefraMapConfig().then((defraMapConfig) => {
vectorTileLayer.setPaintProperties(styleLayerName, layerPaintProperties)
}
})
// Un comment this section to infer the styleLayers for each vector layer
// They don't seem to be defined anywhere server side, so Paul is anxious that
// they may change when new layers are published.
// const { styleRepository = {} } = vectorTileLayer
// const { layers: styleLayers = [] } = styleRepository
// styleLayers.forEach((styleLayer) => {
// console.log(styleLayer.id)
// const fillColour = paintProperties[styleLayer.id][isDark ? 1 : 0]
// const layerPaintProperties = vectorTileLayer.getPaintProperties(styleLayer.id)
// layerPaintProperties['fill-color'] = fillColour
// layerPaintProperties['fill-opacity'] = 0.75
// // vectorTileLayer.setPaintProperties(styleLayer.id, { 'fill-color': fillColour, 'fill-opacity': 0.75 })
// vectorTileLayer.setPaintProperties(styleLayer.id, layerPaintProperties)
// })
}

Expand Down

0 comments on commit b96280a

Please sign in to comment.