2

Is there any solid example to change the definition query at run time of the ArcGISDynamicMapServiceLayer using javascript API 3.5 or higher version and ArcGIS server 10.1. I found API documentation setdynamiclayerinfos but was not able to find example to find how it exactly works.

1 Answer 1

1

Here is a simple example, using this sample from ESRI: http://developers.arcgis.com/en/javascript/samples/map_multiplelayerdef/

put this code in the console:

map.getLayer("layer1").setLayerDefinitions(["STATE_NAME='Kansas' and POP2007>250000"]);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.