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?