From b871b63c7ea1d66546ed06867d7c31175cfb167c Mon Sep 17 00:00:00 2001 From: Rayzeq Date: Thu, 24 Jun 2021 10:37:06 +0200 Subject: [PATCH] Fix bug: options are not applied when changing layer --- modules/ui/3d.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/ui/3d.js b/modules/ui/3d.js index 7c43838d..2ca03d3a 100644 --- a/modules/ui/3d.js +++ b/modules/ui/3d.js @@ -351,7 +351,10 @@ function extendWater(width, height) { async function update3dTexture() { if (texture) texture.dispose(); - const url = await getMapURL("mesh"); + const mapOptions = [] + if (options.labels3d) mapOptions.push("noLabels"); + if (options.extendedWater) mapOptions.push("noWater"); + const url = await getMapURL("mesh", mapOptions); window.setTimeout(() => window.URL.revokeObjectURL(url), 3000); texture = new THREE.TextureLoader().load(url, render); material.map = texture;