Per user feedback, this PR adds an optional map legend which will match a list of provided layer IDs with the mapbox style, and populate an element with the layer id (slightly formatted with regex) and a visual that uses the layer type and color to represent the layer depending on whether it is a type: fill, line, or symbol. The component is added to both of the map and alerts dashboard views, and uses a shared function prepareMapLegendLayers in mapFunctions.ts.
Per user feedback, this PR adds an optional map legend which will match a list of provided layer IDs with the mapbox style, and populate an element with the layer
id
(slightly formatted with regex) and a visual that uses the layertype
andcolor
to represent the layer depending on whether it is a type: fill, line, or symbol. The component is added to both of the map and alerts dashboard views, and uses a shared functionprepareMapLegendLayers
inmapFunctions.ts
.