Multiple Leaflet TileLayers with extended maxzoom

المشرف العام

Administrator
طاقم الإدارة
I've got 2 layers(for indoor and outdoor) in my web application. If i zoom beyond 19, the indoor layer should be displayed and the outdoor layer tiles will be scaled up, because their maxzoom is 19. This works fine with this js-code:

map = L.map('full-map');tileLayer = L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { maxZoom: 23, maxNativeZoom: 19}).addTo(map);var indoorLayer = L.tileLayer("http://" + SERVER_IP + ":8002/tiles/" + 0 + "/{z}/{x}/{y}.png", { minZoom: 20, maxZoom: 23}).addTo(map);Except this is how it looks when i add the indoor layer to the map: What makes me wonder is how some outdoor tiles are still displayed.

It works perfectly if i don't add the indoor layer to the map:



أكثر...
 
أعلى