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>
|
||||
<title>PMTiles MapLibre Example</title>
|
||||
<meta charset="utf-8"/>
|
||||
<link rel="stylesheet" href="https://unpkg.com/maplibre-gl@4.7.0/dist/maplibre-gl.css" crossorigin="anonymous">
|
||||
<script src="https://unpkg.com/maplibre-gl@4.7.0/dist/maplibre-gl.js" crossorigin="anonymous"></script>
|
||||
<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@5.13.0/dist/maplibre-gl.js" crossorigin="anonymous"></script>
|
||||
<script src="https://unpkg.com/pmtiles@4.3.0/dist/pmtiles.js"></script>
|
||||
<style>
|
||||
body {
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
<head>
|
||||
<title>PMTiles MapLibre Example</title>
|
||||
<meta charset="utf-8"/>
|
||||
<link rel="stylesheet" href="https://unpkg.com/maplibre-gl@4.7.0/dist/maplibre-gl.css" crossorigin="anonymous">
|
||||
<script src="https://unpkg.com/maplibre-gl@4.7.0/dist/maplibre-gl.js" crossorigin="anonymous"></script>
|
||||
<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@5.13.0/dist/maplibre-gl.js" crossorigin="anonymous"></script>
|
||||
<script src="https://unpkg.com/pmtiles@4.3.0/dist/pmtiles.js"></script>
|
||||
<style>
|
||||
body {
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
<head>
|
||||
<title>PMTiles MapLibre Raster DEM Example</title>
|
||||
<meta charset="utf-8"/>
|
||||
<link rel="stylesheet" href="https://unpkg.com/maplibre-gl@4.7.0/dist/maplibre-gl.css" crossorigin="anonymous">
|
||||
<script src="https://unpkg.com/maplibre-gl@4.7.0/dist/maplibre-gl.js" crossorigin="anonymous"></script>
|
||||
<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@5.13.0/dist/maplibre-gl.js" crossorigin="anonymous"></script>
|
||||
<script src="https://unpkg.com/pmtiles@4.3.0/dist/pmtiles.js"></script>
|
||||
<style>
|
||||
body {
|
||||
@@ -40,8 +40,9 @@
|
||||
sources: {
|
||||
example_source: {
|
||||
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",
|
||||
attribution: "<a href='https://mapterhorn.com/attribution'>© Mapterhorn</a>"
|
||||
},
|
||||
},
|
||||
layers: [
|
||||
|
||||
@@ -23,8 +23,8 @@ import { useGeographic } from 'ol/proj';
|
||||
|
||||
const rasterLayer = new WebGLTile({
|
||||
source: new PMTilesRasterSource({
|
||||
url:"https://r2-public.protomaps.com/protomaps-sample-datasets/terrarium_z9.pmtiles",
|
||||
attributions:["https://github.com/tilezen/joerd/blob/master/docs/attribution.md"],
|
||||
url:"https://download.mapterhorn.com/planet.pmtiles",
|
||||
attributions:["https://mapterhorn.com/attribution/"],
|
||||
tileSize: [512,512]
|
||||
})
|
||||
});
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
<script type="text/javascript">
|
||||
const rasterLayer = new ol.layer.WebGLTile({
|
||||
source: new olpmtiles.PMTilesRasterSource({
|
||||
url:"https://r2-public.protomaps.com/protomaps-sample-datasets/terrarium_z9.pmtiles",
|
||||
attributions:["https://github.com/tilezen/joerd/blob/master/docs/attribution.md"],
|
||||
url:"https://download.mapterhorn.com/planet.pmtiles",
|
||||
attributions:["https://mapterhorn.com/attribution/"],
|
||||
tileSize: [512,512]
|
||||
})
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user