Within a custom widget I'm developing I am accessing specific layers that are loaded into an existing webmap by way of:
_operLayers = this.map.itemInfo.itemData.operationalLayers;
I can then do some things like toggle visibility by setting a reference to a layerObject like this:
array.map(_operLayers, lang.hitch(this, function (lyr) {
if (lyr.layerObject) {
if (lyr.title === "Alert 7day - Hydraulic Element Set") {
lyr.layerObject.setVisibility(true);
lyr.visibility = true;
lyr.definitionExpression = "alertPriority = 'Low'";
}
}
}
))
Is there any way to set a filter/definitionExpression on this layerObject? As you can see above, what I attempted has no effect.
Of note: the service layers contained in the webmap are enriched with additional attributes from a Server Object Interceptor and consequently I'm unable to apply the desired definitionExpression/filter on the AGO item created from that service layer. We need a way to set a date value > CURRENT_TIMESTAMP but the service does not honor this type of WHERE clause.
Thanks for any input.