Hi All,
I've group layers in my web map, structure looks like below :
I'm trying to apply definition expression to one of the layer i.e. "Operational PolyFeature" but it's not working. Here is my sample code :
var layerStructureInstance = LayerStructure.getInstance();
layerStructureInstance.traversal(lang.hitch(this, function (layerNode) {
if (layerNode.title === 'Operational PolyFeature') {
layerNode.getLayerObject().then(lang.hitch(this, function (layerObject) {
layerObject.setDefinitionExpression("objectid = 123");
layerNode.show();
}));
}
}));
How to apply def expression on group layer, any help would be appreciated.
-Prashant
Solved! Go to Solution.
Fixed by using this code
layerNode.setFilter(expression);