I am using sampleTerrain to get data for analysis. Depending on the problem size/range and the terrain level, I can end up calling sampleTerrain with locations spanning thousands of tiles. This can result in net::ERR_INSUFFICIENT_RESOURCES errors for tile requests and undefined data for the corresponding tile requests.
In my experiments, I find that errors occur around the following:
With fresh page, errors occur if data exceeds 5500 tiles
Thereafter, errors occur if data exceeds 7500 tiles
I played with tileCacheSize but that does not seem to have an effect.
Has anyone else dealt with this issue or have advice?
As a work around, I am considering a paging type solution where I first calculate the number of tiles needed for the call, and break up the call if it exceeds that number. I can use code like what is inside sampleTerrain to calculate the number of tiles required for a request.