Select to view content in your preferred language

Forcing a Map Layers visibility update

324
0
06-05-2023 05:53 AM
Labels (1)
PaulNRWA
Occasional Contributor

I've built a custom widget that is based upon the Views Navigation Widget.   I set a number of data filters and turn a variety of layers on/off depending upon which view the user selects.   Everything works great and the legend updates as I turn on/off the layers.   However, the map layers widget does not update and the view state for the layers I change, programmatically, don't allow me to use the widget to allow the user to change the visibility.

Here is a quick snippet for the layer visibility code:

if (tempJimuLayerView && tempJimuLayerView.layer.title == "SomeLayerName" )
                  tempJimuLayerView.view.visible = true
 
I attempted to use the widgetmanager, but haven't been successful.    Any other ideas or suggestions?
0 Kudos
0 Replies