ArcGIS Server Export Map REST service not working as expected

2902
3
09-27-2010 07:36 PM
SystemAdministrator
New Contributor
Hello, I am currently testing the ArcGIS Server Export Map functionality on the ESRI ArcGIS 10 sample servers and it appears as though the service does not operate as I expected.

Basically I am attempting to export one feature (STATE_FIPS='20') on one layer (layer Id 5), along with all the features on another layer (layer id 2) to png format. I am able to show both of the layers, however the layer definition I attempt to apply to layer Id 5 seems to go unnoticed by the server �?? all features are returned for *both* layers instead of just the single state with id 20.

Clicking on the following link will show the parameters that I am using to make the request:

http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/ex...

Any help appreciated

Thanks
0 Kudos
3 Replies
ThomasHill
New Contributor
The layerdefs parameter needs to contain the layer ID to which you are applying your definition query:[INDENT]&layerdefs=5:STATE_FIPS%3D'20'
[/INDENT]To apply definition queries to more than one layer, separate with semicolons:[INDENT]&layerdefs=5:STATE_FIPS%3D'20';3:STATE_FIPS%3D'20'[/INDENT]
0 Kudos
SystemAdministrator
New Contributor
The layerdefs parameter needs to contain the layer ID to which you are applying your definition query:[INDENT]&layerdefs=5:STATE_FIPS%3D'20'
[/INDENT]To apply definition queries to more than one layer, separate with semicolons:[INDENT]&layerdefs=5:STATE_FIPS%3D'20';3:STATE_FIPS%3D'20'[/INDENT]


Thank you, works fine now!
0 Kudos
BobSolley
New Contributor
Can the definition expression filter on multiple features in the same layer? Example, if i have a parcels polygon layer can it filter 2 or more parcels from the layer?
thx bob
0 Kudos