AnsweredAssumed Answered

How to control sublayer visibility in 4.7 MapImageLayer

Question asked by kriskaplan on Jun 13, 2018
Latest reply on Jun 14, 2018 by kriskaplan

Is it possible to control the sublayer visibility of a map service layer that does not support dynamic sublayers in 4.7?

 

In 3.24 this was possible with the LAYER_OPTION_SHOW in the ImageParameters passed to ArcGISDynamicMapServiceLayer.  See this example.

 

In 4.7 the matrix indicates MapImageLayer is the eqivalent.  But specifying more than one sublayer in the 'sublayers' property causes it to require dynamic layer support from the layer source.  See this example.  This sample emits an error in the console indicating the service 'doesn't support dynamic layers, which is required to be able to change the sublayer's order, rendering, labeling or source'.  But I am not attempting to change the order, rendering, labeling, or source.  Just layer visibility.  Is it possible to show multiple sublayers without requiring dynamic layers?

 

Kris

Outcomes