I have this geojson file(about 60mB) that contains the administrative area boundaries. I want to make a chloropleth and give color based on each geometry properties value and add it to the featureLayer.
Problem is when I try to load the geojson file, it will take a considerable amount of time. I tried tileLayer but using this I can't find a way to change the filling color of the polygons. How can I solve this to make the geojson load faster?
[GIS] Load a really big geojson to a feature layer in leaflet
geojsonleafletmapbox
Related Question
- Leaflet GeoJSON – Loading External GeoJSON File into Leaflet Map
- [GIS] How to load GeoJSON from GeoServer to define a variable in Leaflet
- [GIS] Leaflet GeoJSON style function feature only colors one GeoJSON feature
- [GIS] Geojson taking long time to load in google map from database
- Leaflet – How to Load GeoJSON Polygon Time Series with Leaflet Time Dimension Plugin
Best Answer
You could simplify the file. For this you could use QGIS. One option would be simplifying the lines, but that would probably break topology. Another option, depending on your file, is limiting the number of decimal places. That would reduce file size, but not complexity.
Another option would be using TopoJSON. TopoJSON is perfect for administrative areas because it removes redundant lines (each border will only remain once, while it exists twice in GeoJSON).