diff options
Diffstat (limited to 'main.js')
-rw-r--r-- | main.js | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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, }); }); }()); |