[ElevayionLayer] Subclassing BaseElevationLayer generates console.error() message

466
1
09-23-2020 02:33 PM
VictorBerchet
Occasional Contributor

My app subclasses the BaseElevationLayer to add altitude exaggeration exactly as in the sandbox example.

If first notice the console errors using my app but they are reproducible with the sandbox example provided you spend some time navigating to places out of the cache (try zoom-in / zoom-out).

You should see some errors in the javascript console:

SceneView.js:3567 Tile 14,5750,8403 layer 0/0 error [tile-map:tile-unavailable]: Tile is not available
SceneView.js:3567 Tile 14,5749,8403 layer 0/0 error [tile-map:tile-unavailable]: Tile is not available
SceneView.js:3567 Tile 15,11500,16806 layer 0/0 error [tile-map:tile-unavailable]: Tile is not available
[...]

I end up getting a lot of those.

They originate from the following code (in the ArcGIS API):

 b.prototype.dataMissing = function(a, b, c) {
   c.notInTilemap || console.error("Tile " + this.lij.toString() + " layer " + b + "/" + a + " error " + c);
   a = this.layerInfo;
   a.dataMissing = !0;
   for (b = 0; b < a.waitingAgents.length; b++)
   a.waitingAgents.dataMiss...

I haven't investigated further as tracing minified code is not fun !

My guess would be that this code is in the BaseElevationLayer but is not in the actual ElevationLayer (as errors are not generated with a vanilla ElevationLayer).

It would be super nice to have a way to disable those errors as they look messy in the javascript console.

It's probably low priority as it doesn't seem to prevent everything else to work as expected.

Thanks !

0 Kudos
1 Reply
VictorBerchet
Occasional Contributor

Hey,

I have seen that the JS API actually has log interceptors. This would be a great solution to disable those annoying log messages if the code was not using a call to console.error().

Do you think there is any chance that those console.error() calls higlighted in my initial message could be replaced by proper log calls that we would be able to filter ? 

Thanks

0 Kudos