Select to view content in your preferred language

Layer Definitions not applying

618
0
05-17-2011 03:19 PM
AndrewLiles
Emerging Contributor
I have a MapService with 4 layers that I'm trying to perform definition queries on, but I'm getting some unexpected behavior. One of the layers is simply not respecting the definition query, while the other three in the service are. I'm applying definition queries like so:

var q:String = "TestID=4";
var ld:Array = new Array();
for(var x:int = 0;x<displayLayer.layerInfos.length;x++)
{
  ld.push(q);
}
     
displayLayer.layerDefinitions = ld;
displayLayer.visible = true;
displayLayer.refresh();


After the layer definitions are applied, three of the layers properly show only the queried features, while one layer continues to show all of its features.

Any idea what is happening?
Tags (2)
0 Kudos
0 Replies