Fix bug: options are not applied when changing layer

This commit is contained in:
Rayzeq 2021-06-24 10:37:06 +02:00
parent ab61c30e20
commit b871b63c7e

View file

@ -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;