Skip to content

Commit

Permalink
WMSLayer's onImageError should also result in the load failed indicat…
Browse files Browse the repository at this point in the history
…or in LayerSwitcher.
  • Loading branch information
jacobwod committed Nov 24, 2023
1 parent a37f8d5 commit 6caccdf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions new-client/src/models/layers/WMSLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,10 @@ class WMSLayer {
* @instance
*/
onImageError = async (e) => {
this.globalObserver.publish("layerswitcher.wmsLayerLoadStatus", {
id: this.layer.get("name"),
status: "loaderror",
});
const layerSource = this.layer.getSource();
const previousErrorExtent = e.target.get("previousErrorExtent") || [];
const currentErrorExtent = e.image.extent;
Expand Down

0 comments on commit 6caccdf

Please sign in to comment.