diff --git a/bundles/framework/publisher2/view/MapLayers/MapLayers.jsx b/bundles/framework/publisher2/view/MapLayers/MapLayers.jsx index 5b13cd6262..e82f0fc8e1 100644 --- a/bundles/framework/publisher2/view/MapLayers/MapLayers.jsx +++ b/bundles/framework/publisher2/view/MapLayers/MapLayers.jsx @@ -32,7 +32,6 @@ const LayerTitle = styled('span')` const LayerContainer = styled('div')` display: flex; flex-direction: column; - margin-top: 20px; `; export const MapLayers = ({ state, controller }) => { @@ -46,49 +45,52 @@ export const MapLayers = ({ state, controller }) => { {layerListPluginEnabled && ( + }> + + {baseLayers.map((layer) => { + const disabled = !layer.isVisible(); + return ( + + {layer.getName()} + {!disabled && ( + } + onClick={() => controller.removeBaseLayer(layer)} + /> + )} + + ) + })} + + {layerListPluginEnabled && baseLayers?.length < 1 && ( + + )} + + )} + }> -

- {baseLayers.map((layer) => { +
+ {layers.map((layer) => { const disabled = !layer.isVisible(); return ( {layer.getName()} - {!disabled && ( - } - onClick={() => controller.removeBaseLayer(layer)} - /> + {!disabled && layerListPluginEnabled && ( + triggerNode.parentElement} title={}> + } + onClick={() => controller.addBaseLayer(layer)} + /> + )} ) })}
- )} - {layerListPluginEnabled && baseLayers?.length < 1 && ( - - )} - -

- {layers.map((layer) => { - const disabled = !layer.isVisible(); - return ( - - {layer.getName()} - {!disabled && layerListPluginEnabled && ( - triggerNode.parentElement} title={}> - } - onClick={() => controller.addBaseLayer(layer)} - /> - - )} - - ) - })} -
- {layers?.length < 1 && ( - - )} + {layers?.length < 1 && ( + + )} +