Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<title>Protomaps Basemaps</title>
<link rel="preconnect" href="https://demo-bucket.protomaps.com"/>
<link rel="preconnect" href="https://build.protomaps.com"/>
<link rel="preconnect" href="https://unpkg.com"/>
<link rel="preconnect" href="https://protomaps.github.io"/>
</head>
<body>
Expand Down
43 changes: 31 additions & 12 deletions app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"dependencies": {
"@maplibre/maplibre-gl-geocoder": "^1.9.4",
"@maplibre/maplibre-gl-inspect": "^1.9.0",
"maplibre-gl": "^6.0.0",
"maplibre-gl": "^6.9.0",
"pixelmatch": "^5.3.0",
"pmtiles": "^4.5.0",
"sirv": "^3.0.0",
Expand Down
9 changes: 0 additions & 9 deletions app/src/MapView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ import {
NavigationControl,
Popup,
addProtocol,
getRTLTextPluginStatus,
removeProtocol,
setRTLTextPlugin,
setWorkerUrl,
} from "maplibre-gl";
import * as maplibregl from "maplibre-gl";
Expand Down Expand Up @@ -260,13 +258,6 @@ function MapLibreView(props: {
onMount(() => {
props.ref?.({ fit });

if (getRTLTextPluginStatus() === "unavailable") {
setRTLTextPlugin(
"https://unpkg.com/@mapbox/mapbox-gl-rtl-text@0.2.3/mapbox-gl-rtl-text.min.js",
true,
);
}

if (!mapContainer) {
console.error("Could not mount map element");
return;
Expand Down
7 changes: 0 additions & 7 deletions app/src/VisualTests.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,6 @@ import pixelmatch from "pixelmatch";

maplibregl.setWorkerUrl(workerUrl);

if (maplibregl.getRTLTextPluginStatus() === "unavailable") {
maplibregl.setRTLTextPlugin(
"https://unpkg.com/@mapbox/mapbox-gl-rtl-text@0.2.3/mapbox-gl-rtl-text.min.js",
false, // we need to pre-load this, otherwise diffs will be flaky
);
}

// Jumps the map and waits for idle, capturing a Blob of the rendered frame.
const moveAndCaptureBlob = (
map: maplibregl.Map,
Expand Down
1 change: 0 additions & 1 deletion app/visualtests/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
<link rel="preconnect" href="https://npm-style.protomaps.dev" crossorigin />
<link rel="preconnect" href="https://registry.npmjs.org" crossorigin />
<link rel="preconnect" href="https://protomaps.github.io" crossorigin />
<link rel="preconnect" href="https://unpkg.com" crossorigin />
</head>
<body>
<div id="root"></div>
Expand Down
8 changes: 5 additions & 3 deletions examples/data_sandwich.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,15 @@
</head>
<body>
<div id="map"></div>
<script type="text/javascript">
<script type="module">
const latest_release = (await (await fetch("https://stac.overturemaps.org")).json()).latest;

let protocol = new pmtiles.Protocol();
maplibregl.addProtocol("pmtiles", protocol.tile);

const map = new maplibregl.Map({
container: "map",
zoom: 13,
zoom: 14,
center: [-0.12,51.5],
style: {
version: 8,
Expand All @@ -37,7 +39,7 @@
},
overture_places: {
type: "vector",
url: "pmtiles://https://overturemaps-tiles-us-west-2-beta.s3.amazonaws.com/2024-12-18/places.pmtiles",
url: `pmtiles://https://tiles.overturemaps.org/${latest_release}/places.pmtiles`,
attribution: "<a href='https://overturemaps.org'>Overture Maps Foundation</a>"
}
},
Expand Down
1 change: 0 additions & 1 deletion render-tests/run_render_tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,6 @@ async function getImageFromStyle(styleForTest: StyleWithTestData, page: Page): P
reject(new Error('Test timed out'));
}, options.timeout || 4000);


if (maplibregl.getRTLTextPluginStatus() === 'unavailable') {
maplibregl.setRTLTextPlugin(
'https://unpkg.com/@mapbox/mapbox-gl-rtl-text@0.3.0/dist/mapbox-gl-rtl-text.js',
Expand Down
Loading