I have large files (~100mb each) with GeoJSON/TopoJSON data.
These have states and counties boundaries. States layer loads just fine as it doesn't have so much data, but the one with counties just makes page crash in Chrome.
So, files themselves load from network and are parsed properly, but when it comes to putting them on a Leaflet map, it freezes and crashes.
As a solution, I wonder if I can filter features by their coordinates? I can get viewport boundaries of the map.
Are there methods I can filter features with coordinates that are inside some boundaries?
This way I could filter only those that should be rendered in the current view and ignore the rest, then repeat this routine on map/zoom.
TufJSfor all my geospatial calculations onGeoJSON. Check out theinsidefunction: turfjs.org/docs/#inside - shotor