forked from Maps4HTML/MapML.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
128 lines (120 loc) · 4.05 KB
/
index.html
File metadata and controls
128 lines (120 loc) · 4.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>index-map.html</title>
<script type="module" src="dist/mapml-viewer.js"></script>
<style>
html,
body {
height: 100%;
}
* {
margin: 0;
padding: 0;
}
/* Specifying the `:defined` selector is recommended to style the map
element, such that styles don't apply when fallback content is in use
(e.g. when scripting is disabled or when custom/built-in elements isn't
supported in the browser). */
mapml-viewer:defined {
/* Responsive map. */
max-width: 100%;
/* Full viewport. */
width: 100%;
height: 100%;
/* Remove default (native-like) border. */
border: none;
vertical-align: middle;
}
/* Pre-style to avoid FOUC of inline layer- and fallback content. */
mapml-viewer:not(:defined) > * {
display: none;
}
/* Pre-style to avoid Layout Shift. */
mapml-viewer:not(:defined) {
display: inline-block;
contain: size;
contain-intrinsic-size: 304px 154px;
}
/* Ensure inline layer content is hidden if custom/built-in elements isn't
supported, or if javascript is disabled. This needs to be defined separately
from the above, because the `:not(:defined)` selector invalidates the entire
declaration in browsers that do not support it. */
layer- {
display: none;
}
</style>
<noscript>
<style>
/* Ensure fallback content (children of the map element) is displayed if
custom/built-in elements is supported but javascript is disabled. */
mapml-viewer:not(:defined) > :not(layer-) {
display: initial;
}
/* "Reset" the properties used to pre-style (to avoid Layout Shift) if
custom/built-in elements is supported but javascript is disabled. */
mapml-viewer:not(:defined) {
display: initial;
contain: initial;
contain-intrinsic-size: initial;
}
</style>
</noscript>
</head>
<body>
<mapml-viewer projection="CBMTILE" zoom="2" lat="45" lon="-90" controls controlslist="nofullscreen geolocation">
<map-caption>A pleasing map of Canada</map-caption>
<layer- label="CBMT" src="https://geogratis.gc.ca/mapml/en/cbmtile/cbmt/" checked></layer->
<layer- label="Hat Guy" checked>
<map-feature id="twohats" zoom="15" class="twohats">
<map-properties>
<table>
<tr>
<th>code</th>
<td>1200020</td>
</tr>
<tr>
<th>accuracy</th>
<td>26</td>
</tr>
<tr>
<th>valdate</th>
<td>1995</td>
</tr>
<tr>
<th>image</th>
<td><a href="https://www.veterans.gc.ca/eng/remembrance/memorials/national-inventory-canadian-memorials/details/9304">
<img src="https://www.veterans.gc.ca/images/remembrance/memorials/national-inventory-canadian-memorials/mem/35059-173a.jpg" width="60" height="60"/>
</a>
</td>
</tr>
<tr>
<th>theme</th>
<td>FO</td>
</tr>
<tr>
<th>type</th>
<td>2</td>
</tr>
<tr>
<th>elevation</th>
<td>61</td>
</tr>
<tr>
<th>altiaccu</th>
<td>5</td>
</tr>
</table>
</map-properties>
<map-geometry>
<map-point>
<map-coordinates>-75.705278 45.397778</map-coordinates>
</map-point>
</map-geometry>
</map-feature>
</layer->
</mapml-viewer>
</body>
</html>