BaseMapLayer exaggeration doesn't working on Internet Explorer (Even your sample page)

705
6
Jump to solution
02-06-2018 06:27 AM
TubaKumbara
Occasional Contributor

Hello. I want to add exaggerated elevation layer. But doesn't working on internet explorer.

ArcGIS API for JavaScript Sandbox 

Please check this page on chrome and explorer. Exaggeration does working on chrome but on IE doesn't working.

Thanks inadvance.

0 Kudos
1 Solution

Accepted Solutions
KellyHutchins
Esri Frequent Contributor

Looks like a problem with the sample using a method (forEach) that isn't supported in IE. Can you try switching out the forEach loop in the sample with this and see if it resolves the problem in IE. 

              var i,values= data.values, len = data.values.length;
              for( i=0; i < len; i++){
                var value = values[i] * exaggeration;
                values[i] = value;
              }
              

View solution in original post

6 Replies
RodrigoFelga
New Contributor III

I can reproduce the error here, In IE the console shows error messages for the Tiles

0 Kudos
TubaKumbara
Occasional Contributor

Tile 1,0,0 layer 1/0 error

Tile 1,0,1 layer 1/0 error

.

.

.

i have got same errors

0 Kudos
KellyHutchins
Esri Frequent Contributor

Looks like a problem with the sample using a method (forEach) that isn't supported in IE. Can you try switching out the forEach loop in the sample with this and see if it resolves the problem in IE. 

              var i,values= data.values, len = data.values.length;
              for( i=0; i < len; i++){
                var value = values[i] * exaggeration;
                values[i] = value;
              }
              
TubaKumbara
Occasional Contributor

Thanks for answer. Working good now. 

0 Kudos
TubaKumbara
Occasional Contributor

At this time exaggeration doesn't working in Chrome.

Below code from your samples page working with Chrome only

data.values.forEach(function(value, index, values) {
// each value represents an elevation sample for the
// given pixel position in the tile. Multiply this
// by the exaggeration value
values[index] = value * exaggeration;
});

Below code from Kelly working with IExplorer only

var i,values= data.values, len = data.values.length;
for( i=0; i < len; i++){
var value = values * exaggeration;
values = value;
}

What can we do for solve this problem in both of browsers

Thanks

0 Kudos
KellyHutchins
Esri Frequent Contributor

Just tested it out this morning and the sample works for me on the latest Chrome with the modified loop for IE. Tested using the sandbox version of the code and replacing the loop code with the IE friendly version. 

ArcGIS API for JavaScript Sandbox