如何使 react-leaflet 弹出窗口的指针指向标记?

How to make pointer of react-leaflet popup point to the marker?

如何让React-Leaflet Popup的弹出框的箭头指向标记,而不是像下图那样指向框的右下角?

这是我的弹出代码:

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

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

即使只是删除那个向下的箭头可能就足够了。

谢谢,

您可以使用 leaflet-popup-tip css class 设置提示样式。根据您的需要,您可以使用 css.

修改位置

例如隐藏小费

.leaflet-popup-tip {
    display:none;
}