private function descriptionOrDownload_clickHandler():void { if (_toc.UseESRIDesc){ var url:String; if (_layer is OpenStreetMapLayer){ url = "http://www.openstreetmap.org"; }else if (_layer.hasOwnProperty("url")){ url = Object(_layer).url; if (_layer is WMSLayer) url += "?SERVICE=WMS&REQUEST=GetCapabilities"; } if (url){ var request:URLRequest = new URLRequest(url); navigateToURL(request, _layer.id); }
M Lowry, That has been fixed now. Get version 2.5.1.1
Giuseppe, There is a new version available that has the exclude layer capability.
* MAJOR CHANGE when a layer of a map service or the whole mapservice is excluded using the excludelayers it is excluded from the TOC and the map. This has changed from where it use to be visible in the map even though it was excluded from the TOC. *Clarification* If you want to exclude a whole map service from the toc and the map then you just remove it from the viewers main config. Currently if you exclude a map service and do not specify any sublayers then the mapservice will remain in the map.
[SWF] \bin-debug\widgets\TOC\TOCWidget.swf - 511,883 bytes after decompression warning: The class widgets.TOC.toc.tocClasses.LegendDataClassItem has been used in a call to net.registerClassAlias() in _TOCWidget_FlexInit. This will cause widgets.TOC:TOCWidget to be leaked. To resolve the leak, define widgets.TOC.toc.tocClasses.LegendDataClassItem in the top-level application. warning: The class widgets.TOC.toc.tocClasses.LegendDataItem has been used in a call to net.registerClassAlias() in _TOCWidget_FlexInit. This will cause widgets.TOC:TOCWidget to be leaked. To resolve the leak, define widgets.TOC.toc.tocClasses.LegendDataItem in the top-level application. warning: The class widgets.TOC.toc.tocClasses.LegendSymbolItem has been used in a call to net.registerClassAlias() in _TOCWidget_FlexInit. This will cause widgets.TOC:TOCWidget to be leaked. To resolve the leak, define widgets.TOC.toc.tocClasses.LegendSymbolItem in the top-level application.
Lefteris, Straight from the readme.txt
private function loadImage(imageData:String):Image { const base64Dec:Base64Decoder = new Base64Decoder(); base64Dec.decode(imageData); const byteArr:ByteArray = base64Dec.toByteArray(); const loader:Loader = new Loader(); const lc:LoaderContext = new LoaderContext(false); const image:Image = new Image(); image.maxHeight = 30; image.maxWidth = 30; loader.contentLoaderInfo.addEventListener(Event.COMPLETE, function(e:Event):void { image.smoothBitmapContent = true; image.source = e.currentTarget.content; }); loader.loadBytes(byteArr, lc); return image; }
Greg, A couple of questions...Are you using Flex Viewer 2.5?Is your ArcGIS Server at least version 10?Hopefully you saw these requirement in the documentation of the download.
Adrian, Wow I can't believe you are the first to report this issue. The fix is 2 simple lines of code and I will add them to the next release. If you happen to be using the uncompiled version than you can add the fix your self by opening the TocMapLayerItem.as and find the loadImage function and add the two lines below in red: private function loadImage(imageData:String):Image { const base64Dec:Base64Decoder = new Base64Decoder(); base64Dec.decode(imageData); const byteArr:ByteArray = base64Dec.toByteArray(); const loader:Loader = new Loader(); const lc:LoaderContext = new LoaderContext(false); const image:Image = new Image(); image.maxHeight = 30; image.maxWidth = 30; loader.contentLoaderInfo.addEventListener(Event.COMPLETE, function(e:Event):void { image.smoothBitmapContent = true; image.source = e.currentTarget.content; }); loader.loadBytes(byteArr, lc); return image; }Also you may want to st your maps top attribute back to 40 unless you have some reason for the 100 empty pixels above your map.Don't forget to click the top arrow (promote).as shown in the below graphic:
* It is your responsibility to disable the layerlist portion of the MapSwitcherWidget or eMapSwitcherWidget by setting the * * <layerlist visible="false"> ** Also ensure you do not use the TOCWidget with the LayerListWidget. *
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.