LeafletJS 处理连续地图上的标记

LeafletJS handle markers on continuous map

我发现 LeafletJS 地图存在一个问题,该地图在东西方连续(无限)。但是,它不能正确处理标记位置。当我设置一个标记并专注于标记时,我肯定会在正确的位置看到它。但是当我将地图绕其轴旋转 1 倍并到达相同位置时,标记不存在。

这是一个问题,例如当有人在洛杉矶向西平移以查看他在澳大利亚悉尼的标记时,标记不会出现。他必须一路向东平移才能看到标记。有什么解决办法吗?

在创建地图时启用 worldCopyJump 选项。

worldCopyJump

Boolean false

With this option enabled, the map tracks when you pan to another "copy" of the world and seamlessly jumps to the original one so that all overlays like markers and vector layers are still visible.