Select to view content in your preferred language

identify - no results

2668
21
04-09-2010 09:41 AM
GaryBushek
Deactivated User
Im having some issues with the identfy widget and im not sure if its the widget or my map service. I have about 20 layers and only about 4 or 5 show results when identifying. So it works for some layers and not others. To rule out the tolerance being a factor, some of the layers that dont work are polygon features so im definitely hitting the features but it returns "no results". Its not throwing any errors in the code. I have it set to identify visible layers only and I zoom to the features im trying to identify so I can physically see the features and it just doesnt identify. I compared the identifyParams.layerIds with my rest service endpoint to be sure the layer id was correct for the layer i wanted to identify on. Everything seems to look correct. It just seems to not like most of the layers for some reason. Any help is appreciated.

Thanks, Gary
Tags (2)
0 Kudos
21 Replies
GaryBushek
Deactivated User
I think I just figured out that its only identifying the current visible layers as long as they were one of the original visible layers of the map service. I'm not sure what to make of that. I would think the code would work for any visible layer regardless of whether it was on or off originally.  I will dig around the code to see if I can fix that but if anyone has any ideas let me know.

Thanks again, Gary
0 Kudos
GaryBushek
Deactivated User
ok, chalk it up to me not understanding how the identify is supposed to work. apparently "visble" doesnt mean currently visible but originally visible. I switched it to "All" and it identifies on all currently visible layers...
0 Kudos
JeffMitzelfelt
Regular Contributor
I have been trying to figure this out off and on for a week or so. I had used the "all" early on in my adventures, but thought the individual layers should be accessible and was stumbling around trying to figure this out.
0 Kudos
GISAdmin1
Regular Contributor
I have a simple MSD based service with four layers.  For some reason, if I use the Identify REST call using the "all" keyword for the layers parameter, I get all of the data returned.  If I use a valid layerId for the layers parameter, I just get data returned back for the first layer.  The same thing happens for ESRI's demo service:

This request returns all layers:

http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Portland/Portland_ESRI_LandBase_AGO/MapSe...

This request just returns data from layerid=4, even thought the id is set the the third layer:

http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Portland/Portland_ESRI_LandBase_AGO/MapSe...

Any idea why this is happening?
0 Kudos
BjornSvensson
Esri Regular Contributor
To get the behavior I think you are expecting, you need to specify "all:3", as the default is "top".

See http://resources.esri.com/help/9.3/arcgisserver/apis/rest/index.html?identify.html for more information on the layer parameter for identify.
0 Kudos
DasaPaddock
Esri Regular Contributor
0 Kudos
RoyceSimpson
Frequent Contributor
I'm having the same issue as gbushek and have attempted "identifyParams.layerOption = 'all';".

If I go into the mxd and turn on all the layers, the Identify operation works fine, but when I turn them all off in the mxd  and then in the Flex app, use "visibleLayers" to manually turn on layers, then perform an Identify, I get no identify results.  I've tried various combinations of identifyParams.layerOption and identifyParams.layerIds with no success.

Is this the intended functionality, bug or am I missing something?
0 Kudos
DasaPaddock
Esri Regular Contributor
Setting the identifyParams.layerOption to "all" should be all you need to do. Are you able to reproduce this issue when using the REST Services Directory identify page? You may need to contact ESRI Support to see if this is a bug or known issue with your configuration.
0 Kudos
BradOleson
Emerging Contributor
I am having a very similar issue - if I use the sample Parcels map service provided in the sample, ID works fine.  If I try to use my layers, no results are returned.  I have my "<identifylayeroption>" set to "all" in identifywidget.xml.  Seems several of us are experiencing the same problem?

Brad
0 Kudos