如何将react-leaflet弹出指针指向标记?

问题描述 投票:6回答:1

如何使React-Leaflet弹出框上的弹出框上的箭头指向标记,而不是框的右下角,如下图所示?

enter image description here

这是弹出窗口的代码:

<Popup>
  <span>
    <p>Foo</p>
  </span>
</Popup>

我正在使用Popup.js存储库示例文件夹中的react-leaflet代码。在该课程中,我没有看到设置偏移的选项。

即使只是删除向下箭头也可能足够好。

谢谢,

react-leaflet
1个回答
1
投票

你可以用leaflet-popup-tip css类设计小费。根据您的需要,您可以使用css修改位置。

例如隐藏小费

.leaflet-popup-tip {
    display:none;
}
© www.soinside.com 2019 - 2024. All rights reserved.