Skip to content

Commit 0ec49c4

Browse files
author
Peter Rushforth
committed
Arctic Wetlands Dataset demo page fwiw
1 parent e45f531 commit 0ec49c4

File tree

4 files changed

+67
-0
lines changed

4 files changed

+67
-0
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width,initial-scale=1">
6+
<title>Pan-Arctic Wetlands Dataset</title>
7+
<script type="module" src="../../dist/mapml.js"></script>
8+
<link rel="stylesheet" href="../../global.css">
9+
<script type="module">
10+
let map = document.querySelector("mapml-viewer");
11+
let cProjection = map.defineCustomProjection(`{ "projection": "EPSG3573", "proj4string" : "+proj=laea +lat_0=90 +lon_0=-100 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs", "origin" : [-4889334.802955,4889334.802955], "resolutions" : [38197.92815,19098.96407,9549.482037,4774.741019,2387.370509,1193.685255,596.8426273,298.4213137,149.2106568,74.60532841,37.30266421], "bounds" : [[-4594983,4507258],[4655569,-4562485]], "tilesize" : 256 }`);
12+
// this is necessary to get things started, unfortunately declarative won't work
13+
map.projection = cProjection;
14+
</script>
15+
16+
</head>
17+
<body>
18+
<mapml-viewer projection="EPSG3573" zoom="3" lat="64.094243" lon="-103.246" controls>
19+
<map-layer label="Arctic SDI basemap" checked hidden>
20+
<map-extent units="EPSG3573" checked hidden>
21+
<map-input type="zoom" name="TileMatrix" min="0" max="11" value="0"></map-input>
22+
<map-input type="location" name="TileCol" axis="column" units="tilematrix" min="0" max="1"></map-input>
23+
<map-input type="location" name="TileRow" axis="row" units="tilematrix" min="0" max="1"></map-input>
24+
<map-link rel="tile" tref="https://basemap.arctic-sdi.org/mapcache/wmts/1.0.0/arctic_cascading/default/3573/{TileMatrix}/{TileRow}/{TileCol}.png"></map-link>
25+
</map-extent>
26+
</map-layer>
27+
<map-layer label="Pan-Arctic Wetlands Dataset" checked>
28+
<map-link rel="legend" href="legend.html"></map-link>
29+
<map-link rel="license" title="© His Majesty the King in Right of Canada" href="https://app.geo.ca/en-ca/map-browser/record/8b83fd58-5953-4b80-8009-94d44ff89844"></map-link>
30+
<map-extent units="EPSG3573" checked hidden>
31+
<map-input type="zoom" name="TileMatrix" min="0" max="11" value="0"></map-input>
32+
<map-input type="location" name="TileCol" axis="column" units="tilematrix" min="0" max="1"></map-input>
33+
<map-input type="location" name="TileRow" axis="row" units="tilematrix" min="0" max="1"></map-input>
34+
<map-link rel="tile" tref="https://basemap.arctic-sdi.org/mapcache/wmts/1.0.0/arctic_cascading/default/3573/{TileMatrix}/{TileRow}/{TileCol}.png"></map-link>
35+
<map-input name="z" type="zoom" min="0" max="18"></map-input>
36+
<map-input name="txmin" type="location" rel="tile" position="top-left" axis="easting" units="tilematrix" ></map-input>
37+
<map-input name="tymin" type="location" rel="tile" position="bottom-left" axis="northing" units="tilematrix" ></map-input>
38+
<map-input name="txmax" type="location" rel="tile" position="top-right" axis="easting" units="tilematrix" ></map-input>
39+
<map-input name="tymax" type="location" rel="tile" position="top-left" axis="northing" units="tilematrix" ></map-input>
40+
<map-link rel="tile" tref="https://datacube.services.geo.ca/wrapper/ogc/pan-arctic-wetland-inventory?REQUEST=GetMap&SERVICE=WMS&VERSION=1.3.0&FORMAT=image%2Fpng&STYLES=official&TRANSPARENT=TRUE&LAYERS=pan-arctic-wetland-inventory&WIDTH=256&HEIGHT=256&CRS=EPSG%3A3573&BBOX={txmin},{tymin},{txmax},{tymax}" ></map-link>
41+
<map-input name="xmin" type="location" position="top-left" axis="easting" units="pcrs" ></map-input>
42+
<map-input name="ymin" type="location" position="bottom-right" axis="northing" units="pcrs" ></map-input>
43+
<map-input name="xmax" type="location" position="bottoms-right" axis="easting" units="pcrs" ></map-input>
44+
<map-input name="ymax" type="location" position="top-left" axis="northing" units="pcrs" ></map-input>
45+
<map-input name="i" type="location" axis="i" units="map"></map-input>
46+
<map-input name="j" type="location" axis="j" units="map"></map-input>
47+
<map-input name="w" type="width"></map-input>
48+
<map-input name="h" type="height"></map-input>
49+
<map-link rel="query" tref="https://datacube.services.geo.ca/wrapper/ogc/pan-arctic-wetland-inventory?QUERY_LAYERS=pan-arctic-wetland-inventory&REQUEST=GetFeatureInfo&SERVICE=WMS&VERSION=1.3.0&INFO_FORMAT=application%2Fjson&FORMAT=image%2Fpng&STYLES=official&TRANSPARENT=TRUE&LAYERS=pan-arctic-wetland-inventory&WIDTH={w}&HEIGHT={h}&CRS=EPSG%3A3573&BBOX={xmin},{ymin},{xmax},{ymax}&I={i}&J={j}" ></map-link>
50+
<map-link rel="query" tref="legend.html?W={w}&H={h}"></map-link>
51+
</map-extent>
52+
</map-layer>
53+
</mapml-viewer>
54+
</body>
55+
</html>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<title>Pan-Arctic Wetlands Dataset Legend</title>
6+
</head>
7+
<body>
8+
<h3 style="font-family: arial">Legend</h3>
9+
<img src="legend.png" alt="Colour legend showing 7-colour classification. 1=Bog, 2=Fen, 3=Swamp, 4=Marsh, 5=Water, 6=Snow/Ice, 7=Upland">
10+
</body>
11+
</html>
33.3 KB
Loading

index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<meta name="viewport" content="width=device-width,initial-scale=1">
66
<title>Examples and Experiments</title>
77
<link rel="stylesheet" href="global.css">
8+
<link rel="icon" href="dist/images/w3community.ico" type="image/x-icon">
89
<style>
910
body {
1011
padding: 1rem;

0 commit comments

Comments
 (0)