Skip to content

Commit

Permalink
fix(RasterTile): make partialLoading type agnostic
Browse files Browse the repository at this point in the history
  • Loading branch information
airnez committed Feb 3, 2025
1 parent ddcf97a commit 5c89240
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/Process/LayeredMaterialNodeProcessing.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,11 @@ export function updateLayeredMaterialNodeImagery(context, layer, node, parent) {
if (!node.layerUpdateState[layer.id]) {
return;
}
const textures = results.map((texture, index) => (texture != null ? texture :
{ isTexture: false, extent: extentsDestination[index] }));
// TODO: Handle error : result is undefined in provider. throw error
const pitchs = computePitchs(results, extentsDestination);
nodeLayer.setTextures(results, pitchs);
const pitchs = computePitchs(textures, extentsDestination);
nodeLayer.setTextures(textures, pitchs);
node.layerUpdateState[layer.id].success();
},
err => handlingError(err, node, layer, targetLevel, context.view));
Expand Down
2 changes: 1 addition & 1 deletion src/Provider/DataSourceProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default {
// All promises failed -> reject
return Promise.reject(new Error('Failed to load any data'));
}
return results.map((prom, i) => (prom.value ? prom.value : { isTexture: false, extent: src[i] }));
return results.map(prom => (prom.value ? prom.value : null));
});
}

Expand Down

0 comments on commit 5c89240

Please sign in to comment.