Overview:
In the GE 4.2 release there has been a necessary design change to support the configurable layer list. The issue is that the same layer can now belong to two (potentially) different hierarchies: the layer list, and the previous hierarchy of map services and group layers. If a layer's visibility could be influenced by a parent item in either hierarchy, then we could get into quagmires where the same layer needs to be simultaneously both visible and not visible.
Solution:
To avoid this, items in the "Map Services" hierarchy that act as "containers" (e.g. group layers, dynamic map services) are now set to always be visible, so that layer visibility is only affected by folders in the layer list. The custom application will need to be modified so that it either toggles the visibility of individual layers, or manipulates the layer list. Here are the methods available to you regarding layer visibility.
In the GE 4.2 release there has been a necessary design change to support the configurable layer list. The issue is that the same layer can now belong to two (potentially) different hierarchies: the layer list, and the previous hierarchy of map services and group layers. If a layer's visibility could be influenced by a parent item in either hierarchy, then we could get into quagmires where the same layer needs to be simultaneously both visible and not visible.
Solution:
To avoid this, items in the "Map Services" hierarchy that act as "containers" (e.g. group layers, dynamic map services) are now set to always be visible, so that layer visibility is only affected by folders in the layer list. The custom application will need to be modified so that it either toggles the visibility of individual layers, or manipulates the layer list. Here are the methods available to you regarding layer visibility.
?MapService.getConfiguredVisibleLayers() Gets the IDs of the visible layers which were configured by the REST manager in an array.
Note: If a layer is configured visible but is in fact not visible because its parent is not configured visible, that layer will not be included in the returned list of visible layers.
MapService. getDefaultVisibleLayers() Gets the IDs of the layers which are visible by default in the Esri service layer.
Note: If a layer is visible by default but is in fact not visible because its parent is not visible by default, that layer will not be included in the returned list of visible layers.
MapsService. getVisibleLayers() Gets the IDs of the currently visible layers in an array.
Note: If a layer is currently set visible but is in fact not visible because its parent is not visible, that layer will not be included in the returned list of visible layers.
Both geocortex.essentials.MapService and geocortex.essentials.Layer classes have a " configuredVisible" property that reflects the initial visibility as defined in REST Manager.
Comments
0 comments
Article is closed for comments.