mirror of
https://github.com/protomaps/PMTiles.git
synced 2026-02-04 02:41:09 +00:00
Replace terrarium examples with mapterhorn (#618)
* update examples to maplibre 5.13.0
This commit is contained in:
@@ -2,8 +2,8 @@
|
|||||||
<head>
|
<head>
|
||||||
<title>PMTiles MapLibre Example</title>
|
<title>PMTiles MapLibre Example</title>
|
||||||
<meta charset="utf-8"/>
|
<meta charset="utf-8"/>
|
||||||
<link rel="stylesheet" href="https://unpkg.com/maplibre-gl@4.7.0/dist/maplibre-gl.css" crossorigin="anonymous">
|
<link rel="stylesheet" href="https://unpkg.com/maplibre-gl@5.13.0/dist/maplibre-gl.css" crossorigin="anonymous">
|
||||||
<script src="https://unpkg.com/maplibre-gl@4.7.0/dist/maplibre-gl.js" crossorigin="anonymous"></script>
|
<script src="https://unpkg.com/maplibre-gl@5.13.0/dist/maplibre-gl.js" crossorigin="anonymous"></script>
|
||||||
<script src="https://unpkg.com/pmtiles@4.3.0/dist/pmtiles.js"></script>
|
<script src="https://unpkg.com/pmtiles@4.3.0/dist/pmtiles.js"></script>
|
||||||
<style>
|
<style>
|
||||||
body {
|
body {
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
<head>
|
<head>
|
||||||
<title>PMTiles MapLibre Example</title>
|
<title>PMTiles MapLibre Example</title>
|
||||||
<meta charset="utf-8"/>
|
<meta charset="utf-8"/>
|
||||||
<link rel="stylesheet" href="https://unpkg.com/maplibre-gl@4.7.0/dist/maplibre-gl.css" crossorigin="anonymous">
|
<link rel="stylesheet" href="https://unpkg.com/maplibre-gl@5.13.0/dist/maplibre-gl.css" crossorigin="anonymous">
|
||||||
<script src="https://unpkg.com/maplibre-gl@4.7.0/dist/maplibre-gl.js" crossorigin="anonymous"></script>
|
<script src="https://unpkg.com/maplibre-gl@5.13.0/dist/maplibre-gl.js" crossorigin="anonymous"></script>
|
||||||
<script src="https://unpkg.com/pmtiles@4.3.0/dist/pmtiles.js"></script>
|
<script src="https://unpkg.com/pmtiles@4.3.0/dist/pmtiles.js"></script>
|
||||||
<style>
|
<style>
|
||||||
body {
|
body {
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
<head>
|
<head>
|
||||||
<title>PMTiles MapLibre Raster DEM Example</title>
|
<title>PMTiles MapLibre Raster DEM Example</title>
|
||||||
<meta charset="utf-8"/>
|
<meta charset="utf-8"/>
|
||||||
<link rel="stylesheet" href="https://unpkg.com/maplibre-gl@4.7.0/dist/maplibre-gl.css" crossorigin="anonymous">
|
<link rel="stylesheet" href="https://unpkg.com/maplibre-gl@5.13.0/dist/maplibre-gl.css" crossorigin="anonymous">
|
||||||
<script src="https://unpkg.com/maplibre-gl@4.7.0/dist/maplibre-gl.js" crossorigin="anonymous"></script>
|
<script src="https://unpkg.com/maplibre-gl@5.13.0/dist/maplibre-gl.js" crossorigin="anonymous"></script>
|
||||||
<script src="https://unpkg.com/pmtiles@4.3.0/dist/pmtiles.js"></script>
|
<script src="https://unpkg.com/pmtiles@4.3.0/dist/pmtiles.js"></script>
|
||||||
<style>
|
<style>
|
||||||
body {
|
body {
|
||||||
@@ -40,8 +40,9 @@
|
|||||||
sources: {
|
sources: {
|
||||||
example_source: {
|
example_source: {
|
||||||
type: "raster-dem",
|
type: "raster-dem",
|
||||||
url: "pmtiles://https://r2-public.protomaps.com/protomaps-sample-datasets/terrarium_z9.pmtiles",
|
url: "pmtiles://https://download.mapterhorn.com/planet.pmtiles",
|
||||||
encoding: "terrarium",
|
encoding: "terrarium",
|
||||||
|
attribution: "<a href='https://mapterhorn.com/attribution'>© Mapterhorn</a>"
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
layers: [
|
layers: [
|
||||||
|
|||||||
@@ -23,8 +23,8 @@ import { useGeographic } from 'ol/proj';
|
|||||||
|
|
||||||
const rasterLayer = new WebGLTile({
|
const rasterLayer = new WebGLTile({
|
||||||
source: new PMTilesRasterSource({
|
source: new PMTilesRasterSource({
|
||||||
url:"https://r2-public.protomaps.com/protomaps-sample-datasets/terrarium_z9.pmtiles",
|
url:"https://download.mapterhorn.com/planet.pmtiles",
|
||||||
attributions:["https://github.com/tilezen/joerd/blob/master/docs/attribution.md"],
|
attributions:["https://mapterhorn.com/attribution/"],
|
||||||
tileSize: [512,512]
|
tileSize: [512,512]
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -17,8 +17,8 @@
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
const rasterLayer = new ol.layer.WebGLTile({
|
const rasterLayer = new ol.layer.WebGLTile({
|
||||||
source: new olpmtiles.PMTilesRasterSource({
|
source: new olpmtiles.PMTilesRasterSource({
|
||||||
url:"https://r2-public.protomaps.com/protomaps-sample-datasets/terrarium_z9.pmtiles",
|
url:"https://download.mapterhorn.com/planet.pmtiles",
|
||||||
attributions:["https://github.com/tilezen/joerd/blob/master/docs/attribution.md"],
|
attributions:["https://mapterhorn.com/attribution/"],
|
||||||
tileSize: [512,512]
|
tileSize: [512,512]
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user