Hi fellows,
I was trying to add message alert in one of my custom widget to get the features count for two features layers together but somehow it only does for one layer. What is the best way to fix this? I will appreciate any help!
This is the block of code
on.once(this.map, 'update-end', lang.hitch(this, function () {
var aa = this.layerInfosObj.getLayerInfoById('Mylayer_1 || Mylayer_2');
if (aa.layerObject.graphics.length === 0) {
this._showMessage("No features found");
}
else {
var a1 = aa.layerObject.graphics.length;
this._showMessage(a1 + " Feature(s) found");
}
}));
Solved! Go to Solution.
Thanks Ken,
You are right!