@basemaps/landing 6.41.0 → 6.44.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/README.md +21 -0
  3. package/build/__tests__/map.config.test.js +0 -19
  4. package/build/__tests__/map.config.test.js.map +1 -1
  5. package/build/components/debug.js +3 -3
  6. package/build/components/debug.js.map +1 -1
  7. package/build/components/layer.switcher.dropdown.d.ts.map +1 -1
  8. package/build/components/layer.switcher.dropdown.js +26 -2
  9. package/build/components/layer.switcher.dropdown.js.map +1 -1
  10. package/build/components/layout.header.d.ts.map +1 -1
  11. package/build/components/layout.header.js +1 -1
  12. package/build/components/layout.header.js.map +1 -1
  13. package/build/components/map.d.ts.map +1 -1
  14. package/build/components/map.js +6 -3
  15. package/build/components/map.js.map +1 -1
  16. package/build/config.d.ts +2 -0
  17. package/build/config.d.ts.map +1 -1
  18. package/build/config.js +5 -0
  19. package/build/config.js.map +1 -1
  20. package/build/config.map.d.ts.map +1 -1
  21. package/build/config.map.js +15 -10
  22. package/build/config.map.js.map +1 -1
  23. package/build/url.d.ts +0 -13
  24. package/build/url.d.ts.map +1 -1
  25. package/build/url.js +1 -39
  26. package/build/url.js.map +1 -1
  27. package/package.json +7 -7
  28. package/dist/android-chrome-192x192.png +0 -0
  29. package/dist/android-chrome-512x512.png +0 -0
  30. package/dist/apple-touch-icon.png +0 -0
  31. package/dist/assets/fonts/OpenSans-Bold.woff2 +0 -0
  32. package/dist/assets/fonts/OpenSans-Italic.woff2 +0 -0
  33. package/dist/assets/fonts/OpenSans-Light.woff2 +0 -0
  34. package/dist/assets/fonts/OpenSans-Regular.woff2 +0 -0
  35. package/dist/assets/fonts/OpenSans-SemiBold.woff2 +0 -0
  36. package/dist/assets/logo-linz.svg +0 -256
  37. package/dist/assets/logo-nz-govt.svg +0 -11
  38. package/dist/basemaps-card.jpeg +0 -0
  39. package/dist/examples/index.html +0 -33
  40. package/dist/examples/index.leaflet.xyz.3857.html +0 -43
  41. package/dist/examples/index.maplibre.compare.3857.html +0 -111
  42. package/dist/examples/index.maplibre.opacity.3857.html +0 -218
  43. package/dist/examples/index.maplibre.vector.3857.html +0 -48
  44. package/dist/examples/index.openlayers.attribution.wmts.3857.html +0 -55
  45. package/dist/examples/index.openlayers.wmts.3857.html +0 -49
  46. package/dist/examples/index.openlayers.xyz.3857.html +0 -49
  47. package/dist/favicon-16x16.png +0 -0
  48. package/dist/favicon-32x32.png +0 -0
  49. package/dist/favicon.ico +0 -0
  50. package/dist/index-6.41.0-04bd3d24eee59f30.css +0 -6280
  51. package/dist/index-6.41.0-ae3950c364b06ab8.js +0 -59403
  52. package/dist/index-6.41.0-dce2cbdab3dc8de4.js +0 -624
  53. package/dist/index.css +0 -6280
  54. package/dist/index.html +0 -26
  55. package/dist/index.js +0 -624
  56. package/dist/json-schema/stac-basemaps-extension/1.0/schema.json +0 -144
  57. package/dist/lib/attribution-6.41.0-a06a4339e5df297e.js +0 -10
  58. package/dist/lib/attribution-6.41.0-f0099e1099a7c0ac.js +0 -2330
  59. package/dist/lib/attribution.js +0 -10
@@ -1,218 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <title>Adjust a layer's opacity</title>
6
- <meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" />
7
- <script
8
- src="https://unpkg.com/maplibre-gl@1.14.0-rc.1/dist/maplibre-gl.js"
9
- integrity="sha384-YAsv3Nk7n9hAR/gbvgvtGvq2TV1hvEpFks3bGIs451f9D0jSn070rHje6Swuo7bL"
10
- crossorigin="anonymous"
11
- ></script>
12
- <link href="https://unpkg.com/maplibre-gl@1.14.0-rc.1/dist/maplibre-gl.css" rel="stylesheet" />
13
- <style>
14
- body {
15
- margin: 0;
16
- padding: 0;
17
- overflow: hidden;
18
- }
19
-
20
- body * {
21
- -webkit-touch-callout: none;
22
- -webkit-user-select: none;
23
- -moz-user-select: none;
24
- -ms-user-select: none;
25
- user-select: none;
26
- }
27
-
28
- .map {
29
- position: absolute;
30
- top: 0;
31
- bottom: 0;
32
- width: 100%;
33
- }
34
-
35
- .map-overlay {
36
- font: bold 12px/20px 'Helvetica Neue', Arial, Helvetica, sans-serif;
37
- position: absolute;
38
- width: 25%;
39
- top: 0;
40
- left: 0;
41
- padding: 10px;
42
- }
43
-
44
- .map-overlay .map-overlay-inner {
45
- background-color: #fff;
46
- box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
47
- border-radius: 3px;
48
- padding: 10px;
49
- margin-bottom: 10px;
50
- }
51
-
52
- .map-overlay label {
53
- display: block;
54
- margin: 0 0 10px;
55
- }
56
-
57
- .map-overlay input {
58
- background-color: transparent;
59
- display: inline-block;
60
- width: 100%;
61
- position: relative;
62
- margin: 0;
63
- cursor: ew-resize;
64
- }
65
- </style>
66
- </head>
67
- <body>
68
- <div id="raster" class="map"></div>
69
- <div id="vector" class="map"></div>
70
-
71
- <div class="map-overlay top">
72
- <div class="map-overlay-inner">
73
- <label>Layer opacity: <span id="slider-value">100%</span></label>
74
- <input id="slider" type="range" min="0" max="100" step="0" value="100" />
75
- </div>
76
- </div>
77
-
78
- <script>
79
- const apiKey = localStorage.getItem('api-key');
80
- if (!apiKey) {
81
- throw new Error('Missing api-key in localStorage');
82
- }
83
-
84
- // vector layers
85
- const styleUrl =
86
- 'https://basemaps.linz.govt.nz/v1/tiles/topographic/EPSG:3857/style/topographic.json?api=' + apiKey;
87
-
88
- // Raster layers
89
- const url = 'https://basemaps.linz.govt.nz/v1/tiles/aerial/EPSG:3857/{z}/{x}/{y}.webp?api=' + apiKey;
90
-
91
- const startPos = [173, -40.5];
92
- const startZoom = 6;
93
-
94
- var raster = new maplibregl.Map({
95
- container: 'raster', // Container ID
96
- style: {
97
- version: 8,
98
- sources: {
99
- 'raster-tiles': {
100
- type: 'raster',
101
- tiles: [url],
102
- tileSize: 256,
103
- },
104
- },
105
- layers: [
106
- {
107
- id: 'LINZ Raster Basemaps',
108
- type: 'raster',
109
- source: 'raster-tiles',
110
- },
111
- ],
112
- },
113
- center: startPos,
114
- zoom: startZoom,
115
- });
116
-
117
- var vector = new maplibregl.Map({
118
- container: 'vector', // Container ID
119
- style: styleUrl,
120
- center: startPos,
121
- zoom: startZoom,
122
- });
123
-
124
- var slider = document.getElementById('slider');
125
- var sliderValue = document.getElementById('slider-value');
126
-
127
- vector.on('load', function () {
128
- slider.addEventListener('input', function (e) {
129
- var vectorMap = document.querySelector('#vector');
130
- vectorMap.style.opacity = parseInt(e.target.value, 10) / 100;
131
- sliderValue.textContent = e.target.value + '%';
132
- });
133
- });
134
-
135
- // Copyright (c) 2016, Mapbox
136
- // https://github.com/mapbox/mapbox-gl-sync-move
137
- function moveToMapPosition(master, clones) {
138
- let center = master.getCenter();
139
- let zoom = master.getZoom();
140
- let bearing = master.getBearing();
141
- let pitch = master.getPitch();
142
-
143
- clones.forEach(function (clone) {
144
- clone.jumpTo({
145
- center: center,
146
- zoom: zoom,
147
- bearing: bearing,
148
- pitch: pitch,
149
- });
150
- });
151
- }
152
-
153
- // Sync movements of two maps.
154
- //
155
- // All interactions that result in movement end up firing
156
- // a "move" event. The trick here, though, is to
157
- // ensure that movements don't cycle from one map
158
- // to the other and back again, because such a cycle
159
- // - could cause an infinite loop
160
- // - prematurely halts prolonged movements like
161
- // double-click zooming, box-zooming, and flying
162
- function syncMaps() {
163
- let maps;
164
- let argLen = arguments.length;
165
- if (argLen === 1) {
166
- maps = arguments[0];
167
- } else {
168
- maps = [];
169
- for (let i = 0; i < argLen; i++) {
170
- maps.push(arguments[i]);
171
- }
172
- }
173
-
174
- // Create all the movement functions, because if they're created every time
175
- // they wouldn't be the same and couldn't be removed.
176
- let fns = [];
177
- maps.forEach(function (map, index) {
178
- fns[index] = sync.bind(
179
- null,
180
- map,
181
- maps.filter(function (o, i) {
182
- return i !== index;
183
- }),
184
- );
185
- });
186
-
187
- function on() {
188
- maps.forEach(function (map, index) {
189
- map.on('move', fns[index]);
190
- });
191
- }
192
-
193
- function off() {
194
- maps.forEach(function (map, index) {
195
- map.off('move', fns[index]);
196
- });
197
- }
198
-
199
- // When one map moves, we turn off the movement listeners
200
- // on all the maps, move it, then turn the listeners on again
201
- function sync(master, clones) {
202
- off();
203
- moveToMapPosition(master, clones);
204
- on();
205
- }
206
-
207
- on();
208
- return function () {
209
- off();
210
- fns = [];
211
- maps = [];
212
- };
213
- }
214
-
215
- syncMaps(raster, vector);
216
- </script>
217
- </body>
218
- </html>
@@ -1,48 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <title>Maplibre WGS84 Topographic Vector Basemaps Demo</title>
6
- <meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" />
7
- <script
8
- src="https://unpkg.com/maplibre-gl@1.14.0-rc.1/dist/maplibre-gl.js"
9
- integrity="sha384-YAsv3Nk7n9hAR/gbvgvtGvq2TV1hvEpFks3bGIs451f9D0jSn070rHje6Swuo7bL"
10
- crossorigin="anonymous"
11
- ></script>
12
- <link href="https://unpkg.com/maplibre-gl@1.14.0-rc.1/dist/maplibre-gl.css" rel="stylesheet" />
13
- <style>
14
- body {
15
- margin: 0;
16
- padding: 0;
17
- }
18
- #map {
19
- position: absolute;
20
- top: 0;
21
- bottom: 0;
22
- width: 100%;
23
- }
24
- </style>
25
- </head>
26
- <body>
27
- <div id="map"></div>
28
- <script>
29
- const apiKey = localStorage.getItem('api-key');
30
- if (!apiKey) {
31
- throw new Error('Missing api-key in localStorage');
32
- }
33
-
34
- const startPos = [173, -40.5];
35
- const startZoom = 6;
36
-
37
- // vector layers
38
- const style =
39
- 'https://basemaps.linz.govt.nz/v1/tiles/topographic/EPSG:3857/style/topographic.json?api=' + apiKey;
40
- var map = new maplibregl.Map({
41
- container: 'map', // container id
42
- style: style, // style URL
43
- center: startPos, // starting position [lng, lat]
44
- zoom: startZoom, // starting zoom
45
- });
46
- </script>
47
- </body>
48
- </html>
@@ -1,55 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
-
4
- <head>
5
- <meta charset="UTF-8" />
6
- <title>OpenLayers WMTS Basemaps Demo</title>
7
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@master/en/v6.3.1/css/ol.css"
8
- type="text/css" />
9
- <script src="https://cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@master/en/v6.3.1/build/ol.js"></script>
10
- <script src="../lib/attribution-6.41.0-a06a4339e5df297e.js" integrity="sha512-oGpDOeXfKX7ahk5H+Qecu9uxrQ6SJo3YaSISn/KXyo6yrQlGi3n8WUbD3IWwYGDmCJ4xEV9rYwKXF5VOghtMyQ=="></script>
11
- </head>
12
-
13
- <body>
14
- <div id="map" style="width: 800px; height: 600px;"></div>
15
- <script>
16
- (async () => {
17
- const apiKey = localStorage.getItem('api-key');
18
- if (!apiKey) throw new Error('Missing api-key in localStorage');
19
-
20
- const projection = 'EPSG:3857';
21
- const baseUrl = 'https://basemaps.linz.govt.nz/v1/tiles/aerial/' + projection;
22
- const loadingWmts = fetch(baseUrl + '/WMTSCapabilities.xml?api=' + apiKey);
23
-
24
- const parser = new ol.format.WMTSCapabilities();
25
- const wmtsXml = parser.read(await (await loadingWmts).text());
26
- const options = ol.source.WMTS.optionsFromCapabilities(wmtsXml, {
27
- layer: 'aerial',
28
- matrixSet: projection,
29
- });
30
-
31
- const view = new ol.View({ center: [19467552, -5074414], zoom: 6, });
32
-
33
- const source = new ol.source.WMTS(options);
34
-
35
- const map = new ol.Map({
36
- target: 'map',
37
- layers: [new ol.layer.Tile({ source, projection })],
38
- controls: ol.control.defaults({ attributionOptions: { collapsed: false, collapsible: false } }),
39
- view,
40
- });
41
-
42
- const attributions = await BasemapsAttribution.load(baseUrl + '/attribution.json?api=' + apiKey);
43
- // Ignore the hillshade layers from attribution
44
- attributions.isIgnored = a => a.collection.title.toLowerCase().includes('geographx')
45
- map.addEventListener('moveend', () => {
46
- // Transform the extent into Lat/Long
47
- const extent = ol.proj.transformExtent(view.calculateExtent(), projection, 'EPSG:4326');
48
- const filtered = attributions.filter({ extent, zoom: view.getZoom() });
49
- source.setAttributions(attributions.renderList(filtered));
50
- });
51
- })();
52
- </script>
53
- </body>
54
-
55
- </html>
@@ -1,49 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta charset="UTF-8" />
5
- <title>OpenLayers WMTS Basemaps Demo</title>
6
- <link
7
- rel="stylesheet"
8
- href="https://cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@master/en/v6.3.1/css/ol.css"
9
- type="text/css"
10
- />
11
- <script src="https://cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@master/en/v6.3.1/build/ol.js"></script>
12
- </head>
13
-
14
- <body>
15
- <div id="map" style="width: 800px; height: 600px;"></div>
16
- <script>
17
- (async () => {
18
- const apiKey = localStorage.getItem('api-key');
19
- if (! apiKey) {
20
- throw new Error('Missing api-key in localStorage');
21
- }
22
-
23
- const projection = 'EPSG:3857';
24
- const baseUrl = 'https://basemaps.linz.govt.nz/v1/tiles/aerial/' + projection;
25
- const loadingWmts = fetch(baseUrl+'/WMTSCapabilities.xml?api='+apiKey);
26
-
27
- const parser = new ol.format.WMTSCapabilities();
28
- const wmtsXml = parser.read(await (await loadingWmts).text());
29
- const options = ol.source.WMTS.optionsFromCapabilities(wmtsXml, {
30
- layer: 'aerial',
31
- matrixSet: projection,
32
- });
33
-
34
- const source = new ol.source.WMTS(options);
35
- source.setAttributions('<a href="https://www.linz.govt.nz/data/linz-data/linz-basemaps/data-attribution">LINZ CC BY 4.0 © Imagery Basemap contributors</a>');
36
-
37
- new ol.Map({
38
- target: 'map',
39
- layers: [new ol.layer.Tile({ source, projection })],
40
- controls: ol.control.defaults({ attributionOptions: { collapsed: false, collapsible: false } }),
41
- view: new ol.View({
42
- center: [19467552, -5074414],
43
- zoom: 6,
44
- }),
45
- });
46
- })();
47
- </script>
48
- </body>
49
- </html>
@@ -1,49 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta charset="UTF-8" />
5
- <title>OpenLayers WGS84 Basemaps Demo</title>
6
- <link
7
- rel="stylesheet"
8
- href="https://cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@master/en/v6.3.1/css/ol.css"
9
- type="text/css"
10
- />
11
- <style>
12
- html,
13
- body {
14
- height: 100%;
15
- margin: 0;
16
- }
17
- </style>
18
- <script src="https://cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@master/en/v6.3.1/build/ol.js"></script>
19
- </head>
20
-
21
- <body>
22
- <div id="map" style="width: 500px; height: 500px;"></div>
23
- <script>
24
- const apiKey = localStorage.getItem('api-key');
25
- if (! apiKey) {
26
- throw new Error('Missing api-key in localStorage');
27
- }
28
-
29
- const url = 'https://basemaps.linz.govt.nz/v1/tiles/aerial/EPSG:3857/{z}/{x}/{y}.webp?api='+apiKey;
30
- const attributions = '<a href="https://www.linz.govt.nz/data/linz-data/linz-basemaps/data-attribution">LINZ CC BY 4.0 © Imagery Basemap contributors</a>';
31
-
32
- new ol.Map({
33
- target: 'map',
34
- layers: [
35
- new ol.layer.Tile({
36
- source: new ol.source.XYZ({
37
- url,
38
- attributions: [attributions]
39
- })
40
- })
41
- ],
42
- view: new ol.View({
43
- center: [19467552, -5074414],
44
- zoom: 6
45
- }),
46
- });
47
- </script>
48
- </body>
49
- </html>
Binary file
Binary file
package/dist/favicon.ico DELETED
Binary file