Select to view content in your preferred language

Identify Widget 3.0.1f Issue

1004
5
Jump to solution
11-16-2012 04:27 AM
LixinHuang
Regular Contributor
Robert,

Thanks for keeping updating the Identify Widget. I like the new feature which enables users to delete the identified records. While I am using the latest version (3.0.1f) of Identify widget, I found that an error message of "Invalid layer ID specified" was displayed and then disappeared quickly. But, I can still got the right results. I checked with the source code and found that the code segment of processing Dynamic Map Service Layer in "identifyFeatures" function should check if all the Layer IDs array is empty, i.e., all the feature classes in a map service are invisible. If that array is empty, the aboved mentioned error will occur. One of our Flex Viewer applications has several map services with all the feature classes being invisible by default. It is some kind of difficult to notice that quickly disappearing error message.
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
LixinHuang
Regular Contributor
Robert,

Thanks for your quick response. I tried your fix and it did not work for my case. I chaned a few lines of the code handling Dynamic Map Service layer. I tested it and it worked.

     if (layer is ArcGISDynamicMapServiceLayer){
      arcL = layer as ArcGISDynamicMapServiceLayer;
      url = arcL.url;
      if(arcL.layerDefinitions){
       identifyParams.layerDefinitions = arcL.layerDefinitions;
      };
      if(identifyLayerOption == "visible"){
       if(arcL.visible == false){
        url="";
       }else{
        identifyParams.layerIds = getActualVisibleLayers(arcL.visibleLayers.toArray(), arcL.layerInfos.slice());
        if(identifyParams.layerIds.length == 0){
         url="";
        }else{
         identifyParams.layerOption = "all";
        };       };
      };

View solution in original post

0 Kudos
5 Replies
RobertScheitlin__GISP
MVP Emeritus
Lixin,

   See if this works to handle that:

                    if (layer is ArcGISDynamicMapServiceLayer){
                        arcL = layer as ArcGISDynamicMapServiceLayer;
                        url = arcL.url;
                        if(arcL.layerDefinitions){
                            identifyParams.layerDefinitions = arcL.layerDefinitions;
                        };
                        if(identifyLayerOption == "visible"){
                            if(arcL.visible == false){
                                url="";
                            }else{
                                if(arcL.visibleLayers){
                                    identifyParams.layerIds = getActualVisibleLayers(arcL.visibleLayers.toArray(), arcL.layerInfos.slice());
                                    identifyParams.layerOption = "all";
                                    if(!identifyParams.layerIds){
                                        url="";
                                    }
                                };
                            };
                        };
                    }
0 Kudos
LixinHuang
Regular Contributor
Robert,

Thanks for your quick response. Can you send me the swf file of this identify Widget? Thanks.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Lixin,

   I thought you were using the source code... I have not thoroughly tested this fix so I have not released this fix yet.
0 Kudos
LixinHuang
Regular Contributor
Robert,

Thanks for your quick response. I tried your fix and it did not work for my case. I chaned a few lines of the code handling Dynamic Map Service layer. I tested it and it worked.

     if (layer is ArcGISDynamicMapServiceLayer){
      arcL = layer as ArcGISDynamicMapServiceLayer;
      url = arcL.url;
      if(arcL.layerDefinitions){
       identifyParams.layerDefinitions = arcL.layerDefinitions;
      };
      if(identifyLayerOption == "visible"){
       if(arcL.visible == false){
        url="";
       }else{
        identifyParams.layerIds = getActualVisibleLayers(arcL.visibleLayers.toArray(), arcL.layerInfos.slice());
        if(identifyParams.layerIds.length == 0){
         url="";
        }else{
         identifyParams.layerOption = "all";
        };       };
      };

0 Kudos
RobertScheitlin__GISP
MVP Emeritus
All,

   A new version is now available.

* 3.0.2 - Fixed the Gray Circle Of Death (GCOD) people were seeing because of the glowfilter
              being applied to graphics not completely in the map extent.
           - Fixed the identifying features message to more accurately report the identify progress.
0 Kudos