labs-postgis-preview
labs-postgis-preview copied to clipboard
Test/Handle Big Requests
What should the app do if the request is too big (so much returned that rendering it in leaflet will be problematic).
Should it just be a row limit with a message saying the response is truncated, or should the API not send anything if it's going to be too big?
My thoughts would be to send a truncated response. Are you familiar with the rendering limits of leaflet? I haven't ran into any yet, but I don't often run massive queries.
AFAIK "thousands" of elements on the map is when leaflet will start to chug. Not sure if truncation is the right approach, I think it should either give you what you asked for or not.
The vector tiles should help with this, but as @paulramsay pointed out on twitter, the table view is the resource hog.
We should add a proper API endpoint for paginated CSV results for the table view.