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
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"]);