Skip to content

Commit

Permalink
Disable terrain
Browse files Browse the repository at this point in the history
  • Loading branch information
mgcth committed Feb 7, 2024
1 parent 28638a3 commit 844e3b5
Showing 1 changed file with 24 additions and 21 deletions.
45 changes: 24 additions & 21 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand All @@ -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,
},
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 844e3b5

Please sign in to comment.