encLayer.loadStatusChanged.connect(()=> {
if (encLayer.loadStatus === Enums.LoadStatusLoaded) {
loadedEncLayerCount++;
}
// loop through the layers and zoom to the combined full extent
if (loadedEncLayerCount === datasets.length) {
const fullExtents = [];
map.operationalLayers.forEach(layer => fullExtents.push(layer.fullExtent));
const fullExtentOfLayers = GeometryEngine.combineExtentsOfGeometries(fullExtents);
mapView.setViewpointGeometry(fullExtentOfLayers)
}
});
I think this may be a duplicate of https://community.esri.com/t5/qt-maps-sdk-questions/in-this-example-the-load-status-will-not-working...