manubb / Leaflet.PixiOverlay

Bring Pixi.js power to Leaflet maps
MIT License
478 stars 86 forks source link

Unable to render large (~18mb) multipolygon (?) #96

Open hoixw opened 7 months ago

hoixw commented 7 months ago

Hi,

Below I have a topoJSON file that is essentially an inversion of registered land in Cornwall, that is, the unregistered land(ish). For some reason, I cannot display it in PixiOverlay—the website just hangs. Yet, it displays fine if just using the GeoJSON renderer built into Leaflet. It also isn't a code issue on my end, as other files display fine.

My suspicion is that it is an individual, large polygon in the multipolygon that is causing the issues. For some reason—as a result of the process I went through to make the file—a significant portion of the data appears to be in a single, massive polygon. If you explode the multipolygon and remove the largest polygon, it displays fine. Somewhere down the line the sheer size of the polygon causes an error / hang somewhere. I have been unable to figure out where, but do note the identical issue appears in Leaflet.Glify as well, so it may be a WebGL issue(?).

I've attached the file for recreation.

64_valid.topojson.gz

Thanks :)