首页 > 解决方案 > 初始化后 GeoJSON 与 Maptiler 层不匹配

问题描述

我的 LeafLet 地图包含一个 GeoJSON 和一个 Maptiler 图层。首先,我设置了我的地图var map = L.map(...)。之后,我添加了我的 GeoJSON 层。然后我通过 AJAX 加载我的地​​图样式,更改其中的一些内容,最后将其添加到地图中。

地图初始化后,两个图层的缩放和平移似乎都不匹配(见图)。

GeoJSON - Maptiler 不匹配

标签: leafletgeojsonmaptiler

解决方案


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.


推荐阅读