Apply layerdefs to all layers

812
1
10-31-2011 12:32 PM
AndrewThomas
New Contributor II
When applying layer definitions to a mapserver export, is it possible to apply a definition to all layers without specifying the query to each individual layer?

I.E.

http://host/instance/REST/services/servicefoldername/servicename/MapServer/export?...&layerdefs=all:"fieldname=value"

instead of

http://host/instance/REST/services/servicefoldername/servicename/MapServer/export?...&layerdefs=0:"fieldname=value";1:"fieldname=value";2:"fieldname=value";...;n:"fieldname=value"

I.E. layerdefs=all:"fieldname=value" instead of layerdefs=0:"fieldname=value";1:"fieldname=value";2:"fieldname=value";...;n:"fieldname=value"

This of course assumes a consistent field name and value.

The reason I want to do this is I'm trying to apply this in a proxy to a request that the web client is making. The proxy doesn't know how many layers there are.
0 Kudos
1 Reply
RaviNarayanan
Esri Contributor
No, this is not supported. Layerdefs are applied to a particular layer.

{ "<layerId1>" : "<layerDef1>" , "<layerId2>" : "<layerDef2>" }
0 Kudos