Select to view content in your preferred language

Identify Widget - only visible layers?

3734
17
Jump to solution
04-04-2012 07:29 AM
EricGardecki
Deactivated User
I'm trying to make use of the Identify Widget for Flex Viewer 2.5 and appear to be having an issue.  I have the <identifylayeroption> set to "top" and have <layers onlythese="true"> and list out each layer I want to be able to identify.  However, some of the layers do and some do not get identified.  After some troubleshooting it seems that the widget only identifies layers that were set to visible when the map loads.  If I turn on a layer that is configured to be identified, it does not work.  Only the layers that were turned on at map load can be identified, regardless of whether or not they are turned on at the time they are clicked.

I've gone over the list of layers in the config file 4 times and see no error and the widget works great other than this issue.

There must be a setting to fix this but I'm not finding it.  Anyone know what it is?

thanks!
Tags (2)
0 Kudos
17 Replies
EricGardecki
Deactivated User
Thanks!

I know that the 3.0 prerelease is available but is there any timeframe on when the final will be out?  I need to decide whether I should wait for 3.0 to come out or find workarounds now and redo everything when it's released.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Eric,

    There is much of 3.0 final that is developed for ArcGIS Server 10.1 so I would guess User Conference time frame (late July). I will have a new version of the Identify widget out hopefully this week that will resolve the scale dependent issue though.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Eric and Ken,

The next version is now released.

* 2.5.4 - Scale dependency and group layers are now honored when using the Identify option of visible.
    - Links can now have a tool tip specified.
    - Layer definitions are now honored when set on a layer in Flex Viewer.
    - When you identify multiple results and hover over a result record in the widgets results
       the graphic is highlighted on the screen if you are returning geometry.
    - bug fixed for info popups not closing when you clear the identify results.
    - If you choose not to return geometry than the geometry drawn when identifying features
      is used when hovering over a record in the widgets results list.



Don't forget to click the top arrow (promote) as shown below:
0 Kudos
EricGardecki
Deactivated User
Awesome!  Greatly appreciated.  I'll check it out asap.
0 Kudos
KenHolmquist
Deactivated User
Robert, I have implemented the Identify version 2.5.4, 2.5.5, and tested 2.5.6 and 2.5.7 and still get some undesired results.  If I have map layers that are in group layers in my mxd I still get identify data back for features that are not displayed due to scale dependent display if they are in map services that are turned on by default.  It is very interesting that if I turn that map service off and immediately back on again, then the identify returns only the appropriate information.

I used Firebug to look at the commands being sent to the map service.  In both of the examples below I have converted the %2Cs to commas to make it easier to read.  The one sent before turning the map service off looks like this;
http://chadags1:8399/arcgis/rest/services/TVA_NGS_Control/MapServer/identify?f=json&sr=102100&geomet...
(layers 0,7,15,19,23 are group header layers)  In this case layers 1,2,3 should not be included because they are not on while 24 and 25 are layers that are not visible due to scale dependency so I would assume they should not be included in the layer list.

The one sent after turning the map service off and immediately back on looks like this;
http://chadags1:8399/arcgis/rest/services/TVA_NGS_Control/MapServer/identify?f=json&sr=102100&geomet...
Note that layers 1,2,3,24 and 25 are not included in the list and this request returns the appropriate data. 

Have I done something wrong in utilizing or configuring this widget?  THANKS.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Ken,

   Without your data being publically accessable I can not test against it directly. I have tried to duplicate peoles enviroments that had issue and I have been able to see the proper results in all my tests. I have tested group layers extensively and am not sure why you are having issues with them. How many layers are in your Map Service? Is the first layer in the map service a group layer? What other info can you give me so that I can look into what you are seeing? Right now with the generic info I have and a non public service, I can not help much.
0 Kudos
JamesVogl
Occasional Contributor
Robert, I have implemented Identify version 2.5.8 and am getting a similar error that Ken has experienced regarding group layers. The widget returns information for visible sub layers even when the parent group layer is set to visible=false. The default visibility for this service is set to true in config.xml. However, after I toggle the service off/on using the MapSwitcher, the Identify works as intended. The service I am using is;
http://gisweb10.highpointnc.gov/ArcGIS/rest/services/Environment/MapServer
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
James and Ken,

  I just realized that both of you are talking about a 2.x version of my widget... Well that issue was fixed in 3.x and as I have 20 some widgets to maintain as well as all the support I provide on these forums, I cannot continue to update older versions of my widgets. This is not an issue in the 3.x version so my best advice is to upgrade to 3.x. You really need to consider the move, as 3.1 will be out later this month.
0 Kudos