Hi @Gabby_Getz, thanks for the reply.
This post got kind of long so here’s a TL;DR:
(1) A Sandcastle (link too long) that has a hardcoded array of 9000 lat/longs.
(2) This Sandcastle builds a list of 9000 lat/longs.
Both Sandcastles usually work under normal network conditions or seemingly anywhere in the USA via VPN. There are occasional failures.
Sandcastle 1 fails using a VPN through Mexico. Sandcastle 2 works through Mexico.
(2) is always faster than (1), succeed or fail?
Full answer:
I’m building a web app, sampling what I believe is the default Cesium terrain set.
I’ve created a Sandcastle which pretty accurately matches my use-case (Sandcastle 1 above).
In my testing, it is very rare that I run into any issues, the call is normally successful.
If there is a problem, it seems to be directly related to receiving a bunch of errors: “Failed to load resource: net::ERR_INSUFFICIENT_RESOURCES”.
(Note: this pic is from the above Sandcastle under normal network conditions; no VPN.)
I started investigating this problem because a teammate located in Mexico was getting undefined heights consistently. So I setup a VPN (Nord) through Mexico and started seeing the problem consistently.
In my testing today, I haven’t been able to get a successful call through the VPN and am getting results looking like the below picture; many failed calls and an inconsistent amount of undefined heights.
This test took 101 seconds and resulted in 2345 “height: undefined”:
This one took 49 seconds and resulted in 1615 “height: undefined”:
Further testing with a different Sandcastle (Sandcastle 2 above) in which I build a list of lat/longs instead of defining an array in a variable, results in much more consistent successful calls.
Still using the VPN, these calls only take about 5.5 seconds with no undefined heights.
Without VPN or using VPN through USA (Florida, Kansas City, San Francisco) result in successful calls in both Sandcastles. It should be noted that I am located in the USA; may affect speed.
Using a VPN through Mexico fails on the first Sandcastle and succeeds in the second.
That would potentially indicate that specific lat/longs are problematic, but the undefined heights are inconsistent, so probably not.
I’m at a loss. I hope I provided enough material to cover the troubleshooting cases.
Potential Discovery:
While attempting to post this, it kept failing due to length of Sandcastle 1 URL (encoded string including my 9000+ item array).
Cutting down the size of the array passed to sampleTerrainMostDetailed() seems to reduce the likelihood of a failure. It can still take a very long time though.
Success took 33 seconds:
However, this doesn’t explain why Sandcastle 2 is usually successful where Sandcastle 1 fails.