Skip to content

Commit

Permalink
Don't throw on unsupported layer types instead show helpful debug info.
Browse files Browse the repository at this point in the history
  • Loading branch information
orangemug committed Dec 13, 2023
1 parent 206396b commit 42318a7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/apply.js
Original file line number Diff line number Diff line change
Expand Up @@ -1029,7 +1029,11 @@ function processStyle(glStyle, mapOrGroup, styleUrl, options) {
const type = glLayer.type;
if (type == 'heatmap') {
//FIXME Unsupported layer type
throw new Error(`${type} layers are not supported`);
// eslint-disable-next-line no-console
console.debug(
`[ol-mapbox-style] layers[${i}].type "${type}" not supported`
);
continue;
} else {
id = glLayer.source || getSourceIdByRef(glLayers, glLayer.ref);
// this technique assumes gl layers will be in a particular order
Expand Down

0 comments on commit 42318a7

Please sign in to comment.