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

8
app/package-lock.json generated
View File

@@ -20,7 +20,7 @@
"fflate": "^0.7.3",
"maplibre-gl": "3.3.1",
"pbf": "^3.2.1",
"protomaps-themes-base": "2.0.0-alpha.1",
"protomaps-themes-base": "3.0.1",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-dropzone": "^14.1.1",
@@ -3014,9 +3014,9 @@
"integrity": "sha512-TdDRD+/QNdrCGCE7v8340QyuXd4kIWIgapsE2+n/SaGiSSbomYl4TjHlvIoCWRpE7wFt02EpB35VVA2ImcBVqw=="
},
"node_modules/protomaps-themes-base": {
"version": "2.0.0-alpha.1",
"resolved": "https://registry.npmjs.org/protomaps-themes-base/-/protomaps-themes-base-2.0.0-alpha.1.tgz",
"integrity": "sha512-eGAiUpBPAohnMvEHoF7NRWp7YuTNk/JsAVJ4733jqNw+/EF6Q5TMjqCOZScG3YSri5NStJg+9Upb95M2AQ3pjw=="
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/protomaps-themes-base/-/protomaps-themes-base-3.0.1.tgz",
"integrity": "sha512-itF0zqLYzEc/fxKdxZyc6D9GFxSnFQi53Hp+vIguuMCrHSveH9ixeRqh8Wv02woM7dRNbbbfOCeHbSWxlCdcxw=="
},
"node_modules/quickselect": {
"version": "2.0.0",

View File

@@ -22,7 +22,7 @@
"fflate": "^0.7.3",
"maplibre-gl": "3.3.1",
"pbf": "^3.2.1",
"protomaps-themes-base": "2.0.0-alpha.1",
"protomaps-themes-base": "3.0.1",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-dropzone": "^14.1.1",

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