문제

I have some partly transparent tile layers for features on the map that would cost too much runtime performance drawn as vectors.

To order my layers, I use setZIndex on them. But it seems like a constraint that GeoJson layers are drawn on top of tile layers, even if their z index is smaller.

Is this a general limitation in Leaflet and how can I bypass it?

도움이 되었습니까?

해결책 2

The solution is to create a custom map pane, set its z-index to be above the default GeoJSON pane and add the transparent tile layer to it.

다른 팁

This may or may not work but I recently modified the canvas mask plugin :

https://github.com/domoritz/leaflet-maskcanvas

to display approximately 20k+ features in leaflet. Would that work for your purposes?

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top