leaflet - 初始化后 GeoJSON 与 Maptiler 层不匹配
问题描述
我的 LeafLet 地图包含一个 GeoJSON 和一个 Maptiler 图层。首先,我设置了我的地图var map = L.map(...)
。之后,我添加了我的 GeoJSON 层。然后我通过 AJAX 加载我的地图样式,更改其中的一些内容,最后将其添加到地图中。
地图初始化后,两个图层的缩放和平移似乎都不匹配(见图)。
解决方案
I just figured out that the Mapbox-GL-LeafLet-plugin (https://github.com/mapbox/mapbox-gl-leaflet) which is advised by Maptiler, is not working for me.
When I use an open, unstyled TileLayer, the problem is gone.
推荐阅读
- android - 如何为材料设计按钮赋予标题和副标题?
- javascript - 通过ajax发送字节数组
- apache-spark - 如何在 HDP 上的自定义版本中以无头模式运行 spark?
- excel - 如何在golang函数中返回struct duitonary
- html - 在 iFrame 中调整内容(图像、文档、视频)
- python - 尽管使用了适当的输入设备,PyAudio 在录音文件中没有输出
- javascript - 特定索引的 getAll 和键范围的 get 之间的区别
- javascript - 设置值角度材料日期选择器,来自外部输入
- python - 如何在 django 中创建按钮过滤器,而不重新加载页面?
- android - OTP 值发送 API 在浏览器中执行时有效,但在与 android 代码集成时无效