Skip to content

Commit

Permalink
Merge pull request #1057 from orangemug/fix/dont-throw-on-unsupported…
Browse files Browse the repository at this point in the history
…-layer-types

Don't throw on unsupported `heatmap` layer type instead show helpful debug info
  • Loading branch information
ahocevar authored Dec 16, 2023
2 parents 4d4aeaa + 5d94007 commit bd5fe28
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/apply.js
Original file line number Diff line number Diff line change
Expand Up @@ -1027,7 +1027,9 @@ 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(`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 bd5fe28

Please sign in to comment.