Skip to content

Commit 42318a7

Browse files
committed
Don't throw on unsupported layer types instead show helpful debug info.
1 parent 206396b commit 42318a7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/apply.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1029,7 +1029,11 @@ function processStyle(glStyle, mapOrGroup, styleUrl, options) {
10291029
const type = glLayer.type;
10301030
if (type == 'heatmap') {
10311031
//FIXME Unsupported layer type
1032-
throw new Error(`${type} layers are not supported`);
1032+
// eslint-disable-next-line no-console
1033+
console.debug(
1034+
`[ol-mapbox-style] layers[${i}].type "${type}" not supported`
1035+
);
1036+
continue;
10331037
} else {
10341038
id = glLayer.source || getSourceIdByRef(glLayers, glLayer.ref);
10351039
// this technique assumes gl layers will be in a particular order

0 commit comments

Comments
 (0)