@basemaps/landing 8.6.0 → 8.11.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/src/__tests__/geojson.test.js +1 -1
- package/build/src/__tests__/geojson.test.js.map +1 -1
- package/build/src/components/map.d.ts +2 -1
- package/build/src/components/map.js +24 -12
- package/build/src/components/map.js.map +1 -1
- package/build/src/components/map.label.js +1 -0
- package/build/src/components/map.label.js.map +1 -1
- package/build/src/components/map.switcher.js +17 -2
- package/build/src/components/map.switcher.js.map +1 -1
- package/build/src/components/terrain.control.d.ts +14 -0
- package/build/src/components/terrain.control.js +101 -0
- package/build/src/components/terrain.control.js.map +1 -0
- package/build/src/config.layer.d.ts +11 -1
- package/build/src/config.map.js +8 -1
- package/build/src/config.map.js.map +1 -1
- package/build/src/tile.matrix.d.ts +1 -0
- package/build/src/tile.matrix.js +1 -0
- package/build/src/tile.matrix.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/package.json +8 -11
- package/dist/android-chrome-192x192.png +0 -0
- package/dist/android-chrome-512x512.png +0 -0
- package/dist/apple-touch-icon.png +0 -0
- package/dist/assets/clear.svg +0 -1
- package/dist/assets/fonts/OpenSans-Bold.woff2 +0 -0
- package/dist/assets/fonts/OpenSans-Italic.woff2 +0 -0
- package/dist/assets/fonts/OpenSans-Light.woff2 +0 -0
- package/dist/assets/fonts/OpenSans-Regular.woff2 +0 -0
- package/dist/assets/fonts/OpenSans-SemiBold.woff2 +0 -0
- package/dist/assets/logo-linz.svg +0 -124
- package/dist/assets/logo-nz-govt.svg +0 -196
- package/dist/assets/whats_new_updates.svg +0 -1
- package/dist/basemaps-card.jpeg +0 -0
- package/dist/docs/404.html +0 -2173
- package/dist/docs/assets/images/favicon.png +0 -0
- package/dist/docs/assets/javascripts/bundle.83f73b43.min.js +0 -16
- package/dist/docs/assets/javascripts/bundle.83f73b43.min.js.map +0 -7
- package/dist/docs/assets/javascripts/lunr/min/lunr.ar.min.js +0 -1
- package/dist/docs/assets/javascripts/lunr/min/lunr.da.min.js +0 -18
- package/dist/docs/assets/javascripts/lunr/min/lunr.de.min.js +0 -18
- package/dist/docs/assets/javascripts/lunr/min/lunr.du.min.js +0 -18
- package/dist/docs/assets/javascripts/lunr/min/lunr.el.min.js +0 -1
- package/dist/docs/assets/javascripts/lunr/min/lunr.es.min.js +0 -18
- package/dist/docs/assets/javascripts/lunr/min/lunr.fi.min.js +0 -18
- package/dist/docs/assets/javascripts/lunr/min/lunr.fr.min.js +0 -18
- package/dist/docs/assets/javascripts/lunr/min/lunr.he.min.js +0 -1
- package/dist/docs/assets/javascripts/lunr/min/lunr.hi.min.js +0 -1
- package/dist/docs/assets/javascripts/lunr/min/lunr.hu.min.js +0 -18
- package/dist/docs/assets/javascripts/lunr/min/lunr.hy.min.js +0 -1
- package/dist/docs/assets/javascripts/lunr/min/lunr.it.min.js +0 -18
- package/dist/docs/assets/javascripts/lunr/min/lunr.ja.min.js +0 -1
- package/dist/docs/assets/javascripts/lunr/min/lunr.jp.min.js +0 -1
- package/dist/docs/assets/javascripts/lunr/min/lunr.kn.min.js +0 -1
- package/dist/docs/assets/javascripts/lunr/min/lunr.ko.min.js +0 -1
- package/dist/docs/assets/javascripts/lunr/min/lunr.multi.min.js +0 -1
- package/dist/docs/assets/javascripts/lunr/min/lunr.nl.min.js +0 -18
- package/dist/docs/assets/javascripts/lunr/min/lunr.no.min.js +0 -18
- package/dist/docs/assets/javascripts/lunr/min/lunr.pt.min.js +0 -18
- package/dist/docs/assets/javascripts/lunr/min/lunr.ro.min.js +0 -18
- package/dist/docs/assets/javascripts/lunr/min/lunr.ru.min.js +0 -18
- package/dist/docs/assets/javascripts/lunr/min/lunr.sa.min.js +0 -1
- package/dist/docs/assets/javascripts/lunr/min/lunr.stemmer.support.min.js +0 -1
- package/dist/docs/assets/javascripts/lunr/min/lunr.sv.min.js +0 -18
- package/dist/docs/assets/javascripts/lunr/min/lunr.ta.min.js +0 -1
- package/dist/docs/assets/javascripts/lunr/min/lunr.te.min.js +0 -1
- package/dist/docs/assets/javascripts/lunr/min/lunr.th.min.js +0 -1
- package/dist/docs/assets/javascripts/lunr/min/lunr.tr.min.js +0 -18
- package/dist/docs/assets/javascripts/lunr/min/lunr.vi.min.js +0 -1
- package/dist/docs/assets/javascripts/lunr/min/lunr.zh.min.js +0 -1
- package/dist/docs/assets/javascripts/lunr/tinyseg.js +0 -206
- package/dist/docs/assets/javascripts/lunr/wordcut.js +0 -6708
- package/dist/docs/assets/javascripts/swagger-ui-bundle.js +0 -2
- package/dist/docs/assets/javascripts/swagger-ui-bundle.js.map +0 -1
- package/dist/docs/assets/javascripts/swagger-ui-standalone-preset.js +0 -2
- package/dist/docs/assets/javascripts/swagger-ui-standalone-preset.js.map +0 -1
- package/dist/docs/assets/javascripts/workers/search.6ce7567c.min.js +0 -42
- package/dist/docs/assets/javascripts/workers/search.6ce7567c.min.js.map +0 -7
- package/dist/docs/assets/stylesheets/main.0253249f.min.css +0 -1
- package/dist/docs/assets/stylesheets/main.0253249f.min.css.map +0 -1
- package/dist/docs/assets/stylesheets/palette.06af60db.min.css +0 -1
- package/dist/docs/assets/stylesheets/palette.06af60db.min.css.map +0 -1
- package/dist/docs/assets/stylesheets/swagger-ui-dark.css +0 -849
- package/dist/docs/assets/stylesheets/swagger-ui.css +0 -3
- package/dist/docs/assets/stylesheets/swagger-ui.css.map +0 -1
- package/dist/docs/assets/swagger-ui/oauth2-redirect.html +0 -79
- package/dist/docs/configuration/index.html +0 -2337
- package/dist/docs/deployment/index.html +0 -2288
- package/dist/docs/developer-guide/cli-methods/bundle-the-basemaps-assets-archive/index.html +0 -2539
- package/dist/docs/developer-guide/cli-methods/bundle-the-basemaps-config-file/index.html +0 -2459
- package/dist/docs/developer-guide/index.html +0 -2241
- package/dist/docs/developer-guide/run-basemaps-locally/index.html +0 -2471
- package/dist/docs/developer-guide/server-methods/serve-basemaps-with-bundled-config-file/index.html +0 -2469
- package/dist/docs/developer-guide/server-methods/serve-basemaps-with-collection-of-geotiff-files/index.html +0 -2358
- package/dist/docs/examples/_overview/index.html +0 -2226
- package/dist/docs/examples/index.leaflet.xyz.3857.html +0 -38
- package/dist/docs/examples/index.maplibre.opacity.3857.html +0 -215
- package/dist/docs/examples/index.maplibre.vector.3857.html +0 -45
- package/dist/docs/examples/leaflet.xyz.3857/index.html +0 -2260
- package/dist/docs/examples/maplibre.opacity.3857/index.html +0 -2437
- package/dist/docs/examples/maplibre.vector.3857/index.html +0 -2267
- package/dist/docs/index.css +0 -3
- package/dist/docs/index.html +0 -2497
- package/dist/docs/linz-motif.svg +0 -124
- package/dist/docs/operator-guide/cog-quality/index.html +0 -2477
- package/dist/docs/operator-guide/empty-tiles/index.html +0 -2347
- package/dist/docs/operator-guide/gebco/index.html +0 -2312
- package/dist/docs/operator-guide/index.html +0 -2215
- package/dist/docs/operator-guide/quick-start/index.html +0 -2460
- package/dist/docs/operator-guide/relief-shade/index.html +0 -2327
- package/dist/docs/operator-guide/static/2023-06-26-gisborne-2023.png +0 -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/static/quality__005_006_0_bilinear.webp +0 -0
- package/dist/docs/operator-guide/static/quality__005_006_0_lanczos.webp +0 -0
- package/dist/docs/operator-guide/static/quality__i6.bilinear.webp +0 -0
- package/dist/docs/operator-guide/static/quality__i6.cubic.webp +0 -0
- package/dist/docs/operator-guide/static/quality__i6.lanczos.webp +0 -0
- package/dist/docs/operator-guide/static/quality__resampling-overview.webp +0 -0
- package/dist/docs/operator-guide/static/quick-start__layers.png +0 -0
- package/dist/docs/operator-guide/static/relief__aerial.webp +0 -0
- package/dist/docs/operator-guide/static/relief__base.webp +0 -0
- package/dist/docs/operator-guide/static/relief__darken.webp +0 -0
- package/dist/docs/operator-guide/static/relief__lighten.webp +0 -0
- package/dist/docs/operator-guide/texture-shade/index.html +0 -2370
- package/dist/docs/operator-guide/xyz-projection/index.html +0 -2375
- package/dist/docs/quick-start/index.html +0 -2228
- package/dist/docs/sitemap.xml +0 -219
- package/dist/docs/sitemap.xml.gz +0 -0
- package/dist/docs/static/basemaps-service.png +0 -0
- package/dist/docs/static/tile-resize.png +0 -0
- package/dist/docs/static/workflow-run.png +0 -0
- package/dist/docs/user-guide/_get-started/index.html +0 -2463
- package/dist/docs/user-guide/api-documentation/index.html +0 -840
- package/dist/docs/user-guide/api-documentation/swagger-3b2ee5d5.html +0 -120
- package/dist/docs/user-guide/swagger-api.json +0 -393
- package/dist/docs/user-guide/technical-documentation/index.html +0 -2860
- package/dist/docs/user-guide/use-in-esri-software/how-to-add-emergency-imagery-to-arcgis/index.html +0 -2220
- package/dist/docs/user-guide/use-in-esri-software/how-to-add-emergency-imagery-to-arcgis/static/emergency-response-group.png +0 -0
- package/dist/docs/user-guide/use-in-esri-software/how-to-add-individual-linz-basemaps-layers-to-arcgis/index.html +0 -2268
- package/dist/docs/user-guide/use-in-esri-software/how-to-add-individual-linz-basemaps-layers-to-arcgis/static/basemaps-menu-button.png +0 -0
- package/dist/docs/user-guide/use-in-esri-software/how-to-add-individual-linz-basemaps-layers-to-arcgis/static/copy-url-apikey.png +0 -0
- package/dist/docs/user-guide/use-in-esri-software/how-to-add-individual-linz-basemaps-layers-to-arcgis/static/custom-parameters.png +0 -0
- package/dist/docs/user-guide/use-in-esri-software/how-to-add-individual-linz-basemaps-layers-to-arcgis/static/layer-search.png +0 -0
- package/dist/docs/user-guide/use-in-esri-software/how-to-add-individual-linz-basemaps-layers-to-arcgis/static/layer-selector.png +0 -0
- package/dist/docs/user-guide/use-in-esri-software/how-to-add-individual-linz-basemaps-layers-to-arcgis/static/move-apikey-info.png +0 -0
- package/dist/docs/user-guide/use-in-esri-software/how-to-add-linz-aerial-imagery-basemaps-to-arcgis-online/index.html +0 -2243
- package/dist/docs/user-guide/use-in-esri-software/how-to-add-linz-aerial-imagery-basemaps-to-arcgis-online/static/step-1-agol-map-viewer.png +0 -0
- package/dist/docs/user-guide/use-in-esri-software/how-to-add-linz-aerial-imagery-basemaps-to-arcgis-online/static/step-2-layers-panel.png +0 -0
- package/dist/docs/user-guide/use-in-esri-software/how-to-add-linz-aerial-imagery-basemaps-to-arcgis-online/static/step-3-browse-layers-option.png +0 -0
- package/dist/docs/user-guide/use-in-esri-software/how-to-add-linz-aerial-imagery-basemaps-to-arcgis-online/static/step-4-agol-option.png +0 -0
- package/dist/docs/user-guide/use-in-esri-software/how-to-add-linz-aerial-imagery-basemaps-to-arcgis-online/static/step-5-search-box.png +0 -0
- package/dist/docs/user-guide/use-in-esri-software/how-to-add-linz-aerial-imagery-basemaps-to-arcgis-online/static/step-6-desired-layer-on-map.png +0 -0
- package/dist/docs/user-guide/use-in-esri-software/how-to-add-linz-basemaps-to-arcgis-online-basemaps/index.html +0 -2229
- package/dist/docs/user-guide/use-in-esri-software/how-to-add-linz-basemaps-to-arcgis-online-basemaps/static/LINZ-basemaps-group.png +0 -0
- package/dist/docs/user-guide/use-in-esri-software/how-to-add-linz-basemaps-to-arcgis-online-basemaps/static/basemaps-in-esri-chooser.png +0 -0
- package/dist/docs/user-guide/use-in-esri-software/index.html +0 -2217
- package/dist/docs/user-guide/working-with-vector-tiles/creation/index.html +0 -2310
- package/dist/docs/user-guide/working-with-vector-tiles/creation/inputs/json-schema-file/index.html +0 -2302
- package/dist/docs/user-guide/working-with-vector-tiles/index.html +0 -2286
- package/dist/docs/user-guide/working-with-vector-tiles/schema/addresses/index.html +0 -2408
- package/dist/docs/user-guide/working-with-vector-tiles/schema/aerialways/index.html +0 -2797
- package/dist/docs/user-guide/working-with-vector-tiles/schema/boundaries/index.html +0 -2408
- package/dist/docs/user-guide/working-with-vector-tiles/schema/buildings/index.html +0 -2571
- package/dist/docs/user-guide/working-with-vector-tiles/schema/contours/index.html +0 -2719
- package/dist/docs/user-guide/working-with-vector-tiles/schema/dam_lines/index.html +0 -2561
- package/dist/docs/user-guide/working-with-vector-tiles/schema/ferries/index.html +0 -2541
- package/dist/docs/user-guide/working-with-vector-tiles/schema/land/index.html +0 -7134
- package/dist/docs/user-guide/working-with-vector-tiles/schema/parcel_boundaries/index.html +0 -2408
- package/dist/docs/user-guide/working-with-vector-tiles/schema/pier_lines/index.html +0 -2541
- package/dist/docs/user-guide/working-with-vector-tiles/schema/place_labels/index.html +0 -2428
- package/dist/docs/user-guide/working-with-vector-tiles/schema/pois/index.html +0 -2538
- package/dist/docs/user-guide/working-with-vector-tiles/schema/public_transport/index.html +0 -2802
- package/dist/docs/user-guide/working-with-vector-tiles/schema/sites/index.html +0 -3324
- package/dist/docs/user-guide/working-with-vector-tiles/schema/street_labels/index.html +0 -2817
- package/dist/docs/user-guide/working-with-vector-tiles/schema/street_polygons/index.html +0 -2684
- package/dist/docs/user-guide/working-with-vector-tiles/schema/streets/index.html +0 -3371
- package/dist/docs/user-guide/working-with-vector-tiles/schema/water_lines/index.html +0 -3708
- package/dist/docs/user-guide/working-with-vector-tiles/schema/water_polygons/index.html +0 -3477
- package/dist/docs/user-guide/working-with-vector-tiles/static/labels.png +0 -0
- package/dist/docs/user-guide/working-with-vector-tiles/static/topographic.png +0 -0
- package/dist/docs/user-guide/working-with-vector-tiles/static/topolite.png +0 -0
- package/dist/docs/user-guide/working-with-vector-tiles/styling/index.html +0 -2584
- package/dist/docs/user-guide/working-with-vector-tiles/styling/index.maplibre.vector.3857.html +0 -80
- package/dist/docs/user-guide/working-with-vector-tiles/styling/static/add-filter.webp +0 -0
- package/dist/docs/user-guide/working-with-vector-tiles/styling/static/contours.webp +0 -0
- package/dist/docs/user-guide/working-with-vector-tiles/styling/static/modify-paint.webp +0 -0
- package/dist/docs/user-guide/working-with-vector-tiles/usage/index.html +0 -2425
- package/dist/docs/user-guide/working-with-vector-tiles/usage/index.maplibre.vector.3857.html +0 -22
- package/dist/examples/index.html +0 -34
- package/dist/examples/index.leaflet.xyz.3857.html +0 -43
- package/dist/examples/index.maplibre.compare.3857.html +0 -111
- package/dist/examples/index.maplibre.elevation.3857.html +0 -100
- package/dist/examples/index.maplibre.opacity.3857.html +0 -218
- package/dist/examples/index.maplibre.vector.3857.html +0 -48
- package/dist/examples/index.openlayers.attribution.wmts.3857.html +0 -55
- package/dist/examples/index.openlayers.wmts.3857.html +0 -49
- package/dist/examples/index.openlayers.xyz.3857.html +0 -49
- package/dist/favicon-16x16.png +0 -0
- package/dist/favicon-32x32.png +0 -0
- package/dist/favicon.ico +0 -0
- package/dist/index-8.6.0-c101a024188933aa.js +0 -65922
- package/dist/index-8.6.0-c5e57c4593cca04a.css +0 -7686
- package/dist/index.css +0 -7686
- package/dist/index.html +0 -24
- package/dist/index.js +0 -65922
- package/dist/json-schema/stac-basemaps-extension/1.0/schema.json +0 -144
- package/dist/lib/attribution-8.6.0-7e26e43200746f3c.js +0 -10632
- package/dist/lib/attribution.js +0 -10632
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html>
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8" />
|
|
5
|
-
<title>Leaflet WGS84 Basemaps Demo</title>
|
|
6
|
-
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css" />
|
|
7
|
-
<script
|
|
8
|
-
src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"
|
|
9
|
-
integrity="sha384-cxOPjt7s7Iz04uaHJceBmS+qpjv2JkIHNVcuOrM+YHwZOmJGBXI00mdUXEq65HTH"
|
|
10
|
-
crossorigin="anonymous"
|
|
11
|
-
></script>
|
|
12
|
-
<style>
|
|
13
|
-
html,
|
|
14
|
-
body {
|
|
15
|
-
height: 100%;
|
|
16
|
-
margin: 0;
|
|
17
|
-
}
|
|
18
|
-
</style>
|
|
19
|
-
</head>
|
|
20
|
-
|
|
21
|
-
<body>
|
|
22
|
-
<div id="map" style="width: 100%; height: 500px"></div>
|
|
23
|
-
<script>
|
|
24
|
-
const startPos = [-40.5, 173];
|
|
25
|
-
const startZoom = 6;
|
|
26
|
-
|
|
27
|
-
const url =
|
|
28
|
-
'https://basemaps.linz.govt.nz/v1/tiles/aerial/WebMercatorQuad/{z}/{x}/{y}.webp?api=d01hep5551e30kxb7w85hck49tp';
|
|
29
|
-
|
|
30
|
-
const tiles = L.tileLayer(url, {
|
|
31
|
-
attribution:
|
|
32
|
-
'<a href="https://www.linz.govt.nz/data/linz-data/linz-basemaps/data-attribution">LINZ CC BY 4.0 © Imagery Basemap contributors</a>',
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
L.map('map').addLayer(tiles).setView(startPos, startZoom);
|
|
36
|
-
</script>
|
|
37
|
-
</body>
|
|
38
|
-
</html>
|
|
@@ -1,215 +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
|
-
<link rel="stylesheet" href="https://unpkg.com/maplibre-gl@3.6.0/dist/maplibre-gl.css" />
|
|
8
|
-
<script
|
|
9
|
-
src="https://unpkg.com/maplibre-gl@3.6.0/dist/maplibre-gl.js"
|
|
10
|
-
integrity="sha384-EYXW8ZhnlWPofZd2XtrFMKIJZXd8x1vTls280ww621jL26+4304H6YXxvU6RcKYd"
|
|
11
|
-
crossorigin="anonymous"
|
|
12
|
-
></script>
|
|
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
|
-
|
|
68
|
-
<body>
|
|
69
|
-
<div id="raster" class="map"></div>
|
|
70
|
-
<div id="vector" class="map"></div>
|
|
71
|
-
|
|
72
|
-
<div class="map-overlay top">
|
|
73
|
-
<div class="map-overlay-inner">
|
|
74
|
-
<label>Layer opacity: <span id="slider-value">100%</span></label>
|
|
75
|
-
<input id="slider" type="range" min="0" max="100" step="0" value="100" />
|
|
76
|
-
</div>
|
|
77
|
-
</div>
|
|
78
|
-
|
|
79
|
-
<script>
|
|
80
|
-
// vector layers
|
|
81
|
-
const styleUrl =
|
|
82
|
-
'https://basemaps.linz.govt.nz/v1/tiles/topographic/WebMercatorQuad/style/topographic.json?api=d01hep5551e30kxb7w85hck49tp';
|
|
83
|
-
|
|
84
|
-
// Raster layers
|
|
85
|
-
const url =
|
|
86
|
-
'https://basemaps.linz.govt.nz/v1/tiles/aerial/WebMercatorQuad/{z}/{x}/{y}.webp?api=d01hep5551e30kxb7w85hck49tp';
|
|
87
|
-
|
|
88
|
-
const startPos = [173, -40.5];
|
|
89
|
-
const startZoom = 6;
|
|
90
|
-
|
|
91
|
-
var raster = new maplibregl.Map({
|
|
92
|
-
container: 'raster', // Container ID
|
|
93
|
-
style: {
|
|
94
|
-
version: 8,
|
|
95
|
-
sources: {
|
|
96
|
-
'raster-tiles': {
|
|
97
|
-
type: 'raster',
|
|
98
|
-
tiles: [url],
|
|
99
|
-
tileSize: 256,
|
|
100
|
-
},
|
|
101
|
-
},
|
|
102
|
-
layers: [
|
|
103
|
-
{
|
|
104
|
-
id: 'LINZ Raster Basemaps',
|
|
105
|
-
type: 'raster',
|
|
106
|
-
source: 'raster-tiles',
|
|
107
|
-
},
|
|
108
|
-
],
|
|
109
|
-
},
|
|
110
|
-
center: startPos,
|
|
111
|
-
zoom: startZoom,
|
|
112
|
-
});
|
|
113
|
-
|
|
114
|
-
var vector = new maplibregl.Map({
|
|
115
|
-
container: 'vector', // Container ID
|
|
116
|
-
style: styleUrl,
|
|
117
|
-
center: startPos,
|
|
118
|
-
zoom: startZoom,
|
|
119
|
-
});
|
|
120
|
-
|
|
121
|
-
var slider = document.getElementById('slider');
|
|
122
|
-
var sliderValue = document.getElementById('slider-value');
|
|
123
|
-
|
|
124
|
-
vector.on('load', function () {
|
|
125
|
-
slider.addEventListener('input', function (e) {
|
|
126
|
-
var vectorMap = document.querySelector('#vector');
|
|
127
|
-
vectorMap.style.opacity = parseInt(e.target.value, 10) / 100;
|
|
128
|
-
sliderValue.textContent = e.target.value + '%';
|
|
129
|
-
});
|
|
130
|
-
});
|
|
131
|
-
|
|
132
|
-
// Copyright (c) 2016, Mapbox - ISC License
|
|
133
|
-
// https://github.com/mapbox/mapbox-gl-sync-move
|
|
134
|
-
function moveToMapPosition(master, clones) {
|
|
135
|
-
let center = master.getCenter();
|
|
136
|
-
let zoom = master.getZoom();
|
|
137
|
-
let bearing = master.getBearing();
|
|
138
|
-
let pitch = master.getPitch();
|
|
139
|
-
|
|
140
|
-
clones.forEach(function (clone) {
|
|
141
|
-
clone.jumpTo({
|
|
142
|
-
center: center,
|
|
143
|
-
zoom: zoom,
|
|
144
|
-
bearing: bearing,
|
|
145
|
-
pitch: pitch,
|
|
146
|
-
});
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
// Sync movements of two maps.
|
|
151
|
-
//
|
|
152
|
-
// All interactions that result in movement end up firing
|
|
153
|
-
// a "move" event. The trick here, though, is to
|
|
154
|
-
// ensure that movements don't cycle from one map
|
|
155
|
-
// to the other and back again, because such a cycle
|
|
156
|
-
// - could cause an infinite loop
|
|
157
|
-
// - prematurely halts prolonged movements like
|
|
158
|
-
// double-click zooming, box-zooming, and flying
|
|
159
|
-
function syncMaps() {
|
|
160
|
-
let maps;
|
|
161
|
-
let argLen = arguments.length;
|
|
162
|
-
if (argLen === 1) {
|
|
163
|
-
maps = arguments[0];
|
|
164
|
-
} else {
|
|
165
|
-
maps = [];
|
|
166
|
-
for (let i = 0; i < argLen; i++) {
|
|
167
|
-
maps.push(arguments[i]);
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
// Create all the movement functions, because if they're created every time
|
|
172
|
-
// they wouldn't be the same and couldn't be removed.
|
|
173
|
-
let fns = [];
|
|
174
|
-
maps.forEach(function (map, index) {
|
|
175
|
-
fns[index] = sync.bind(
|
|
176
|
-
null,
|
|
177
|
-
map,
|
|
178
|
-
maps.filter(function (o, i) {
|
|
179
|
-
return i !== index;
|
|
180
|
-
}),
|
|
181
|
-
);
|
|
182
|
-
});
|
|
183
|
-
|
|
184
|
-
function on() {
|
|
185
|
-
maps.forEach(function (map, index) {
|
|
186
|
-
map.on('move', fns[index]);
|
|
187
|
-
});
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
function off() {
|
|
191
|
-
maps.forEach(function (map, index) {
|
|
192
|
-
map.off('move', fns[index]);
|
|
193
|
-
});
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
// When one map moves, we turn off the movement listeners
|
|
197
|
-
// on all the maps, move it, then turn the listeners on again
|
|
198
|
-
function sync(master, clones) {
|
|
199
|
-
off();
|
|
200
|
-
moveToMapPosition(master, clones);
|
|
201
|
-
on();
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
on();
|
|
205
|
-
return function () {
|
|
206
|
-
off();
|
|
207
|
-
fns = [];
|
|
208
|
-
maps = [];
|
|
209
|
-
};
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
syncMaps(raster, vector);
|
|
213
|
-
</script>
|
|
214
|
-
</body>
|
|
215
|
-
</html>
|
|
@@ -1,45 +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
|
-
<link rel="stylesheet" href="https://unpkg.com/maplibre-gl@3.6.0/dist/maplibre-gl.css" />
|
|
8
|
-
<script
|
|
9
|
-
src="https://unpkg.com/maplibre-gl@3.6.0/dist/maplibre-gl.js"
|
|
10
|
-
integrity="sha384-EYXW8ZhnlWPofZd2XtrFMKIJZXd8x1vTls280ww621jL26+4304H6YXxvU6RcKYd"
|
|
11
|
-
crossorigin="anonymous"
|
|
12
|
-
></script>
|
|
13
|
-
<style>
|
|
14
|
-
body {
|
|
15
|
-
margin: 0;
|
|
16
|
-
padding: 0;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
#map {
|
|
20
|
-
position: absolute;
|
|
21
|
-
top: 0;
|
|
22
|
-
bottom: 0;
|
|
23
|
-
width: 100%;
|
|
24
|
-
}
|
|
25
|
-
</style>
|
|
26
|
-
</head>
|
|
27
|
-
|
|
28
|
-
<body>
|
|
29
|
-
<div id="map"></div>
|
|
30
|
-
<script>
|
|
31
|
-
const startPos = [173, -40.5];
|
|
32
|
-
const startZoom = 6;
|
|
33
|
-
|
|
34
|
-
// vector layers
|
|
35
|
-
const style =
|
|
36
|
-
'https://basemaps.linz.govt.nz/v1/tiles/topographic/WebMercatorQuad/style/topographic.json?api=d01hep5551e30kxb7w85hck49tp';
|
|
37
|
-
var map = new maplibregl.Map({
|
|
38
|
-
container: 'map', // container id
|
|
39
|
-
style: style, // style URL
|
|
40
|
-
center: startPos, // starting position [lng, lat]
|
|
41
|
-
zoom: startZoom, // starting zoom
|
|
42
|
-
});
|
|
43
|
-
</script>
|
|
44
|
-
</body>
|
|
45
|
-
</html>
|