@basemaps/landing 7.9.0 → 7.10.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.
- package/build/components/map.label.d.ts +2 -0
- package/build/components/map.label.js +11 -1
- package/build/components/map.label.js.map +1 -1
- package/dist/docs/404.html +22 -0
- package/dist/docs/configuration/index.html +7 -0
- package/dist/docs/deployment/index.html +7 -0
- package/dist/docs/developer-guide/index.html +7 -0
- package/dist/docs/examples/_overview/index.html +7 -0
- package/dist/docs/examples/leaflet.xyz.3857/index.html +7 -0
- package/dist/docs/examples/maplibre.opacity.3857/index.html +7 -0
- package/dist/docs/examples/maplibre.vector.3857/index.html +7 -0
- package/dist/docs/index.html +7 -0
- package/dist/docs/operator-guide/cog-quality/index.html +7 -0
- package/dist/docs/operator-guide/empty-tiles/index.html +7 -0
- package/dist/docs/operator-guide/gebco/index.html +7 -0
- package/dist/docs/operator-guide/index.html +7 -0
- package/dist/docs/operator-guide/quick-start/index.html +7 -0
- package/dist/docs/operator-guide/relief-shade/index.html +7 -0
- package/dist/docs/operator-guide/static/projection_beehive_fakenztm2000.webp +0 -0
- package/dist/docs/operator-guide/static/projection_beehive_nztm2000quad.webp +0 -0
- package/dist/docs/operator-guide/static/projection_nztm2000quad_0_0_0.webp +0 -0
- package/dist/docs/operator-guide/texture-shade/index.html +8 -1
- package/dist/docs/operator-guide/xyz-projection/index.html +533 -0
- package/dist/docs/quick-start/index.html +7 -0
- package/dist/docs/sitemap.xml +24 -19
- package/dist/docs/sitemap.xml.gz +0 -0
- package/dist/docs/user-guide/_get-started/index.html +8 -1
- package/dist/docs/user-guide/api-documentation/index.html +8 -1
- package/dist/docs/user-guide/api-documentation/{swagger-654fffa1.html → swagger-a5588c46.html} +1 -1
- package/dist/docs/user-guide/technical-documentation/index.html +7 -0
- package/package.json +5 -5
|
@@ -51,7 +51,7 @@ export class MapLabelControl {
|
|
|
51
51
|
return;
|
|
52
52
|
this.button.classList.remove('maplibregl-ctrl-labels-enabled');
|
|
53
53
|
// Topographic style disables the button
|
|
54
|
-
if (
|
|
54
|
+
if (this.isDisabled()) {
|
|
55
55
|
this.button.classList.add('display-none');
|
|
56
56
|
this.button.title = 'Topographic style does not support layers';
|
|
57
57
|
return;
|
|
@@ -92,5 +92,15 @@ export class MapLabelControl {
|
|
|
92
92
|
this.events = [];
|
|
93
93
|
this.map = undefined;
|
|
94
94
|
}
|
|
95
|
+
/** Is the label button hidden from view */
|
|
96
|
+
isDisabled() {
|
|
97
|
+
// Most vector styles have overlaps with the labels and make them useless
|
|
98
|
+
if (Config.map.style && LabelsDisabledLayers.has(Config.map.style))
|
|
99
|
+
return true;
|
|
100
|
+
// Labels use the merge style feature and need the production configuration to work
|
|
101
|
+
if (Config.map.isDebug && Config.map.config)
|
|
102
|
+
return true;
|
|
103
|
+
return false;
|
|
104
|
+
}
|
|
95
105
|
}
|
|
96
106
|
//# sourceMappingURL=map.label.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"map.label.js","sourceRoot":"","sources":["../../src/components/map.label.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAW,OAAO,EAAE,MAAM,cAAc,CAAC;AAExD,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,GAAG,CAAC,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC,CAAC;AAEzE,MAAM,OAAO,eAAe;IAA5B;QACE;;;;;WAAqB;QACrB;;;;;WAA2B;QAC3B;;;;;WAA2B;QAC3B;;;;;WAAyB;QACzB;;;;mBAA4B,EAAE;WAAC;QAgC/B;;;;mBAAe,GAAS,EAAE;gBACxB,MAAM,UAAU,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC;gBACtC,OAAO,wBAAa,UAAU,UAAU,EAAE,CAAC,CAAC;gBAC5C,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;YACnC,CAAC;WAAC;
|
|
1
|
+
{"version":3,"file":"map.label.js","sourceRoot":"","sources":["../../src/components/map.label.tsx"],"names":[],"mappings":"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"}
|
package/dist/docs/404.html
CHANGED
|
@@ -492,6 +492,8 @@
|
|
|
492
492
|
|
|
493
493
|
|
|
494
494
|
|
|
495
|
+
|
|
496
|
+
|
|
495
497
|
|
|
496
498
|
|
|
497
499
|
|
|
@@ -655,6 +657,26 @@
|
|
|
655
657
|
|
|
656
658
|
|
|
657
659
|
|
|
660
|
+
|
|
661
|
+
|
|
662
|
+
|
|
663
|
+
|
|
664
|
+
|
|
665
|
+
<li class="md-nav__item">
|
|
666
|
+
<a href="/docs/operator-guide/xyz-projection/" class="md-nav__link">
|
|
667
|
+
|
|
668
|
+
|
|
669
|
+
<span class="md-ellipsis">
|
|
670
|
+
XYZ and projection math
|
|
671
|
+
</span>
|
|
672
|
+
|
|
673
|
+
|
|
674
|
+
</a>
|
|
675
|
+
</li>
|
|
676
|
+
|
|
677
|
+
|
|
678
|
+
|
|
679
|
+
|
|
658
680
|
</ul>
|
|
659
681
|
</nav>
|
|
660
682
|
|
|
@@ -287,6 +287,13 @@
|
|
|
287
287
|
</span>
|
|
288
288
|
</a>
|
|
289
289
|
</li>
|
|
290
|
+
<li class="md-nav__item">
|
|
291
|
+
<a class="md-nav__link" href="../operator-guide/xyz-projection/">
|
|
292
|
+
<span class="md-ellipsis">
|
|
293
|
+
XYZ and projection math
|
|
294
|
+
</span>
|
|
295
|
+
</a>
|
|
296
|
+
</li>
|
|
290
297
|
</ul>
|
|
291
298
|
</nav>
|
|
292
299
|
</li>
|
|
@@ -276,6 +276,13 @@
|
|
|
276
276
|
</span>
|
|
277
277
|
</a>
|
|
278
278
|
</li>
|
|
279
|
+
<li class="md-nav__item">
|
|
280
|
+
<a class="md-nav__link" href="../operator-guide/xyz-projection/">
|
|
281
|
+
<span class="md-ellipsis">
|
|
282
|
+
XYZ and projection math
|
|
283
|
+
</span>
|
|
284
|
+
</a>
|
|
285
|
+
</li>
|
|
279
286
|
</ul>
|
|
280
287
|
</nav>
|
|
281
288
|
</li>
|
|
@@ -254,6 +254,13 @@
|
|
|
254
254
|
</span>
|
|
255
255
|
</a>
|
|
256
256
|
</li>
|
|
257
|
+
<li class="md-nav__item">
|
|
258
|
+
<a class="md-nav__link" href="../operator-guide/xyz-projection/">
|
|
259
|
+
<span class="md-ellipsis">
|
|
260
|
+
XYZ and projection math
|
|
261
|
+
</span>
|
|
262
|
+
</a>
|
|
263
|
+
</li>
|
|
257
264
|
</ul>
|
|
258
265
|
</nav>
|
|
259
266
|
</li>
|
|
@@ -255,6 +255,13 @@
|
|
|
255
255
|
</span>
|
|
256
256
|
</a>
|
|
257
257
|
</li>
|
|
258
|
+
<li class="md-nav__item">
|
|
259
|
+
<a class="md-nav__link" href="../../operator-guide/xyz-projection/">
|
|
260
|
+
<span class="md-ellipsis">
|
|
261
|
+
XYZ and projection math
|
|
262
|
+
</span>
|
|
263
|
+
</a>
|
|
264
|
+
</li>
|
|
258
265
|
</ul>
|
|
259
266
|
</nav>
|
|
260
267
|
</li>
|
|
@@ -255,6 +255,13 @@
|
|
|
255
255
|
</span>
|
|
256
256
|
</a>
|
|
257
257
|
</li>
|
|
258
|
+
<li class="md-nav__item">
|
|
259
|
+
<a class="md-nav__link" href="../../operator-guide/xyz-projection/">
|
|
260
|
+
<span class="md-ellipsis">
|
|
261
|
+
XYZ and projection math
|
|
262
|
+
</span>
|
|
263
|
+
</a>
|
|
264
|
+
</li>
|
|
258
265
|
</ul>
|
|
259
266
|
</nav>
|
|
260
267
|
</li>
|
|
@@ -255,6 +255,13 @@
|
|
|
255
255
|
</span>
|
|
256
256
|
</a>
|
|
257
257
|
</li>
|
|
258
|
+
<li class="md-nav__item">
|
|
259
|
+
<a class="md-nav__link" href="../../operator-guide/xyz-projection/">
|
|
260
|
+
<span class="md-ellipsis">
|
|
261
|
+
XYZ and projection math
|
|
262
|
+
</span>
|
|
263
|
+
</a>
|
|
264
|
+
</li>
|
|
258
265
|
</ul>
|
|
259
266
|
</nav>
|
|
260
267
|
</li>
|
|
@@ -255,6 +255,13 @@
|
|
|
255
255
|
</span>
|
|
256
256
|
</a>
|
|
257
257
|
</li>
|
|
258
|
+
<li class="md-nav__item">
|
|
259
|
+
<a class="md-nav__link" href="../../operator-guide/xyz-projection/">
|
|
260
|
+
<span class="md-ellipsis">
|
|
261
|
+
XYZ and projection math
|
|
262
|
+
</span>
|
|
263
|
+
</a>
|
|
264
|
+
</li>
|
|
258
265
|
</ul>
|
|
259
266
|
</nav>
|
|
260
267
|
</li>
|
package/dist/docs/index.html
CHANGED
|
@@ -343,6 +343,13 @@
|
|
|
343
343
|
</span>
|
|
344
344
|
</a>
|
|
345
345
|
</li>
|
|
346
|
+
<li class="md-nav__item">
|
|
347
|
+
<a class="md-nav__link" href="operator-guide/xyz-projection/">
|
|
348
|
+
<span class="md-ellipsis">
|
|
349
|
+
XYZ and projection math
|
|
350
|
+
</span>
|
|
351
|
+
</a>
|
|
352
|
+
</li>
|
|
346
353
|
</ul>
|
|
347
354
|
</nav>
|
|
348
355
|
</li>
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<meta content="width=device-width,initial-scale=1" name="viewport"/>
|
|
8
8
|
<link href="http://localhost:8000/docs/operator-guide/texture-shade/" rel="canonical"/>
|
|
9
9
|
<link href="../relief-shade/" rel="prev"/>
|
|
10
|
-
<link href="
|
|
10
|
+
<link href="../xyz-projection/" rel="next"/>
|
|
11
11
|
<link href="../../assets/images/favicon.png" rel="icon"/>
|
|
12
12
|
<meta content="mkdocs-1.5.3, mkdocs-material-9.4.10" name="generator"/>
|
|
13
13
|
<title>Texture shading - LINZ Basemaps</title>
|
|
@@ -276,6 +276,13 @@
|
|
|
276
276
|
</ul>
|
|
277
277
|
</nav>
|
|
278
278
|
</li>
|
|
279
|
+
<li class="md-nav__item">
|
|
280
|
+
<a class="md-nav__link" href="../xyz-projection/">
|
|
281
|
+
<span class="md-ellipsis">
|
|
282
|
+
XYZ and projection math
|
|
283
|
+
</span>
|
|
284
|
+
</a>
|
|
285
|
+
</li>
|
|
279
286
|
</ul>
|
|
280
287
|
</nav>
|
|
281
288
|
</li>
|
|
@@ -0,0 +1,533 @@
|
|
|
1
|
+
|
|
2
|
+
<!DOCTYPE html>
|
|
3
|
+
|
|
4
|
+
<html class="no-js" lang="en">
|
|
5
|
+
<head>
|
|
6
|
+
<meta charset="utf-8"/>
|
|
7
|
+
<meta content="width=device-width,initial-scale=1" name="viewport"/>
|
|
8
|
+
<link href="http://localhost:8000/docs/operator-guide/xyz-projection/" rel="canonical"/>
|
|
9
|
+
<link href="../texture-shade/" rel="prev"/>
|
|
10
|
+
<link href="../../user-guide/_get-started/" rel="next"/>
|
|
11
|
+
<link href="../../assets/images/favicon.png" rel="icon"/>
|
|
12
|
+
<meta content="mkdocs-1.5.3, mkdocs-material-9.4.10" name="generator"/>
|
|
13
|
+
<title>XYZ and projection math - LINZ Basemaps</title>
|
|
14
|
+
<link href="../../assets/stylesheets/main.fad675c6.min.css" rel="stylesheet"/>
|
|
15
|
+
<link href="../../assets/stylesheets/palette.356b1318.min.css" rel="stylesheet"/>
|
|
16
|
+
<link crossorigin="" href="https://fonts.gstatic.com" rel="preconnect"/>
|
|
17
|
+
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,700,700i%7COpen+Sans+Mono:400,400i,700,700i&display=fallback" rel="stylesheet"/>
|
|
18
|
+
<style>:root{--md-text-font:"Open Sans";--md-code-font:"Open Sans Mono"}</style>
|
|
19
|
+
<link href="../../index.css" rel="stylesheet"/>
|
|
20
|
+
<script>__md_scope=new URL("../..",location),__md_hash=e=>[...e].reduce((e,_)=>(e<<5)-e+_.charCodeAt(0),0),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script>
|
|
21
|
+
<script id="__analytics">function __md_analytics(){function n(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],n("js",new Date),n("config",""),document.addEventListener("DOMContentLoaded",function(){document.forms.search&&document.forms.search.query.addEventListener("blur",function(){this.value&&n("event","search",{search_term:this.value})}),document$.subscribe(function(){var a=document.forms.feedback;if(void 0!==a)for(var e of a.querySelectorAll("[type=submit]"))e.addEventListener("click",function(e){e.preventDefault();var t=document.location.pathname,e=this.getAttribute("data-md-value");n("event","feedback",{page:t,data:e}),a.firstElementChild.disabled=!0;e=a.querySelector(".md-feedback__note [data-md-value='"+e+"']");e&&(e.hidden=!1)}),a.hidden=!1}),location$.subscribe(function(e){n("config","",{page_path:e.pathname})})});var e=document.createElement("script");e.async=!0,e.src="https://www.googletagmanager.com/gtag/js?id=",document.getElementById("__analytics").insertAdjacentElement("afterEnd",e)}</script>
|
|
22
|
+
<script>"undefined"!=typeof __md_analytics&&__md_analytics()</script>
|
|
23
|
+
</head>
|
|
24
|
+
<body data-md-color-accent="indigo" data-md-color-primary="indigo" data-md-color-scheme="default" dir="ltr">
|
|
25
|
+
<script>var palette=__md_get("__palette");if(palette&&"object"==typeof palette.color)for(var key of Object.keys(palette.color))document.body.setAttribute("data-md-color-"+key,palette.color[key])</script>
|
|
26
|
+
<input autocomplete="off" class="md-toggle" data-md-toggle="drawer" id="__drawer" type="checkbox"/>
|
|
27
|
+
<input autocomplete="off" class="md-toggle" data-md-toggle="search" id="__search" type="checkbox"/>
|
|
28
|
+
<label class="md-overlay" for="__drawer"></label>
|
|
29
|
+
<div data-md-component="skip">
|
|
30
|
+
<a class="md-skip" href="#xyz-and-projection-math">
|
|
31
|
+
Skip to content
|
|
32
|
+
</a>
|
|
33
|
+
</div>
|
|
34
|
+
<div data-md-component="announce">
|
|
35
|
+
</div>
|
|
36
|
+
<header class="md-header md-header--shadow" data-md-component="header">
|
|
37
|
+
<nav aria-label="Header" class="md-header__inner md-grid">
|
|
38
|
+
<a aria-label="LINZ Basemaps" class="md-header__button md-logo" data-md-component="logo" href="../.." title="LINZ Basemaps">
|
|
39
|
+
<img alt="logo" src="../../linz-motif.svg"/>
|
|
40
|
+
</a>
|
|
41
|
+
<label class="md-header__button md-icon" for="__drawer">
|
|
42
|
+
<svg viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2Z"></path></svg>
|
|
43
|
+
</label>
|
|
44
|
+
<div class="md-header__title" data-md-component="header-title">
|
|
45
|
+
<div class="md-header__ellipsis">
|
|
46
|
+
<div class="md-header__topic">
|
|
47
|
+
<span class="md-ellipsis">
|
|
48
|
+
LINZ Basemaps
|
|
49
|
+
</span>
|
|
50
|
+
</div>
|
|
51
|
+
<div class="md-header__topic" data-md-component="header-topic">
|
|
52
|
+
<span class="md-ellipsis">
|
|
53
|
+
|
|
54
|
+
XYZ and projection math
|
|
55
|
+
|
|
56
|
+
</span>
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
</div>
|
|
60
|
+
<form class="md-header__option" data-md-component="palette">
|
|
61
|
+
<input aria-label="Switch to dark mode" class="md-option" data-md-color-accent="indigo" data-md-color-media="(prefers-color-scheme: light)" data-md-color-primary="indigo" data-md-color-scheme="default" id="__palette_1" name="__palette" type="radio"/>
|
|
62
|
+
<label class="md-header__button md-icon" for="__palette_2" hidden="" title="Switch to dark mode">
|
|
63
|
+
<svg viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 8a4 4 0 0 0-4 4 4 4 0 0 0 4 4 4 4 0 0 0 4-4 4 4 0 0 0-4-4m0 10a6 6 0 0 1-6-6 6 6 0 0 1 6-6 6 6 0 0 1 6 6 6 6 0 0 1-6 6m8-9.31V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12 20 8.69Z"></path></svg>
|
|
64
|
+
</label>
|
|
65
|
+
<input aria-label="Switch to light mode" class="md-option" data-md-color-accent="indigo" data-md-color-media="(prefers-color-scheme: dark)" data-md-color-primary="indigo" data-md-color-scheme="slate" id="__palette_2" name="__palette" type="radio"/>
|
|
66
|
+
<label class="md-header__button md-icon" for="__palette_1" hidden="" title="Switch to light mode">
|
|
67
|
+
<svg viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 18c-.89 0-1.74-.2-2.5-.55C11.56 16.5 13 14.42 13 12c0-2.42-1.44-4.5-3.5-5.45C10.26 6.2 11.11 6 12 6a6 6 0 0 1 6 6 6 6 0 0 1-6 6m8-9.31V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12 20 8.69Z"></path></svg>
|
|
68
|
+
</label>
|
|
69
|
+
</form>
|
|
70
|
+
<div class="md-header__source">
|
|
71
|
+
<a class="md-source" data-md-component="source" href="https://github.com/linz/basemaps" title="Go to repository">
|
|
72
|
+
<div class="md-source__icon md-icon">
|
|
73
|
+
<svg viewbox="0 0 448 512" xmlns="http://www.w3.org/2000/svg"><!--! Font Awesome Free 6.4.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2023 Fonticons, Inc.--><path d="M439.55 236.05 244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81z"></path></svg>
|
|
74
|
+
</div>
|
|
75
|
+
<div class="md-source__repository">
|
|
76
|
+
GitHub
|
|
77
|
+
</div>
|
|
78
|
+
</a>
|
|
79
|
+
</div>
|
|
80
|
+
</nav>
|
|
81
|
+
</header>
|
|
82
|
+
<div class="md-container" data-md-component="container">
|
|
83
|
+
<main class="md-main" data-md-component="main">
|
|
84
|
+
<div class="md-main__inner md-grid">
|
|
85
|
+
<div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation">
|
|
86
|
+
<div class="md-sidebar__scrollwrap">
|
|
87
|
+
<div class="md-sidebar__inner">
|
|
88
|
+
<nav aria-label="Navigation" class="md-nav md-nav--primary" data-md-level="0">
|
|
89
|
+
<label class="md-nav__title" for="__drawer">
|
|
90
|
+
<a aria-label="LINZ Basemaps" class="md-nav__button md-logo" data-md-component="logo" href="../.." title="LINZ Basemaps">
|
|
91
|
+
<img alt="logo" src="../../linz-motif.svg"/>
|
|
92
|
+
</a>
|
|
93
|
+
LINZ Basemaps
|
|
94
|
+
</label>
|
|
95
|
+
<div class="md-nav__source">
|
|
96
|
+
<a class="md-source" data-md-component="source" href="https://github.com/linz/basemaps" title="Go to repository">
|
|
97
|
+
<div class="md-source__icon md-icon">
|
|
98
|
+
<svg viewbox="0 0 448 512" xmlns="http://www.w3.org/2000/svg"><!--! Font Awesome Free 6.4.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2023 Fonticons, Inc.--><path d="M439.55 236.05 244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81z"></path></svg>
|
|
99
|
+
</div>
|
|
100
|
+
<div class="md-source__repository">
|
|
101
|
+
GitHub
|
|
102
|
+
</div>
|
|
103
|
+
</a>
|
|
104
|
+
</div>
|
|
105
|
+
<ul class="md-nav__list" data-md-scrollfix="">
|
|
106
|
+
<li class="md-nav__item">
|
|
107
|
+
<a class="md-nav__link" href="../..">
|
|
108
|
+
<span class="md-ellipsis">
|
|
109
|
+
LINZ Basemaps
|
|
110
|
+
</span>
|
|
111
|
+
</a>
|
|
112
|
+
</li>
|
|
113
|
+
<li class="md-nav__item">
|
|
114
|
+
<a class="md-nav__link" href="../../configuration/">
|
|
115
|
+
<span class="md-ellipsis">
|
|
116
|
+
Configuration
|
|
117
|
+
</span>
|
|
118
|
+
</a>
|
|
119
|
+
</li>
|
|
120
|
+
<li class="md-nav__item">
|
|
121
|
+
<a class="md-nav__link" href="../../deployment/">
|
|
122
|
+
<span class="md-ellipsis">
|
|
123
|
+
Deployment
|
|
124
|
+
</span>
|
|
125
|
+
</a>
|
|
126
|
+
</li>
|
|
127
|
+
<li class="md-nav__item">
|
|
128
|
+
<a class="md-nav__link" href="../../quick-start/">
|
|
129
|
+
<span class="md-ellipsis">
|
|
130
|
+
Quick start guide
|
|
131
|
+
</span>
|
|
132
|
+
</a>
|
|
133
|
+
</li>
|
|
134
|
+
<li class="md-nav__item md-nav__item--nested">
|
|
135
|
+
<input class="md-nav__toggle md-toggle" id="__nav_5" type="checkbox"/>
|
|
136
|
+
<div class="md-nav__link md-nav__container">
|
|
137
|
+
<a class="md-nav__link" href="../../developer-guide/">
|
|
138
|
+
<span class="md-ellipsis">
|
|
139
|
+
Developer guide
|
|
140
|
+
</span>
|
|
141
|
+
</a>
|
|
142
|
+
</div>
|
|
143
|
+
<nav aria-expanded="false" aria-labelledby="__nav_5_label" class="md-nav" data-md-level="1">
|
|
144
|
+
<label class="md-nav__title" for="__nav_5">
|
|
145
|
+
<span class="md-nav__icon md-icon"></span>
|
|
146
|
+
Developer guide
|
|
147
|
+
</label>
|
|
148
|
+
<ul class="md-nav__list" data-md-scrollfix="">
|
|
149
|
+
</ul>
|
|
150
|
+
</nav>
|
|
151
|
+
</li>
|
|
152
|
+
<li class="md-nav__item md-nav__item--nested">
|
|
153
|
+
<input class="md-nav__toggle md-toggle" id="__nav_6" type="checkbox"/>
|
|
154
|
+
<label class="md-nav__link" for="__nav_6" id="__nav_6_label" tabindex="0">
|
|
155
|
+
<span class="md-ellipsis">
|
|
156
|
+
Examples
|
|
157
|
+
</span>
|
|
158
|
+
<span class="md-nav__icon md-icon"></span>
|
|
159
|
+
</label>
|
|
160
|
+
<nav aria-expanded="false" aria-labelledby="__nav_6_label" class="md-nav" data-md-level="1">
|
|
161
|
+
<label class="md-nav__title" for="__nav_6">
|
|
162
|
+
<span class="md-nav__icon md-icon"></span>
|
|
163
|
+
Examples
|
|
164
|
+
</label>
|
|
165
|
+
<ul class="md-nav__list" data-md-scrollfix="">
|
|
166
|
+
<li class="md-nav__item">
|
|
167
|
+
<a class="md-nav__link" href="../../examples/_overview/">
|
|
168
|
+
<span class="md-ellipsis">
|
|
169
|
+
Overview
|
|
170
|
+
</span>
|
|
171
|
+
</a>
|
|
172
|
+
</li>
|
|
173
|
+
<li class="md-nav__item">
|
|
174
|
+
<a class="md-nav__link" href="../../examples/leaflet.xyz.3857/">
|
|
175
|
+
<span class="md-ellipsis">
|
|
176
|
+
Leaflet Raster Map
|
|
177
|
+
</span>
|
|
178
|
+
</a>
|
|
179
|
+
</li>
|
|
180
|
+
<li class="md-nav__item">
|
|
181
|
+
<a class="md-nav__link" href="../../examples/maplibre.opacity.3857/">
|
|
182
|
+
<span class="md-ellipsis">
|
|
183
|
+
Maplibre Opacity Slider
|
|
184
|
+
</span>
|
|
185
|
+
</a>
|
|
186
|
+
</li>
|
|
187
|
+
<li class="md-nav__item">
|
|
188
|
+
<a class="md-nav__link" href="../../examples/maplibre.vector.3857/">
|
|
189
|
+
<span class="md-ellipsis">
|
|
190
|
+
Maplibre Vector Map
|
|
191
|
+
</span>
|
|
192
|
+
</a>
|
|
193
|
+
</li>
|
|
194
|
+
</ul>
|
|
195
|
+
</nav>
|
|
196
|
+
</li>
|
|
197
|
+
<li class="md-nav__item md-nav__item--active md-nav__item--nested">
|
|
198
|
+
<input checked="" class="md-nav__toggle md-toggle" id="__nav_7" type="checkbox"/>
|
|
199
|
+
<div class="md-nav__link md-nav__container">
|
|
200
|
+
<a class="md-nav__link" href="../">
|
|
201
|
+
<span class="md-ellipsis">
|
|
202
|
+
Operator guide
|
|
203
|
+
</span>
|
|
204
|
+
</a>
|
|
205
|
+
<label class="md-nav__link" for="__nav_7" id="__nav_7_label" tabindex="0">
|
|
206
|
+
<span class="md-nav__icon md-icon"></span>
|
|
207
|
+
</label>
|
|
208
|
+
</div>
|
|
209
|
+
<nav aria-expanded="true" aria-labelledby="__nav_7_label" class="md-nav" data-md-level="1">
|
|
210
|
+
<label class="md-nav__title" for="__nav_7">
|
|
211
|
+
<span class="md-nav__icon md-icon"></span>
|
|
212
|
+
Operator guide
|
|
213
|
+
</label>
|
|
214
|
+
<ul class="md-nav__list" data-md-scrollfix="">
|
|
215
|
+
<li class="md-nav__item">
|
|
216
|
+
<a class="md-nav__link" href="../cog-quality/">
|
|
217
|
+
<span class="md-ellipsis">
|
|
218
|
+
COG Quality
|
|
219
|
+
</span>
|
|
220
|
+
</a>
|
|
221
|
+
</li>
|
|
222
|
+
<li class="md-nav__item">
|
|
223
|
+
<a class="md-nav__link" href="../empty-tiles/">
|
|
224
|
+
<span class="md-ellipsis">
|
|
225
|
+
Sparse Datasets and empty tiles
|
|
226
|
+
</span>
|
|
227
|
+
</a>
|
|
228
|
+
</li>
|
|
229
|
+
<li class="md-nav__item">
|
|
230
|
+
<a class="md-nav__link" href="../gebco/">
|
|
231
|
+
<span class="md-ellipsis">
|
|
232
|
+
Gebco re-project to NZTM2000Quad cog file
|
|
233
|
+
</span>
|
|
234
|
+
</a>
|
|
235
|
+
</li>
|
|
236
|
+
<li class="md-nav__item">
|
|
237
|
+
<a class="md-nav__link" href="../quick-start/">
|
|
238
|
+
<span class="md-ellipsis">
|
|
239
|
+
Running LINZ Basemaps - Quick Start
|
|
240
|
+
</span>
|
|
241
|
+
</a>
|
|
242
|
+
</li>
|
|
243
|
+
<li class="md-nav__item">
|
|
244
|
+
<a class="md-nav__link" href="../relief-shade/">
|
|
245
|
+
<span class="md-ellipsis">
|
|
246
|
+
Relief shade
|
|
247
|
+
</span>
|
|
248
|
+
</a>
|
|
249
|
+
</li>
|
|
250
|
+
<li class="md-nav__item">
|
|
251
|
+
<a class="md-nav__link" href="../texture-shade/">
|
|
252
|
+
<span class="md-ellipsis">
|
|
253
|
+
Texture shading
|
|
254
|
+
</span>
|
|
255
|
+
</a>
|
|
256
|
+
</li>
|
|
257
|
+
<li class="md-nav__item md-nav__item--active">
|
|
258
|
+
<input class="md-nav__toggle md-toggle" id="__toc" type="checkbox"/>
|
|
259
|
+
<label class="md-nav__link md-nav__link--active" for="__toc">
|
|
260
|
+
<span class="md-ellipsis">
|
|
261
|
+
XYZ and projection math
|
|
262
|
+
</span>
|
|
263
|
+
<span class="md-nav__icon md-icon"></span>
|
|
264
|
+
</label>
|
|
265
|
+
<a class="md-nav__link md-nav__link--active" href="./">
|
|
266
|
+
<span class="md-ellipsis">
|
|
267
|
+
XYZ and projection math
|
|
268
|
+
</span>
|
|
269
|
+
</a>
|
|
270
|
+
<nav aria-label="Table of contents" class="md-nav md-nav--secondary">
|
|
271
|
+
<label class="md-nav__title" for="__toc">
|
|
272
|
+
<span class="md-nav__icon md-icon"></span>
|
|
273
|
+
Table of contents
|
|
274
|
+
</label>
|
|
275
|
+
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix="">
|
|
276
|
+
<li class="md-nav__item">
|
|
277
|
+
<a class="md-nav__link" href="#background">
|
|
278
|
+
<span class="md-ellipsis">
|
|
279
|
+
Background
|
|
280
|
+
</span>
|
|
281
|
+
</a>
|
|
282
|
+
</li>
|
|
283
|
+
<li class="md-nav__item">
|
|
284
|
+
<a class="md-nav__link" href="#process">
|
|
285
|
+
<span class="md-ellipsis">
|
|
286
|
+
Process
|
|
287
|
+
</span>
|
|
288
|
+
</a>
|
|
289
|
+
</li>
|
|
290
|
+
<li class="md-nav__item">
|
|
291
|
+
<a class="md-nav__link" href="#example">
|
|
292
|
+
<span class="md-ellipsis">
|
|
293
|
+
Example
|
|
294
|
+
</span>
|
|
295
|
+
</a>
|
|
296
|
+
<nav aria-label="Example" class="md-nav">
|
|
297
|
+
<ul class="md-nav__list">
|
|
298
|
+
<li class="md-nav__item">
|
|
299
|
+
<a class="md-nav__link" href="#example-code">
|
|
300
|
+
<span class="md-ellipsis">
|
|
301
|
+
Example Code
|
|
302
|
+
</span>
|
|
303
|
+
</a>
|
|
304
|
+
</li>
|
|
305
|
+
</ul>
|
|
306
|
+
</nav>
|
|
307
|
+
</li>
|
|
308
|
+
</ul>
|
|
309
|
+
</nav>
|
|
310
|
+
</li>
|
|
311
|
+
</ul>
|
|
312
|
+
</nav>
|
|
313
|
+
</li>
|
|
314
|
+
<li class="md-nav__item md-nav__item--nested">
|
|
315
|
+
<input class="md-nav__toggle md-toggle" id="__nav_8" type="checkbox"/>
|
|
316
|
+
<label class="md-nav__link" for="__nav_8" id="__nav_8_label" tabindex="0">
|
|
317
|
+
<span class="md-ellipsis">
|
|
318
|
+
User guide
|
|
319
|
+
</span>
|
|
320
|
+
<span class="md-nav__icon md-icon"></span>
|
|
321
|
+
</label>
|
|
322
|
+
<nav aria-expanded="false" aria-labelledby="__nav_8_label" class="md-nav" data-md-level="1">
|
|
323
|
+
<label class="md-nav__title" for="__nav_8">
|
|
324
|
+
<span class="md-nav__icon md-icon"></span>
|
|
325
|
+
User guide
|
|
326
|
+
</label>
|
|
327
|
+
<ul class="md-nav__list" data-md-scrollfix="">
|
|
328
|
+
<li class="md-nav__item">
|
|
329
|
+
<a class="md-nav__link" href="../../user-guide/_get-started/">
|
|
330
|
+
<span class="md-ellipsis">
|
|
331
|
+
Get started with LINZ Basemaps
|
|
332
|
+
</span>
|
|
333
|
+
</a>
|
|
334
|
+
</li>
|
|
335
|
+
<li class="md-nav__item">
|
|
336
|
+
<a class="md-nav__link" href="../../user-guide/api-documentation/">
|
|
337
|
+
<span class="md-ellipsis">
|
|
338
|
+
API documentation
|
|
339
|
+
</span>
|
|
340
|
+
</a>
|
|
341
|
+
</li>
|
|
342
|
+
<li class="md-nav__item">
|
|
343
|
+
<a class="md-nav__link" href="../../user-guide/technical-documentation/">
|
|
344
|
+
<span class="md-ellipsis">
|
|
345
|
+
Technical documentation and specifications
|
|
346
|
+
</span>
|
|
347
|
+
</a>
|
|
348
|
+
</li>
|
|
349
|
+
</ul>
|
|
350
|
+
</nav>
|
|
351
|
+
</li>
|
|
352
|
+
</ul>
|
|
353
|
+
</nav>
|
|
354
|
+
</div>
|
|
355
|
+
</div>
|
|
356
|
+
</div>
|
|
357
|
+
<div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc">
|
|
358
|
+
<div class="md-sidebar__scrollwrap">
|
|
359
|
+
<div class="md-sidebar__inner">
|
|
360
|
+
<nav aria-label="Table of contents" class="md-nav md-nav--secondary">
|
|
361
|
+
<label class="md-nav__title" for="__toc">
|
|
362
|
+
<span class="md-nav__icon md-icon"></span>
|
|
363
|
+
Table of contents
|
|
364
|
+
</label>
|
|
365
|
+
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix="">
|
|
366
|
+
<li class="md-nav__item">
|
|
367
|
+
<a class="md-nav__link" href="#background">
|
|
368
|
+
<span class="md-ellipsis">
|
|
369
|
+
Background
|
|
370
|
+
</span>
|
|
371
|
+
</a>
|
|
372
|
+
</li>
|
|
373
|
+
<li class="md-nav__item">
|
|
374
|
+
<a class="md-nav__link" href="#process">
|
|
375
|
+
<span class="md-ellipsis">
|
|
376
|
+
Process
|
|
377
|
+
</span>
|
|
378
|
+
</a>
|
|
379
|
+
</li>
|
|
380
|
+
<li class="md-nav__item">
|
|
381
|
+
<a class="md-nav__link" href="#example">
|
|
382
|
+
<span class="md-ellipsis">
|
|
383
|
+
Example
|
|
384
|
+
</span>
|
|
385
|
+
</a>
|
|
386
|
+
<nav aria-label="Example" class="md-nav">
|
|
387
|
+
<ul class="md-nav__list">
|
|
388
|
+
<li class="md-nav__item">
|
|
389
|
+
<a class="md-nav__link" href="#example-code">
|
|
390
|
+
<span class="md-ellipsis">
|
|
391
|
+
Example Code
|
|
392
|
+
</span>
|
|
393
|
+
</a>
|
|
394
|
+
</li>
|
|
395
|
+
</ul>
|
|
396
|
+
</nav>
|
|
397
|
+
</li>
|
|
398
|
+
</ul>
|
|
399
|
+
</nav>
|
|
400
|
+
</div>
|
|
401
|
+
</div>
|
|
402
|
+
</div>
|
|
403
|
+
<div class="md-content" data-md-component="content">
|
|
404
|
+
<article class="md-content__inner md-typeset">
|
|
405
|
+
<h1 id="xyz-and-projection-math">XYZ and projection math</h1>
|
|
406
|
+
<p><a href="https://github.com/linz/NZTM2000TileMatrixSet">NZTM2000Quad</a> is not supported by many third party tools especially inside the Vector Tile space. Often tools expect tiles to be served as <code>/{z}/{x}/{y}.mvt</code> and assume the projection is <a href="https://docs.ogc.org/is/17-083r2/17-083r2.html#63">WebMercatorQuad</a>.</p>
|
|
407
|
+
<p>Basemaps uses the lack of built in projection information to allow tools to work with NZTM2000Quad tiles without knowing they are in a different tile matrix set.</p>
|
|
408
|
+
<p>This is how basemaps provides <a href="https://epsg.io/2193">NZTM2000 EPSG:2193</a> support to Aerial imagery on https://basemaps.linz.govt.nz using custom projection logic <a href="https://github.com/linz/basemaps/blob/master/packages/landing/src/tile.matrix.ts#L56">basemaps/landing</a></p>
|
|
409
|
+
<h2 id="background">Background</h2>
|
|
410
|
+
<p>Tile mapping services use a <a href="https://docs.ogc.org/is/17-083r2/17-083r2.html">TileMatrixSet</a> to describe where the tiles are meant to be positioned on the globe using a origin point and scale information per zoom level, most web mapping systems assume the tile matrix set is <a href="https://docs.ogc.org/is/17-083r2/17-083r2.html#63">WebMercatorQuad</a>.</p>
|
|
411
|
+
<p>Assuming the target tile matrix set is similar to WebMercatorQuad, which has a square tile grid, with zoom levels increasing at a factor of 2 and starting with a single tile z:0, x:0, y:0 points can be projected into a "fake" version of the tile matrix set and then used with any tool that supports <a href="https://epsg.io/4326">EPSG:4326</a> to <a href="https://epsg.io/3857">EPSG:3857</a> math such as tippecanoe.</p>
|
|
412
|
+
<h2 id="process">Process</h2>
|
|
413
|
+
<p>To create a fake projection from a tile grid the process is</p>
|
|
414
|
+
<ul>
|
|
415
|
+
<li>Take a lat, lon pair (<a href="https://epsg.io/4326">EPSG:4326</a> degrees) and project into the target projection (eg <a href="https://epsg.io/2193">EPSG:2193</a>)</li>
|
|
416
|
+
<li>Take the target x,y pair (<a href="https://epsg.io/2193">EPSG:2193</a> metres) and project where in the tile grid the point would be located (px)</li>
|
|
417
|
+
<li>Take the x,y pixels pair and assume it is now a WebMercatorQuad tile then project it to <a href="https://epsg.io/3857">EPSG:3857</a></li>
|
|
418
|
+
<li>Take the x,y (<a href="https://epsg.io/3857">EPSG:3857</a> metres) and project it into lat, lon (<a href="https://epsg.io/4326">EPSG:4326</a>)</li>
|
|
419
|
+
</ul>
|
|
420
|
+
<p>The point is now in the fake projection and can be combined with applications that consume XYZ tiles</p>
|
|
421
|
+
<h2 id="example">Example</h2>
|
|
422
|
+
<p>To convert an example point, such as the <a href="https://en.wikipedia.org/wiki/Beehive_(New_Zealand)">Beehive</a> is located at <code>-41.2784°</code>, <code>174.7767°</code> (<a href="https://epsg.io/4326">EPSG:4326</a>) <img alt="Beehive NZTM2000Quad" src="../static/projection_beehive_nztm2000quad.webp"/></p>
|
|
423
|
+
<p>Converting to <a href="https://epsg.io/2193">NZTM2000 EPSG:2193</a> <code>x: 1748795.82...</code>, <code>y: 5428814.899...</code></p>
|
|
424
|
+
<p>Using NZTM2000Quad to convert to pixel cooridantes of tile z:0, x:0, y:0 yields <code>x:128.0001..., y:127.999...</code></p>
|
|
425
|
+
<p><img alt="Beehive NZTM2000Quad" src="../static/projection_nztm2000quad_0_0_0.webp"/></p>
|
|
426
|
+
<p>converting to metres EPSG:3857 x: <code>21.883...</code>, y: <code>7.2815...</code> and then into lat,lon (<a href="https://epsg.io/4326">EPSG:4326</a>) <code>0.0001...</code>, <code>0.0000...</code> as NZTM2000Quad is centred on the beehive the result of lat,lon approx 0,0 is expected!</p>
|
|
427
|
+
<p><img alt="Beehive FakeNZTM2000Quad" src="../static/projection_beehive_fakenztm2000.webp"/></p>
|
|
428
|
+
<p>These lat,lon coordinates can now be used in a system that works with XYZ tiles but assumes that they are in WebMercatorQuad</p>
|
|
429
|
+
<h3 id="example-code">Example Code</h3>
|
|
430
|
+
<p>Using <a href="https://github.com/linz/basemaps/tree/master/packages/geo">@basemaps/geo</a></p>
|
|
431
|
+
<div class="language-typescript highlight"><pre><span></span><code><span id="__span-0-1"><a href="#__codelineno-0-1" id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="k">import</span><span class="w"> </span><span class="p">{</span><span class="nx">NZTM2000QuadTms</span><span class="p">,</span><span class="w"> </span><span class="nx">GoogleTms</span><span class="p">,</span><span class="w"> </span><span class="nx">Projection</span><span class="p">}</span><span class="w"> </span><span class="kr">from</span><span class="w"> </span><span class="s1">'@basemaps/geo'</span>
|
|
432
|
+
</span><span id="__span-0-2"><a href="#__codelineno-0-2" id="__codelineno-0-2" name="__codelineno-0-2"></a>
|
|
433
|
+
</span><span id="__span-0-3"><a href="#__codelineno-0-3" id="__codelineno-0-3" name="__codelineno-0-3"></a><span class="c1">// Convert to NZTMQuad pixel location</span>
|
|
434
|
+
</span><span id="__span-0-4"><a href="#__codelineno-0-4" id="__codelineno-0-4" name="__codelineno-0-4"></a><span class="kd">const</span><span class="w"> </span><span class="nx">nztmXy</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nx">Projection</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="nx">Nztm2000QuadTms</span><span class="p">).</span><span class="nx">fromWgs84</span><span class="p">([</span><span class="mf">174.7767</span><span class="p">,</span><span class="w"> </span><span class="o">-</span><span class="mf">41.2784</span><span class="p">])</span>
|
|
435
|
+
</span><span id="__span-0-5"><a href="#__codelineno-0-5" id="__codelineno-0-5" name="__codelineno-0-5"></a><span class="kd">const</span><span class="w"> </span><span class="nx">nztmPixels</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nx">Nztm2000QuadTms</span><span class="p">.</span><span class="nx">sourceToPixels</span><span class="p">(</span><span class="nx">nztmXy</span><span class="p">[</span><span class="mf">0</span><span class="p">],</span><span class="w"> </span><span class="nx">nztmXy</span><span class="p">[</span><span class="mf">1</span><span class="p">],</span><span class="mf">0</span><span class="p">)</span>
|
|
436
|
+
</span><span id="__span-0-6"><a href="#__codelineno-0-6" id="__codelineno-0-6" name="__codelineno-0-6"></a>
|
|
437
|
+
</span><span id="__span-0-7"><a href="#__codelineno-0-7" id="__codelineno-0-7" name="__codelineno-0-7"></a><span class="c1">// Convert from pixels assuming EPSG:3857 WebMercatorQuad</span>
|
|
438
|
+
</span><span id="__span-0-8"><a href="#__codelineno-0-8" id="__codelineno-0-8" name="__codelineno-0-8"></a><span class="kd">const</span><span class="w"> </span><span class="nx">googleXy</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nx">GoogleTms</span><span class="p">.</span><span class="nx">pixelsToSource</span><span class="p">(</span><span class="nx">nztmPixels</span><span class="p">.</span><span class="nx">x</span><span class="p">,</span><span class="w"> </span><span class="nx">nztmPixels</span><span class="p">.</span><span class="nx">y</span><span class="p">,</span><span class="w"> </span><span class="mf">0</span><span class="p">)</span>
|
|
439
|
+
</span><span id="__span-0-9"><a href="#__codelineno-0-9" id="__codelineno-0-9" name="__codelineno-0-9"></a><span class="kd">const</span><span class="w"> </span><span class="nx">latLon</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nx">Projection</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="nx">GoogleTms</span><span class="p">).</span><span class="nx">toWgs84</span><span class="p">([</span><span class="nx">googleXy</span><span class="p">.</span><span class="nx">x</span><span class="p">,</span><span class="w"> </span><span class="nx">googleXy</span><span class="p">.</span><span class="nx">y</span><span class="p">])</span><span class="sb">```</span>
|
|
440
|
+
</span></code></pre></div>
|
|
441
|
+
</article>
|
|
442
|
+
</div>
|
|
443
|
+
</div>
|
|
444
|
+
</main>
|
|
445
|
+
<footer class="md-footer">
|
|
446
|
+
<div class="md-footer-meta md-typeset">
|
|
447
|
+
<div class="md-footer-meta__inner md-grid">
|
|
448
|
+
<div class="md-copyright">
|
|
449
|
+
<div class="md-copyright__highlight">
|
|
450
|
+
<a href="https://www.linz.govt.nz/copyright">© CC BY 4.0 LINZ</a>
|
|
451
|
+
</div>
|
|
452
|
+
|
|
453
|
+
|
|
454
|
+
Made with
|
|
455
|
+
<a href="https://squidfunk.github.io/mkdocs-material/" rel="noopener" target="_blank">
|
|
456
|
+
Material for MkDocs
|
|
457
|
+
</a>
|
|
458
|
+
</div>
|
|
459
|
+
</div>
|
|
460
|
+
</div>
|
|
461
|
+
</footer>
|
|
462
|
+
</div>
|
|
463
|
+
<div class="md-dialog" data-md-component="dialog">
|
|
464
|
+
<div class="md-dialog__inner md-typeset"></div>
|
|
465
|
+
</div>
|
|
466
|
+
<script id="__config" type="application/json">{"base": "../..", "features": ["navigation.indexes", "content.code.copy"], "search": "../../assets/javascripts/workers/search.f886a092.min.js", "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}}</script>
|
|
467
|
+
<script src="../../assets/javascripts/bundle.6c14ae12.min.js"></script>
|
|
468
|
+
<script>document$.subscribe(() => {
|
|
469
|
+
window.update_swagger_ui_iframe_height = function (id) {
|
|
470
|
+
var iFrameID = document.getElementById(id);
|
|
471
|
+
if (iFrameID) {
|
|
472
|
+
full_height = (iFrameID.contentWindow.document.body.scrollHeight + 80) + "px";
|
|
473
|
+
iFrameID.height = full_height;
|
|
474
|
+
iFrameID.style.height = full_height;
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
let iframe_id_list = []
|
|
479
|
+
var iframes = document.getElementsByClassName("swagger-ui-iframe");
|
|
480
|
+
for (var i = 0; i < iframes.length; i++) {
|
|
481
|
+
iframe_id_list.push(iframes[i].getAttribute("id"))
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
let ticking = true;
|
|
485
|
+
|
|
486
|
+
document.addEventListener('scroll', function(e) {
|
|
487
|
+
if (!ticking) {
|
|
488
|
+
window.requestAnimationFrame(()=> {
|
|
489
|
+
let half_vh = window.innerHeight/2;
|
|
490
|
+
for(var i = 0; i < iframe_id_list.length; i++) {
|
|
491
|
+
let element = document.getElementById(iframe_id_list[i])
|
|
492
|
+
if(element==null){
|
|
493
|
+
return
|
|
494
|
+
}
|
|
495
|
+
let diff = element.getBoundingClientRect().top
|
|
496
|
+
if(element.contentWindow.update_top_val){
|
|
497
|
+
element.contentWindow.update_top_val(half_vh - diff)
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
ticking = false;
|
|
501
|
+
});
|
|
502
|
+
ticking = true;
|
|
503
|
+
}
|
|
504
|
+
});
|
|
505
|
+
|
|
506
|
+
const dark_scheme_name = "slate"
|
|
507
|
+
|
|
508
|
+
window.scheme = document.body.getAttribute("data-md-color-scheme")
|
|
509
|
+
const options = {
|
|
510
|
+
attributeFilter: ['data-md-color-scheme'],
|
|
511
|
+
};
|
|
512
|
+
function color_scheme_callback(mutations) {
|
|
513
|
+
for (let mutation of mutations) {
|
|
514
|
+
if (mutation.attributeName === "data-md-color-scheme") {
|
|
515
|
+
scheme = document.body.getAttribute("data-md-color-scheme")
|
|
516
|
+
var iframe_list = document.getElementsByClassName("swagger-ui-iframe")
|
|
517
|
+
for(var i = 0; i < iframe_list.length; i++) {
|
|
518
|
+
var ele = iframe_list.item(i);
|
|
519
|
+
if (ele) {
|
|
520
|
+
if (scheme === dark_scheme_name) {
|
|
521
|
+
ele.contentWindow.enable_dark_mode();
|
|
522
|
+
} else {
|
|
523
|
+
ele.contentWindow.disable_dark_mode();
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
observer = new MutationObserver(color_scheme_callback);
|
|
531
|
+
observer.observe(document.body, options);
|
|
532
|
+
})</script></body>
|
|
533
|
+
</html>
|
|
@@ -255,6 +255,13 @@
|
|
|
255
255
|
</span>
|
|
256
256
|
</a>
|
|
257
257
|
</li>
|
|
258
|
+
<li class="md-nav__item">
|
|
259
|
+
<a class="md-nav__link" href="../operator-guide/xyz-projection/">
|
|
260
|
+
<span class="md-ellipsis">
|
|
261
|
+
XYZ and projection math
|
|
262
|
+
</span>
|
|
263
|
+
</a>
|
|
264
|
+
</li>
|
|
258
265
|
</ul>
|
|
259
266
|
</nav>
|
|
260
267
|
</li>
|
package/dist/docs/sitemap.xml
CHANGED
|
@@ -2,97 +2,102 @@
|
|
|
2
2
|
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
|
3
3
|
<url>
|
|
4
4
|
<loc>http://localhost:8000/docs/</loc>
|
|
5
|
-
<lastmod>2024-
|
|
5
|
+
<lastmod>2024-09-16</lastmod>
|
|
6
6
|
<changefreq>daily</changefreq>
|
|
7
7
|
</url>
|
|
8
8
|
<url>
|
|
9
9
|
<loc>http://localhost:8000/docs/configuration/</loc>
|
|
10
|
-
<lastmod>2024-
|
|
10
|
+
<lastmod>2024-09-16</lastmod>
|
|
11
11
|
<changefreq>daily</changefreq>
|
|
12
12
|
</url>
|
|
13
13
|
<url>
|
|
14
14
|
<loc>http://localhost:8000/docs/deployment/</loc>
|
|
15
|
-
<lastmod>2024-
|
|
15
|
+
<lastmod>2024-09-16</lastmod>
|
|
16
16
|
<changefreq>daily</changefreq>
|
|
17
17
|
</url>
|
|
18
18
|
<url>
|
|
19
19
|
<loc>http://localhost:8000/docs/quick-start/</loc>
|
|
20
|
-
<lastmod>2024-
|
|
20
|
+
<lastmod>2024-09-16</lastmod>
|
|
21
21
|
<changefreq>daily</changefreq>
|
|
22
22
|
</url>
|
|
23
23
|
<url>
|
|
24
24
|
<loc>http://localhost:8000/docs/developer-guide/</loc>
|
|
25
|
-
<lastmod>2024-
|
|
25
|
+
<lastmod>2024-09-16</lastmod>
|
|
26
26
|
<changefreq>daily</changefreq>
|
|
27
27
|
</url>
|
|
28
28
|
<url>
|
|
29
29
|
<loc>http://localhost:8000/docs/examples/_overview/</loc>
|
|
30
|
-
<lastmod>2024-
|
|
30
|
+
<lastmod>2024-09-16</lastmod>
|
|
31
31
|
<changefreq>daily</changefreq>
|
|
32
32
|
</url>
|
|
33
33
|
<url>
|
|
34
34
|
<loc>http://localhost:8000/docs/examples/leaflet.xyz.3857/</loc>
|
|
35
|
-
<lastmod>2024-
|
|
35
|
+
<lastmod>2024-09-16</lastmod>
|
|
36
36
|
<changefreq>daily</changefreq>
|
|
37
37
|
</url>
|
|
38
38
|
<url>
|
|
39
39
|
<loc>http://localhost:8000/docs/examples/maplibre.opacity.3857/</loc>
|
|
40
|
-
<lastmod>2024-
|
|
40
|
+
<lastmod>2024-09-16</lastmod>
|
|
41
41
|
<changefreq>daily</changefreq>
|
|
42
42
|
</url>
|
|
43
43
|
<url>
|
|
44
44
|
<loc>http://localhost:8000/docs/examples/maplibre.vector.3857/</loc>
|
|
45
|
-
<lastmod>2024-
|
|
45
|
+
<lastmod>2024-09-16</lastmod>
|
|
46
46
|
<changefreq>daily</changefreq>
|
|
47
47
|
</url>
|
|
48
48
|
<url>
|
|
49
49
|
<loc>http://localhost:8000/docs/operator-guide/</loc>
|
|
50
|
-
<lastmod>2024-
|
|
50
|
+
<lastmod>2024-09-16</lastmod>
|
|
51
51
|
<changefreq>daily</changefreq>
|
|
52
52
|
</url>
|
|
53
53
|
<url>
|
|
54
54
|
<loc>http://localhost:8000/docs/operator-guide/cog-quality/</loc>
|
|
55
|
-
<lastmod>2024-
|
|
55
|
+
<lastmod>2024-09-16</lastmod>
|
|
56
56
|
<changefreq>daily</changefreq>
|
|
57
57
|
</url>
|
|
58
58
|
<url>
|
|
59
59
|
<loc>http://localhost:8000/docs/operator-guide/empty-tiles/</loc>
|
|
60
|
-
<lastmod>2024-
|
|
60
|
+
<lastmod>2024-09-16</lastmod>
|
|
61
61
|
<changefreq>daily</changefreq>
|
|
62
62
|
</url>
|
|
63
63
|
<url>
|
|
64
64
|
<loc>http://localhost:8000/docs/operator-guide/gebco/</loc>
|
|
65
|
-
<lastmod>2024-
|
|
65
|
+
<lastmod>2024-09-16</lastmod>
|
|
66
66
|
<changefreq>daily</changefreq>
|
|
67
67
|
</url>
|
|
68
68
|
<url>
|
|
69
69
|
<loc>http://localhost:8000/docs/operator-guide/quick-start/</loc>
|
|
70
|
-
<lastmod>2024-
|
|
70
|
+
<lastmod>2024-09-16</lastmod>
|
|
71
71
|
<changefreq>daily</changefreq>
|
|
72
72
|
</url>
|
|
73
73
|
<url>
|
|
74
74
|
<loc>http://localhost:8000/docs/operator-guide/relief-shade/</loc>
|
|
75
|
-
<lastmod>2024-
|
|
75
|
+
<lastmod>2024-09-16</lastmod>
|
|
76
76
|
<changefreq>daily</changefreq>
|
|
77
77
|
</url>
|
|
78
78
|
<url>
|
|
79
79
|
<loc>http://localhost:8000/docs/operator-guide/texture-shade/</loc>
|
|
80
|
-
<lastmod>2024-
|
|
80
|
+
<lastmod>2024-09-16</lastmod>
|
|
81
|
+
<changefreq>daily</changefreq>
|
|
82
|
+
</url>
|
|
83
|
+
<url>
|
|
84
|
+
<loc>http://localhost:8000/docs/operator-guide/xyz-projection/</loc>
|
|
85
|
+
<lastmod>2024-09-16</lastmod>
|
|
81
86
|
<changefreq>daily</changefreq>
|
|
82
87
|
</url>
|
|
83
88
|
<url>
|
|
84
89
|
<loc>http://localhost:8000/docs/user-guide/_get-started/</loc>
|
|
85
|
-
<lastmod>2024-
|
|
90
|
+
<lastmod>2024-09-16</lastmod>
|
|
86
91
|
<changefreq>daily</changefreq>
|
|
87
92
|
</url>
|
|
88
93
|
<url>
|
|
89
94
|
<loc>http://localhost:8000/docs/user-guide/api-documentation/</loc>
|
|
90
|
-
<lastmod>2024-
|
|
95
|
+
<lastmod>2024-09-16</lastmod>
|
|
91
96
|
<changefreq>daily</changefreq>
|
|
92
97
|
</url>
|
|
93
98
|
<url>
|
|
94
99
|
<loc>http://localhost:8000/docs/user-guide/technical-documentation/</loc>
|
|
95
|
-
<lastmod>2024-
|
|
100
|
+
<lastmod>2024-09-16</lastmod>
|
|
96
101
|
<changefreq>daily</changefreq>
|
|
97
102
|
</url>
|
|
98
103
|
</urlset>
|
package/dist/docs/sitemap.xml.gz
CHANGED
|
Binary file
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<meta charset="utf-8"/>
|
|
7
7
|
<meta content="width=device-width,initial-scale=1" name="viewport"/>
|
|
8
8
|
<link href="http://localhost:8000/docs/user-guide/_get-started/" rel="canonical"/>
|
|
9
|
-
<link href="../../operator-guide/
|
|
9
|
+
<link href="../../operator-guide/xyz-projection/" rel="prev"/>
|
|
10
10
|
<link href="../api-documentation/" rel="next"/>
|
|
11
11
|
<link href="../../assets/images/favicon.png" rel="icon"/>
|
|
12
12
|
<meta content="mkdocs-1.5.3, mkdocs-material-9.4.10" name="generator"/>
|
|
@@ -254,6 +254,13 @@
|
|
|
254
254
|
</span>
|
|
255
255
|
</a>
|
|
256
256
|
</li>
|
|
257
|
+
<li class="md-nav__item">
|
|
258
|
+
<a class="md-nav__link" href="../../operator-guide/xyz-projection/">
|
|
259
|
+
<span class="md-ellipsis">
|
|
260
|
+
XYZ and projection math
|
|
261
|
+
</span>
|
|
262
|
+
</a>
|
|
263
|
+
</li>
|
|
257
264
|
</ul>
|
|
258
265
|
</nav>
|
|
259
266
|
</li>
|
|
@@ -254,6 +254,13 @@
|
|
|
254
254
|
</span>
|
|
255
255
|
</a>
|
|
256
256
|
</li>
|
|
257
|
+
<li class="md-nav__item">
|
|
258
|
+
<a class="md-nav__link" href="../../operator-guide/xyz-projection/">
|
|
259
|
+
<span class="md-ellipsis">
|
|
260
|
+
XYZ and projection math
|
|
261
|
+
</span>
|
|
262
|
+
</a>
|
|
263
|
+
</li>
|
|
257
264
|
</ul>
|
|
258
265
|
</nav>
|
|
259
266
|
</li>
|
|
@@ -313,7 +320,7 @@
|
|
|
313
320
|
<article class="md-content__inner md-typeset">
|
|
314
321
|
<h1 id="api-documentation">API documentation</h1>
|
|
315
322
|
<p>This page provide examples of Basemaps APIs that allow you to programmatically access LINZ map tile services to integrate into your mobile, web.</p>
|
|
316
|
-
<p><iframe class="swagger-ui-iframe" frameborder="0" id="
|
|
323
|
+
<p><iframe class="swagger-ui-iframe" frameborder="0" id="a5588c46" src="swagger-a5588c46.html" style="overflow:hidden;width:100%;" width="100%"></iframe></p>
|
|
317
324
|
</article>
|
|
318
325
|
</div>
|
|
319
326
|
</div>
|
|
@@ -253,6 +253,13 @@
|
|
|
253
253
|
</span>
|
|
254
254
|
</a>
|
|
255
255
|
</li>
|
|
256
|
+
<li class="md-nav__item">
|
|
257
|
+
<a class="md-nav__link" href="../../operator-guide/xyz-projection/">
|
|
258
|
+
<span class="md-ellipsis">
|
|
259
|
+
XYZ and projection math
|
|
260
|
+
</span>
|
|
261
|
+
</a>
|
|
262
|
+
</li>
|
|
256
263
|
</ul>
|
|
257
264
|
</nav>
|
|
258
265
|
</li>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@basemaps/landing",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.10.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/linz/basemaps.git",
|
|
@@ -28,11 +28,11 @@
|
|
|
28
28
|
"last 2 Chrome versions"
|
|
29
29
|
],
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@basemaps/attribution": "^7.
|
|
31
|
+
"@basemaps/attribution": "^7.10.0",
|
|
32
32
|
"@basemaps/config": "^7.7.0",
|
|
33
33
|
"@basemaps/geo": "^7.5.0",
|
|
34
|
-
"@basemaps/infra": "^7.
|
|
35
|
-
"@basemaps/shared": "^7.
|
|
34
|
+
"@basemaps/infra": "^7.10.0",
|
|
35
|
+
"@basemaps/shared": "^7.10.0",
|
|
36
36
|
"@linzjs/lui": "^21.12.1",
|
|
37
37
|
"@servie/events": "^3.0.0",
|
|
38
38
|
"@types/proj4": "^2.5.2",
|
|
@@ -103,5 +103,5 @@
|
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
],
|
|
106
|
-
"gitHead": "
|
|
106
|
+
"gitHead": "77d3584cb3b707a3b18f15143d3eb8b545a9bbe7"
|
|
107
107
|
}
|