manubb / Leaflet.PixiOverlay

Bring Pixi.js power to Leaflet maps
MIT License
463 stars 85 forks source link

document mandatory maxZoom #61

Closed eric-burel closed 3 years ago

eric-burel commented 3 years ago

I've been surprised by this, it seems that maxZoom is mandatory on the map for the projectionZoom to work, otherwise all points get projected to Infinity (I am in the context of React leaflet).

eric-burel commented 3 years ago

Maybe a better fix would be to make this non mandatory by the way, by setting a reasonnable zoom level if maxZoom is not provided, instead of updating the doc.

manubb commented 3 years ago

Thanks for your PR! I have decided to update the default projectionZoom function so that it returns a reasonable value when map.getMaxZoom() returns Infinity. It is available in leaflet-pixi-overlay@1.8.2 and documented in the README.md file.

eric-burel commented 3 years ago

Tested today, works like a charm, thanks for your reactivity!