bump basemap style to v3 [#49] (#398)

This commit is contained in:
Brandon Liu
2024-05-29 20:51:30 -07:00
committed by GitHub
parent 658c75b073
commit bc8f97d642
3 changed files with 10 additions and 7 deletions

View File

@@ -13,6 +13,8 @@ import { Protocol } from "../../js/adapters";
import { PMTiles, TileType } from "../../js/index";
import { styled } from "./stitches.config";
const BASEMAP_THEME = "black";
const INITIAL_ZOOM = 0;
const INITIAL_LNG = 0;
const INITIAL_LAT = 0;
@@ -194,7 +196,7 @@ const rasterStyle = async (file: PMTiles): Promise<StyleSpecification> => {
let layers: LayerSpecification[] = [];
if (metadata.type !== "baselayer") {
layers = baseTheme("basemap", "black");
layers = baseTheme("basemap", BASEMAP_THEME);
}
layers.push({
@@ -220,6 +222,7 @@ const rasterStyle = async (file: PMTiles): Promise<StyleSpecification> => {
},
},
glyphs: "https://cdn.protomaps.com/fonts/pbf/{fontstack}/{range}.pbf",
sprite: `https://protomaps.github.io/basemaps-assets/sprites/v3/${BASEMAP_THEME}`,
layers: layers,
};
};
@@ -236,7 +239,7 @@ const vectorStyle = async (
let baseOpacity = 0.35;
if (metadata.type !== "baselayer") {
layers = baseTheme("basemap", "black");
layers = baseTheme("basemap", BASEMAP_THEME);
baseOpacity = 0.9;
}