clean up R2 urls

This commit is contained in:
Brandon Liu
2023-01-25 18:06:07 +08:00
parent 22db55c202
commit 701db2dabc
5 changed files with 5 additions and 5 deletions

View File

@@ -11,7 +11,7 @@ PMTiles is a single-file archive format for tiled data. A PMTiles archive can be
* [PMTiles Inspector](https://protomaps.github.io/PMTiles/) - inspect and preview PMTiles local or remote PMTiles archives. * [PMTiles Inspector](https://protomaps.github.io/PMTiles/) - inspect and preview PMTiles local or remote PMTiles archives.
* Archives on cloud storage may require CORS for the origin `https://protomaps.github.io` * Archives on cloud storage may require CORS for the origin `https://protomaps.github.io`
* [Vector Tiles Example (US Zip Codes)](https://protomaps.github.io/PMTiles/?url=https%3A%2F%2Fpub-9288c68512ed46eca46ddcade307709b.r2.dev%2Fprotomaps-sample-datasets%2Fcb_2018_us_zcta510_500k.pmtiles) * [Vector Tiles Example (US Zip Codes)](https://protomaps.github.io/PMTiles/?url=https%3A%2F%2Fr2-public.protomaps.com%2Fprotomaps-sample-datasets%2Fcb_2018_us_zcta510_500k.pmtiles)
Demos require MapLibre GL JS v1.14.1-rc.2 or later Demos require MapLibre GL JS v1.14.1-rc.2 or later

View File

@@ -100,7 +100,7 @@ const ExampleList = styled("div", {
const EXAMPLE_FILES = [ const EXAMPLE_FILES = [
"https://protomaps.github.io/PMTiles/protomaps(vector)ODbL_firenze.pmtiles", "https://protomaps.github.io/PMTiles/protomaps(vector)ODbL_firenze.pmtiles",
"https://protomaps.github.io/PMTiles/stamen_toner(raster)CC-BY+ODbL_z3.pmtiles", "https://protomaps.github.io/PMTiles/stamen_toner(raster)CC-BY+ODbL_z3.pmtiles",
"https://pub-9288c68512ed46eca46ddcade307709b.r2.dev/protomaps-sample-datasets/cb_2018_us_zcta510_500k.pmtiles", "https://r2-public.protomaps.com/protomaps-sample-datasets/cb_2018_us_zcta510_500k.pmtiles",
]; ];
function Start(props: { function Start(props: {

View File

@@ -30,7 +30,7 @@
<script type="text/javascript"> <script type="text/javascript">
let protocol = new pmtiles.Protocol(); let protocol = new pmtiles.Protocol();
maplibregl.addProtocol("pmtiles",protocol.tile); maplibregl.addProtocol("pmtiles",protocol.tile);
let URL = "https://pub-9288c68512ed46eca46ddcade307709b.r2.dev/protomaps-sample-datasets/terrarium_z9.pmtiles"; let URL = "https://r2-public.protomaps.com/protomaps-sample-datasets/terrarium_z9.pmtiles";
function formatBytes(a,b=2){if(!+a)return"0 Bytes";const c=0>b?0:b,d=Math.floor(Math.log(a)/Math.log(1024));return`${parseFloat((a/Math.pow(1024,d)).toFixed(c))} ${["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][d]}`} function formatBytes(a,b=2){if(!+a)return"0 Bytes";const c=0>b?0:b,d=Math.floor(Math.log(a)/Math.log(1024));return`${parseFloat((a/Math.pow(1024,d)).toFixed(c))} ${["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][d]}`}

View File

@@ -53,7 +53,7 @@
} }
} }
const source = new OLPMTilesSource("https://pub-9288c68512ed46eca46ddcade307709b.r2.dev/protomaps-sample-datasets/nz-buildings-v3.pmtiles"); const source = new OLPMTilesSource("https://r2-public.protomaps.com/protomaps-sample-datasets/nz-buildings-v3.pmtiles");
const style = new ol.style.Style({ const style = new ol.style.Style({
stroke: new ol.style.Stroke({ stroke: new ol.style.Stroke({

View File

@@ -48,7 +48,7 @@
} }
} }
const source = new OLPMTilesSource("https://pub-9288c68512ed46eca46ddcade307709b.r2.dev/protomaps-sample-datasets/terrarium_z9.pmtiles"); const source = new OLPMTilesSource("https://r2-public.protomaps.com/protomaps-sample-datasets/terrarium_z9.pmtiles");
const rasterLayer = new ol.layer.Tile({ const rasterLayer = new ol.layer.Tile({
source: new ol.source.XYZ({ source: new ol.source.XYZ({