Solved! Go to Solution.
<fx:Style> @namespace s "library://ns.adobe.com/flex/spark"; @namespace mx "library://ns.adobe.com/flex/halo"; @namespace esri "http://www.esri.com/2008/ags"; @namespace viewer "com.esri.viewer.*"; esri|Legen { skin-class: ClassReference("widgets.Legend.LegendWidgetLegendSkin"); } </fx:Style>
<fx:Style> @namespace s "library://ns.adobe.com/flex/spark"; @namespace mx "library://ns.adobe.com/flex/halo"; @namespace esri "http://www.esri.com/2008/ags"; @namespace viewer "com.esri.viewer.*"; esri|Legen { skin-class: ClassReference("widgets.Legend.LegendWidgetLegendSkin"); } </fx:Style>
Using the new 3.0 flex viewer and having some issues with the Legend Widget. It appears to be loading all layers in my configuration whether they are turned on or not. This happens when the widget first loads. If I then turn a layer on and back off, it is properly removed from the legend. But, as it stands now, the widget takes forever to load as it's building the legend for 50+ layers that are set as visible="false" in the config. File. Anyone else seeing this behavior.
Thanks for reporting this. Looks like a bug with the Legend component. This happens for any Dynamic Map Service layer with atleast one sublayer visible. As a workaround for now, if you are using the un-compiled viewer, you can use the updated Legend Skin(attached) for the Legend component used in the Legend Widget.
add this to LegendWidget.mxml and make sure to copy the skin file to widgets/legend folder<fx:Style> @namespace s "library://ns.adobe.com/flex/spark"; @namespace mx "library://ns.adobe.com/flex/halo"; @namespace esri "http://www.esri.com/2008/ags"; @namespace viewer "com.esri.viewer.*"; esri|Legen { skin-class: ClassReference("widgets.Legend.LegendWidgetLegendSkin"); } </fx:Style>
Hope this helps
Hi guys!
I still don't know how to fix the unable to resolve '../../../../assets/skins/loader.swf' for transcoding error...
Could you point me to the right direction?
Thanks!
Thanks for reporting this. Looks like a bug with the Legend component. This happens for any Dynamic Map Service layer with atleast one sublayer visible. As a workaround for now, if you are using the un-compiled viewer, you can use the updated Legend Skin(attached) for the Legend component used in the Legend Widget.
add this to LegendWidget.mxml and make sure to copy the skin file to widgets/legend folder
<fx:Style> @namespace s "library://ns.adobe.com/flex/spark"; @namespace mx "library://ns.adobe.com/flex/halo"; @namespace esri "http://www.esri.com/2008/ags"; @namespace viewer "com.esri.viewer.*"; esri|Legend { skin-class: ClassReference("widgets.Legend.LegendWidgetLegendSkin"); } </fx:Style>