Is there a way to verify if a layer in the map is visible at the current map extent? FeatureLayer has a .maxScale property which can be used for this. I don't see anything similar for the LayerInfo class. Thanks for any suggestions.
Solved! Go to Solution.
Adam,
LayerInfo has a maxScale and minScale. The WAB LayerInfos object you can get by using
LayerInfos.getInstance(this.map, this.map.itemInfo).then(lang.hitch(this, function(operLayerInfos) {
code as referenced in the LayerInfos class—Web AppBuilder for ArcGIS (Developer Edition) | ArcGIS for Developers
will allow you to get
array.forEach(operLayerInfos.getLayerInfoArray(), function(layerInfo) {
var isVisible = layerInfo.layerObject.visibleAtMapScale;
}
Adam,
LayerInfo has a maxScale and minScale. The WAB LayerInfos object you can get by using
LayerInfos.getInstance(this.map, this.map.itemInfo).then(lang.hitch(this, function(operLayerInfos) {
code as referenced in the LayerInfos class—Web AppBuilder for ArcGIS (Developer Edition) | ArcGIS for Developers
will allow you to get
array.forEach(operLayerInfos.getLayerInfoArray(), function(layerInfo) {
var isVisible = layerInfo.layerObject.visibleAtMapScale;
}
The layerObject property appears to expose all the underlying FeatureLayer properties -- exactly what I needed, Thank you!