Select to view content in your preferred language

What does the Identify Operation do When we pass an Envelope or Polygon?

1879
1
02-02-2012 08:14 PM
DevdattaTengshe1
Deactivated User
We were running an Idetify task from our Flex App, when we saw a strange result. Ife we pass in a point while identifying, we got more results than if we pass in a bigger envelope, or buffer around our points. We found that this results is reproducable when we query the rest end point.

Suppose I want to identify the traffic Camera at the Location of (-85.8117346379999, 38.274177432) on the Louisville Map service (http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Louisville/LOJIC_PublicSafety_Louisville/...),
we get the following results :

http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Louisville/LOJIC_PublicSafety_Louisville/...

You will see that you get one traffic cam (Object Id=2).

Now if I pass an enevelope around this point of (-85.8, 38.2,-85.82, 38.3), we get the following result
http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Louisville/LOJIC_PublicSafety_Louisville/...

You will see that now you get one result, but this is a different Cam (Object Id=47)

Why does the Identify operation return such an unexpected result?
0 Kudos
1 Reply
SrinivasVinnakota
Esri Contributor
Please refer to REST documentation at http://sampleserver1.arcgisonline.com/ArcGIS/SDK/REST/index.html?identify.html ("layers" parameter defaults "top").

In your identify query you pass in a value of "2" for "layers" parameter. Since this parameter does not contain one of top/all/visible keywords it defaults to "top". And "top" returns the result from the top-most layer.

When you identified using an envelope, layer "Emergency Sirens" (layerId 0) is returned, because this is the top most layer in the result set.
When you identified using a point, layer "Traffic Cams" (layerId 2) is returned because this is the top most layer in the result set.

If you are modify the envelope example to include "layers": "all", you would get the expected result: http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Louisville/LOJIC_PublicSafety_Louisville/...
0 Kudos