Select to view content in your preferred language

Defining LayerDefinitions

577
1
03-27-2011 02:34 AM
MahshavaMahshava
Deactivated User
Hi,

I have a .mxd file with different query definition on each layer.
The problem is when I load the layers in code, it doesn't consider the query definition.
I know I can define LayerDefinitions for the layers, but since I have different query definition for each layer it gets messy.

Is there a way to use the query definition from the mxd?
0 Kudos
1 Reply
DaveTimmins
Deactivated User
Hi,

this is the default behaviour when using a dynamic layer. If you are consuming the data as a Feature layer then you will need to explicitly specify the where clause.

If you have many layers then it is probably easier to use a dynamic layer and if you need some query interaction use the identify task.
0 Kudos