Select to view content in your preferred language

override visibleLayers on ArcGISDynamicMapServiceLayer version 3.1

2207
2
02-04-2013 06:00 AM
PhilippeSTEINMANN
Occasional Contributor
Hi,
I have a class that extends ArcGISDynamicMapServiceLayer (widget finddata geoportal)

public class GeoProcessingViewerLayer extends ArcGISDynamicMapServiceLayer



but I get an error flex on override function


1023: Incompatible override.

/**
         * Sets the visible layers
         * 
         * @arr Array of visible layers, just contains their ids
         * */
        override public function set visibleLayers(arr:ArrayCollection):void {
          
          this._visibleLayers = arr;
          if(arr && arr.length > 0) {
           var layerInfos:Array = layerInfos;
           var showPoints:Boolean = false;
           var showLines:Boolean = false;
           var showPolygons:Boolean = false;
           for(var i:Number = 0; i < arr.length; i++) {
            var index:Number = arr;
               var layerInfo:GeoProcessingViewerLayerInfo = layerInfos[index] ;
               if(layerInfo.title == lblPoints) {
                showPoints = true;
               } else if (layerInfo.title == lblPolygons) {
                showPolygons = true;
               } else if (layerInfo.title == lblLines) {
                    showLines = true;
                }
           }
           geometryVisibility(showLines, showPoints, showPolygons);
          } else {
           this._map.removeLayer(this.graphicsLayer);
          }
        
          this.refresh();
        }


what's the problem

Thanks
Tags (2)
0 Kudos
2 Replies
PhilippeSTEINMANN
Occasional Contributor
it's IList .... no ArrayCollection ...
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Philippe,

   The visibleLayers setter is expecting and IList I don't think you can change the type object in an override function.
0 Kudos