gcorradini

Supported Operations on Layers -- attention to esri.layers.FeatureLayer().queryIds

Discussion created by gcorradini on Dec 9, 2010
Latest reply on Dec 13, 2010 by kvydt
Hello,
When i use two different MapServer layers to create an instance of esri.layers.FeatureLayer and execute the queryIds method I get different results. I assume the difference in results is the product of each layer's Supported Operations.

This layer
("http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Earthquakes/Since_1970/MapServer/0")
has a Supported Operation of "Query" whereas this other layer
("http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/3")
has a Supported Operations of type "Query_Layer".

The earthquake layer (the former example) will return only the objectIds as intended when you call the featurelayer.queryIds() method, but the demographic layer (the latter example) returns a JSON object of all attributes.

My question is simple. Where is the documentation that explains the differences between how to interact with different Supported Operations of a Feature Layer? There is NO warning/mention in the JavaScript API Reference under FeatureLayer or under Query about this behavior with different Supported Operations. I spent 1.5 hours trying to figure out why I was getting different results from each layer.

I would think that at least when I execute featurelayer.queryIds(query, callback) against a MapServer layer that only has a Supported Operations of "Query_Layer" I would get an error or something telling me this MapServer layer doesn't do that.

Maybe I'm missing something and  someone can point me to some documentation that I didn't see that explicitly explains this. Ideas?

Thanks

Outcomes