Hello Community,
Problem Context:
I'm implementing a map-based web application that renders the ship track paths(expedition) data on the Esri Map.
1. I have a backend API that produces GeoJson of the ship expedition contains the coordinate data as a line string.
2. And loading this GeoJson layer on the Map.
Issue:
1. That ship's expedition size is more than 90 MB and it kept increasing in the future. The issue is currently my implementation is taking more than a minute to load the
entire GeoJson on the browser.
So How can I load the ship expedition data dynamically rather than loading the entire GeoJson at the initial load? or How to handle the huge GeoJson (if the size of it is bigger)?
You can see in the below screenshot, GeoJson API is being called at the initial load of the website and takes more than a minute to load the complete GeoJson which has a size of over 90MB.
Solved! Go to Solution.
Are you implementing the backend API for the GeoJSON? When you say it can grow over time, I assume it's pulled directly from a backed db. The only thing you can really do in this case is to enhance your API to do some filtering, maybe by extent or other fields. You can pass custom parameters for something like this.
If it were a static file, there are some caching options depending on your platform, but at the end of the day, 90mb is 90mb, so your best option is to enhance your backend API.
For reference, you can look at how USGS built their API for various formats and filter parameters.
Are you implementing the backend API for the GeoJSON? When you say it can grow over time, I assume it's pulled directly from a backed db. The only thing you can really do in this case is to enhance your API to do some filtering, maybe by extent or other fields. You can pass custom parameters for something like this.
If it were a static file, there are some caching options depending on your platform, but at the end of the day, 90mb is 90mb, so your best option is to enhance your backend API.
For reference, you can look at how USGS built their API for various formats and filter parameters.