Skip to content

Commit

Permalink
[Map] fix handleMapClick function and get layer name
Browse files Browse the repository at this point in the history
  • Loading branch information
claire2212 committed Nov 17, 2023
1 parent b78b3d2 commit a00e36a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion frontend/src/features/map/BaseMap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ export function BaseMap({ children }: { children: Array<ReactElement<BaseMapChil
layerFilter: layer => {
const typedLayer = layer as VectorLayerWithName

return !!typedLayer.name && SelectableLayers.includes(typedLayer.name)
const layerName = typedLayer.name || typedLayer.get('name')

return !!layerName && SelectableLayers.includes(layerName)
}
}
)
Expand Down

0 comments on commit a00e36a

Please sign in to comment.