aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/main.js b/main.js
index 017063c..f0ab6f5 100644
--- a/main.js
+++ b/main.js
@@ -577,7 +577,8 @@ const styles = Object.keys(layers).reduce(function(result, key) {
result[key] = layers[key].style;
return result;
}, {});
-map.addLayer(new VectorTileLayer({
+
+const vectorLayer = new VectorTileLayer({
source: vectorSource,
/* XXX switch to 'hybrid' if there are perf issues; but that seems to
* put lines above points regardless of their respective z-index */
@@ -596,7 +597,8 @@ map.addLayer(new VectorTileLayer({
return style[i];
}
},
-}));
+});
+map.addLayer(vectorLayer);
/* layer selection panel */
(function() {
@@ -1032,6 +1034,7 @@ map.addLayer(new VectorTileLayer({
}, {
hitTolerance: 5,
checkWrapped: false,
+ layerFilter: (l) => l === vectorLayer,
});
});
}());