Hi Everyone,
I'm currently migrating to flex 3.4 from flex 2.3. Have anyone able to use the WidgetOpenHandler to turn on a specific operational layer. This code map.getLayer("DSIC Projects").visible = true; used to work in flex 2.3 but got an error in the new version.
FeatureLayer2097 layer failed to load: Fault code: 400. Any help would be appreciated, thanks.
Old Code:
New Code:
I'm currently migrating to flex 3.4 from flex 2.3. Have anyone able to use the WidgetOpenHandler to turn on a specific operational layer. This code map.getLayer("DSIC Projects").visible = true; used to work in flex 2.3 but got an error in the new version.
FeatureLayer2097 layer failed to load: Fault code: 400. Any help would be appreciated, thanks.
Old Code:
Code:
private function widgetOpenedHandler(event:Event):void
{
if (graphicsLayer)
{
graphicsLayer.visible = true;
}
map.getLayer("DSIC Projects").visible = true;
}
Code:
private function widgetOpenedHandler(event:Event):void
{
if (resultFeatureLayer)
{
if (shareResults)
{
map.addLayer(resultFeatureLayer);
}
else
{
resultFeatureLayer.visible = true;
}
}
map.getLayer("DSIC Projects").visible = true;
}