From 844e3b50562e5c92c0888d34917bb45cbd751f32 Mon Sep 17 00:00:00 2001 From: Mladen Gibanica <11275336+mgcth@users.noreply.github.com> Date: Wed, 7 Feb 2024 18:42:04 +0100 Subject: [PATCH] Disable terrain --- src/App.tsx | 45 ++++++++++++++++++++++++--------------------- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index b933139..69623a8 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -74,14 +74,17 @@ export function App() { state.layer[p].type == "communication" && state.layer[p].checked == true ) { - let line_width = 1; + let line_width = 2; let line_blur = 1; let line_gap_width = 0; if (zoom >= 8 && (p == "Motorväg" || p == "Motortrafikled")) { - line_width = 2; + line_width = 4; line_blur = 1; - line_gap_width = 0; + } + + if (zoom >= 12 && (p == "Motorväg" || p == "Motortrafikled")) { + line_gap_width = 1; } layers.push({ @@ -91,7 +94,7 @@ export function App() { type: "line", paint: { "line-color": state.theme == "light" ? "#000" : "#fff", - "line-width": line_width, + "line-width": line_width + 1, "line-blur": line_blur, "line-gap-width": line_gap_width, }, @@ -123,17 +126,17 @@ export function App() { }, }); - layers.push({ - id: "terrain", - source: "terrain", - type: "hillshade", - paint: { - "hillshade-exaggeration": 0.1, - }, - layout: { - visibility: "none", - }, - }); + // layers.push({ + // id: "terrain", + // source: "terrain", + // type: "hillshade", + // paint: { + // "hillshade-exaggeration": 1, + // }, + // layout: { + // visibility: "visible", + // }, + // }); layers.push({ id: "text", @@ -189,15 +192,15 @@ export function App() { type: "vector", url: "pmtiles://sweden_text.pmtiles", }, - terrain: { - type: "raster-dem", - url: "pmtiles://output.pmtiles", - tileSize: 512, - }, + // terrain: { + // type: "raster-dem", + // url: "pmtiles://output.pmtiles", + // tileSize: 512, + // }, }, // terrain: { // source: "terrain", - // exaggeration: 0.001, + // exaggeration: 2, // }, // @ts-ignore layers: layers,