AnsweredAssumed Answered

ArcGISDynamicMapServiceLayer LayerDefinitions 10.0 to 10.2

Question asked by JSim on Mar 20, 2014
Latest reply on Mar 31, 2014 by jeff.pace
We are currently upgrading from a 10.0 to a 10.2 server and are having issues with one of our apps built in JavaScript. The JavaScript API is generating an export map call with layer definitions setup like:

6:(USERNAME = 'test');7:(USERNAME = 'test')

Which works fine in 10.0 but fails in 10.2. I looked at examples in the documents and found one here which shows that the request should be sent with the parameter like:

{6:(USERNAME = 'test'),7:(USERNAME = 'test')}

Note that it is wrapped in curly braces and layers are separated by commas instead of semi-colons.

To setup these definitions in the code all I did was (not the exact code):

var definitions = []; definitions[6] = '(USERNAME = 'test')'; definitions[7] = '(USERNAME = 'test')';  service.setLayerDefinitions(definitions);

Anybody have any thoughts on what I might be doing wrong or if this could be a bug in the api?

NOTE: 10.0 api works with commas instead of semi-colons but fails when wrapped with curly braces. 10.2 only works with semi-colons and must be wrapped with curly braces

- Jamie