Leaflet / Leaflet

🍃 JavaScript library for mobile-friendly interactive maps 🇺🇦
https://leafletjs.com
BSD 2-Clause "Simplified" License
40.17k stars 5.75k forks source link

zoom level less than 3 hide the leaflet layer #9327

Closed bondythegreat closed 4 weeks ago

bondythegreat commented 1 month ago

Checklist

Steps to reproduce

  1. zoom out until the zoom value less than 3
  2. the leaflet layer hidden.
  3. zoom in again to 3 and more, leaflet showing

Expected behavior

Im new in the game. I want to have map with graphical info and I try something like the 'from-to' flights. I use maptiler as the map. just realised if it's zoomed out to zoom level less than 3 the leaflet graphical is gone. i try to enforce with setData(mapData) again in the map.addEventListener("moveend", {}) event, but the position is wrong. https://leaflet-zoom-bug.netlify.app/ https://leaflet-zoom-bug-with-zoomend.netlify.app/

expected behaviour: the leaflet layer should be still showing at least in zoom level 1 or 2

Current behavior

when zoomed-out to the zoom level less that 3, leaflet layer hidden

Minimal example reproducing the issue

https://leaflet-zoom-bug-with-zoomend.netlify.app/

Environment

IvanSanchez commented 4 weeks ago

Cannot reproduce. Vector tiles from the maptiler API (through leaflet-maplibre, I guess?) load just fine.