0

我的标记弹出窗口重叠,使其部分可见。我需要移动上面的弹出窗口。

在此处输入图像描述

在此处输入图像描述

代码:

<Marker
  draggable={draggable}
  eventHandlers={eventHandlers}
  position={position}
  ref={markerRef}
>
  <Popup>
    <span onClick={toggleDraggable}>
      {draggable && <Button>Click Here</Button>}
    </span>
  </Popup>
</Marker>

我也尝试访问弹出组件,但这会破坏弹出窗口。

.leaflet-popup-content-wrapper {
    padding: 1px;
    text-align: left;
    border-radius: 12px;
    margin-bottom: 30px;
}

在此处输入图像描述

4

1 回答 1

1

绕过它的黑客:

.leaflet-popup {
    padding-bottom: 30px; /* adjust as you see fit */
}
于 2021-12-22T06:52:17.277 回答