Select to view content in your preferred language

Why is a map image layer causing "Unsupported sub layer type." error in console?

837
3
10-12-2023 02:54 PM
john_cartwright_noaa
Occasional Contributor

Hello All,

I'm using ArcGIS Experience Builder Developer Edition v1.12. Using a web map with a map image layer from a ArcGIS Server hosted map service

is causing a lot of errors like the following to display in the console on load of the map widget:

Unsupported sub layer type. 69

 

Any ideas on why this is or what the impact on the application would be?

 

Thanks!

 

 

 

 

0 Kudos
3 Replies
JeffreyThompson2
MVP Regular Contributor

The number in that error is the sublayer id that is not being supported. Layer 69 on your MapServer is a Raster Layer. The API does not support Raster Layers.

JeffreyThompson2_0-1697199943765.png

The sublayer will not display in its current form and may cause performance issues as the application tries and fails to load it. Consider removing the layer from your webmap or map server or converting it to a different type. 

GIS Developer
City of Arlington, Texas
0 Kudos
john_cartwright_noaa
Occasional Contributor

Thanks for your reply. In this case the layers in question are displaying but you made a great observation that all the layers with warnings were Raster Layers in the underlying map service.

However, I don't understand your conclusion that, because the JSAPI doesn't have a RasterLayer class,  the MapImageLayer class doesn't support a map service with sublayers that are Raster Layers. I have not been able to reproduce warnings in the JSAPI (see trivial demo) suggesting to me that it is an issue w/ the ExB API or map widget and not the underlying JSAPI.

0 Kudos
JeffreyThompson2
MVP Regular Contributor

The JSAPI does have a UnsupportedLayer class, so it may be catching errors in a way that Experience Builder does not. 

https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-UnsupportedLayer.html

GIS Developer
City of Arlington, Texas