From 42318a7344b8cce92e1ebe717f729faaa0fd52bb Mon Sep 17 00:00:00 2001 From: orangemug Date: Wed, 13 Dec 2023 06:43:24 +0000 Subject: [PATCH] Don't throw on unsupported layer types instead show helpful debug info. --- src/apply.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/apply.js b/src/apply.js index 2567eb87..86705899 100644 --- a/src/apply.js +++ b/src/apply.js @@ -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