mirror of
https://github.com/protomaps/PMTiles.git
synced 2026-02-04 10:51:07 +00:00
bump viewer to maplibre 5.1, latest basemap (#525)
* bump viewer to maplibre 5.1, latest basemap
This commit is contained in:
@@ -19,13 +19,12 @@ const INITIAL_ZOOM = 0;
|
||||
const INITIAL_LNG = 0;
|
||||
const INITIAL_LAT = 0;
|
||||
const BASEMAP_URL =
|
||||
"https://api.protomaps.com/tiles/v3/{z}/{x}/{y}.mvt?key=1003762824b9687f";
|
||||
"https://api.protomaps.com/tiles/v4/{z}/{x}/{y}.mvt?key=1003762824b9687f";
|
||||
const BASEMAP_ATTRIBUTION =
|
||||
'Basemap <a href="https://github.com/protomaps/basemaps">Protomaps</a> © <a href="https://openstreetmap.org">OpenStreetMap</a>';
|
||||
|
||||
maplibregl.setRTLTextPlugin(
|
||||
"https://unpkg.com/@mapbox/mapbox-gl-rtl-text@0.2.3/mapbox-gl-rtl-text.min.js",
|
||||
() => {},
|
||||
true
|
||||
);
|
||||
|
||||
@@ -196,7 +195,7 @@ const rasterStyle = async (file: PMTiles): Promise<StyleSpecification> => {
|
||||
let layers: LayerSpecification[] = [];
|
||||
|
||||
if (metadata.type !== "baselayer") {
|
||||
layers = baseTheme("basemap", BASEMAP_THEME);
|
||||
layers = baseTheme("basemap", BASEMAP_THEME, "en");
|
||||
}
|
||||
|
||||
layers.push({
|
||||
@@ -239,7 +238,7 @@ const vectorStyle = async (
|
||||
let baseOpacity = 0.35;
|
||||
|
||||
if (metadata.type !== "baselayer") {
|
||||
layers = baseTheme("basemap", BASEMAP_THEME);
|
||||
layers = baseTheme("basemap", BASEMAP_THEME, "en");
|
||||
baseOpacity = 0.9;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user