Skip to content

Commit

Permalink
fix: lenient layer parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
buehner committed Jan 20, 2025
1 parent 1725987 commit fab6f8b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/parser/SHOGunApplicationUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import OlPinchZoom from 'ol/interaction/PinchZoom';
import OlLayerBase from 'ol/layer/Base';
import OlLayerGroup from 'ol/layer/Group';
import OlImageLayer from 'ol/layer/Image';
import OlLayer from 'ol/layer/Layer';
import OlTileLayer from 'ol/layer/Tile';
import OlLayerVector from 'ol/layer/Vector';

Expand Down Expand Up @@ -236,7 +235,12 @@ class SHOGunApplicationUtil<
} else {
const layerNode = layers.find(l => l.id === node.layerId);
if (layerNode) {
const olLayer = await this.parseLayer(layerNode as S, projection);
let olLayer;
try {
olLayer = await this.parseLayer(layerNode as S, projection);
} catch (error) {
Logger.warn('Could not parse layer: ', error);
}

if (!olLayer) {
continue;
Expand Down

0 comments on commit fab6f8b

Please sign in to comment.