javascript - LeafletJS 处理连续 map 上的标记

标签 javascript angularjs ionic-framework leaflet angular-leaflet-directive

我发现 LeafletJS map 存在一个问题,即该 map 向东和向西是连续(无限)的。但是,它不能正确处理标记位置。当我设置一个标记并将焦点放在该标记上时,我肯定会在正确的位置看到它。但是,当我将 map 绕其轴旋转 1 倍并到达完全相同的位置时,标记不在那里。

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

最佳答案

启用worldCopyJump创建 map 时的选项。

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.

关于javascript - LeafletJS 处理连续 map 上的标记,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38022976/

相关文章:

javascript - 如何使用 Bootstrap 导航列表自动显示/隐藏元素

javascript - 在逗号或空格上匹配正则表达式,但不能同时匹配两者

javascript - 一旦我包含 Controller ,AngularJS 就会停止工作

ionic-framework - 使用 Ionic 2 通过预签名 url 上传到 s3 时出现 SignatureDoesNotMatch 错误

javascript - 将 <选项> 中的文本替换为 <输入>

javascript - AngularJS Controller 函数从未被调用

javascript - IONIC 使用 JSON 格式建议

javascript - Ionic 3,右侧使用网格在 ionic 输入中带有图标

ionic-framework - ion-content 方法 scrollToPoint 不适用于 Ionic 5

javascript - Google map V3 GSize 已更改