@basemaps/landing 7.15.1 → 7.17.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/dist/index.js CHANGED
@@ -57095,35 +57095,16 @@ var WindowUrl = {
57095
57095
  };
57096
57096
 
57097
57097
  // src/tile.matrix.ts
57098
- var TileGrid = class {
57099
- constructor(tileMatrix, extraZoomLevels = 0) {
57100
- __publicField(this, "tileMatrix");
57101
- __publicField(this, "extraZoomLevels");
57102
- this.tileMatrix = tileMatrix;
57103
- this.extraZoomLevels = extraZoomLevels;
57104
- }
57105
- getStyle(cfg) {
57106
- return WindowUrl.toTileUrl({
57107
- urlType: "style" /* Style */,
57108
- tileMatrix: this.tileMatrix,
57109
- layerId: cfg.layerId,
57110
- style: cfg.style,
57111
- config: cfg.config ?? Config.map.config,
57112
- terrain: cfg.terrain ?? Config.map.terrain,
57113
- labels: cfg.labels ?? Config.map.labels
57114
- });
57115
- }
57116
- };
57117
- var Nztm2000TileGrid = new TileGrid(Nztm2000Tms, 2);
57118
- var Nztm2000QuadTileGrid = new TileGrid(Nztm2000QuadTms);
57119
- var GoogleTileGrid = new TileGrid(GoogleTms);
57120
- var Grids = [Nztm2000TileGrid, Nztm2000QuadTileGrid, GoogleTileGrid];
57121
- function getTileGrid(id2) {
57122
- for (const g of Grids) {
57123
- if (id2 === g.tileMatrix.identifier)
57124
- return g;
57125
- }
57126
- return GoogleTileGrid;
57098
+ function getTileGridStyle(tileMatrixSet, cfg) {
57099
+ return WindowUrl.toTileUrl({
57100
+ urlType: "style" /* Style */,
57101
+ tileMatrix: tileMatrixSet,
57102
+ layerId: cfg.layerId,
57103
+ style: cfg.style,
57104
+ config: cfg.config ?? Config.map.config,
57105
+ terrain: cfg.terrain ?? Config.map.terrain,
57106
+ labels: cfg.labels ?? Config.map.labels
57107
+ });
57127
57108
  }
57128
57109
  function isGoogle(tms) {
57129
57110
  return tms.identifier === GoogleTms.identifier;
@@ -57471,6 +57452,12 @@ function addDefaultLayers(output) {
57471
57452
  projections: /* @__PURE__ */ new Set([EpsgCode.Nztm2000, EpsgCode.Google]),
57472
57453
  category: "Basemaps"
57473
57454
  },
57455
+ {
57456
+ id: "topo-raster::topo-raster",
57457
+ title: "NZ Topo Gridless Maps",
57458
+ projections: /* @__PURE__ */ new Set([EpsgCode.Nztm2000, EpsgCode.Google]),
57459
+ category: "Basemaps"
57460
+ },
57474
57461
  {
57475
57462
  id: "topographic::topographic",
57476
57463
  title: "Topographic",
@@ -57484,16 +57471,30 @@ function addDefaultLayers(output) {
57484
57471
  category: "Basemaps"
57485
57472
  },
57486
57473
  {
57487
- id: "topo-raster::topo-raster",
57488
- title: "NZ Topo Gridless Maps",
57474
+ id: "hillshade-igor",
57475
+ title: "Hillshade Igor",
57489
57476
  projections: /* @__PURE__ */ new Set([EpsgCode.Nztm2000, EpsgCode.Google]),
57490
- category: "Basemaps"
57477
+ category: "Basemaps - Hillshade"
57478
+ },
57479
+ {
57480
+ id: "hillshade",
57481
+ title: "Hillshade Standard",
57482
+ projections: /* @__PURE__ */ new Set([EpsgCode.Nztm2000, EpsgCode.Google]),
57483
+ category: "Basemaps - Hillshade"
57491
57484
  },
57492
57485
  {
57493
57486
  id: "elevation",
57494
- title: "Elevation",
57487
+ title: "Elevation DEM",
57495
57488
  projections: /* @__PURE__ */ new Set([EpsgCode.Google]),
57496
- category: "Basemaps",
57489
+ category: "Basemaps - Elevation",
57490
+ pipeline: "terrain-rgb",
57491
+ imageFormat: "png"
57492
+ },
57493
+ {
57494
+ id: "elevation-dsm",
57495
+ title: "Elevation DSM",
57496
+ projections: /* @__PURE__ */ new Set([EpsgCode.Google]),
57497
+ category: "Basemaps - Elevation",
57497
57498
  pipeline: "terrain-rgb",
57498
57499
  imageFormat: "png"
57499
57500
  },
@@ -57501,13 +57502,13 @@ function addDefaultLayers(output) {
57501
57502
  id: "scanned-aerial-imagery-pre-1990-01-01",
57502
57503
  title: "Scanned Aerial Imagery pre 1 January 1990",
57503
57504
  projections: /* @__PURE__ */ new Set([EpsgCode.Nztm2000, EpsgCode.Google]),
57504
- category: "Scanned Aerial Imagery Basemaps"
57505
+ category: "Basemaps - Scanned Aerial Imagery"
57505
57506
  },
57506
57507
  {
57507
57508
  id: "scanned-aerial-imagery-post-1989-12-31",
57508
57509
  title: "Scanned Aerial Imagery post 31 December 1989",
57509
57510
  projections: /* @__PURE__ */ new Set([EpsgCode.Nztm2000, EpsgCode.Google]),
57510
- category: "Scanned Aerial Imagery Basemaps"
57511
+ category: "Basemaps - Scanned Aerial Imagery"
57511
57512
  }
57512
57513
  ];
57513
57514
  for (const l of layers)
@@ -57535,11 +57536,11 @@ var Config = {
57535
57536
  return "";
57536
57537
  },
57537
57538
  get Version() {
57538
- return "v7.15.0-3-g500e138b";
57539
+ return "v7.16.0-2-g8d563866";
57539
57540
  },
57540
57541
  /** Github buildId */
57541
57542
  get BuildId() {
57542
- return "14046256909-1";
57543
+ return "14346900594-1";
57543
57544
  },
57544
57545
  map: new MapConfig()
57545
57546
  };
@@ -64173,7 +64174,8 @@ var DebugMap = class {
64173
64174
  var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
64174
64175
  var HillShadeLayerId = "debug-hillshade";
64175
64176
  var HillShadePrefix = "__hillshade-";
64176
- var elevationProdId = "LINZ-Terrain-Prod";
64177
+ var elevationDemProdId = "LINZ-Elevation-DEM-Prod";
64178
+ var elevationDsmProdId = "LINZ-Elevation-DSM-Prod";
64177
64179
  function debugSourceDropdown(ctx) {
64178
64180
  return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "debug__info", children: [
64179
64181
  /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("label", { className: "debug__label", children: ctx.label }),
@@ -64367,8 +64369,8 @@ var Debug = class extends import_react12.Component {
64367
64369
  this.renderCaptureAreaToggle(),
64368
64370
  this.renderTileToggle(),
64369
64371
  this.renderRasterSourceDropdown(),
64370
- this.renderDemSourceDropdown(demSources),
64371
- this.renderDemHillShadeSourceDropdown(demSources)
64372
+ this.renderElevationSourceDropdown(demSources),
64373
+ this.renderHillShadeSourceDropdown(demSources)
64372
64374
  ] });
64373
64375
  }
64374
64376
  getWMTSLink() {
@@ -64453,11 +64455,11 @@ var Debug = class extends import_react12.Component {
64453
64455
  });
64454
64456
  }
64455
64457
  /**
64456
- * Add a terrain source that points to production elevation data for debug
64458
+ * Add terrain sources that point to production elevation tilesets
64457
64459
  */
64458
64460
  ensureElevationProd() {
64459
64461
  const map = this.props.map;
64460
- if (map.getSource(elevationProdId) == null) {
64462
+ if (map.getSource(elevationDemProdId) == null) {
64461
64463
  const url = WindowUrl.toTileUrl({
64462
64464
  urlType: "raster" /* TileRaster */,
64463
64465
  tileMatrix: Config.map.tileMatrix,
@@ -64465,7 +64467,21 @@ var Debug = class extends import_react12.Component {
64465
64467
  pipeline: "terrain-rgb",
64466
64468
  imageFormat: "png"
64467
64469
  });
64468
- map.addSource(elevationProdId, {
64470
+ map.addSource(elevationDemProdId, {
64471
+ type: "raster-dem",
64472
+ tiles: [url],
64473
+ tileSize: 256
64474
+ });
64475
+ }
64476
+ if (map.getSource(elevationDsmProdId) == null) {
64477
+ const url = WindowUrl.toTileUrl({
64478
+ urlType: "raster" /* TileRaster */,
64479
+ tileMatrix: Config.map.tileMatrix,
64480
+ layerId: "elevation-dsm",
64481
+ pipeline: "terrain-rgb",
64482
+ imageFormat: "png"
64483
+ });
64484
+ map.addSource(elevationDsmProdId, {
64469
64485
  type: "raster-dem",
64470
64486
  tiles: [url],
64471
64487
  tileSize: 256
@@ -64571,7 +64587,7 @@ var Debug = class extends import_react12.Component {
64571
64587
  options: [...sourceIds, "off"]
64572
64588
  });
64573
64589
  }
64574
- renderDemSourceDropdown(sourceIds) {
64590
+ renderElevationSourceDropdown(sourceIds) {
64575
64591
  if (sourceIds.length === 0)
64576
64592
  return;
64577
64593
  return debugSourceDropdown({
@@ -64581,7 +64597,7 @@ var Debug = class extends import_react12.Component {
64581
64597
  options: ["off", ...sourceIds]
64582
64598
  });
64583
64599
  }
64584
- renderDemHillShadeSourceDropdown(sourceIds) {
64600
+ renderHillShadeSourceDropdown(sourceIds) {
64585
64601
  if (sourceIds.length === 0)
64586
64602
  return;
64587
64603
  return debugSourceDropdown({
@@ -64759,8 +64775,7 @@ var MapSwitcher = class extends import_react13.Component {
64759
64775
  const target = this.getStyleType();
64760
64776
  const styleId = `${target.layerId}::${target.style}`;
64761
64777
  if (this.currentStyle !== styleId) {
64762
- const tileGrid = getTileGrid(Config.map.tileMatrix.identifier);
64763
- const style = tileGrid.getStyle({ layerId: target.layerId, style: target.style });
64778
+ const style = getTileGridStyle(Config.map.tileMatrix, { layerId: target.layerId, style: target.style });
64764
64779
  this.currentStyle = styleId;
64765
64780
  this.map.setStyle(style);
64766
64781
  }
@@ -64784,10 +64799,9 @@ var MapSwitcher = class extends import_react13.Component {
64784
64799
  if (this.el == null)
64785
64800
  return;
64786
64801
  const cfg = Config.map;
64787
- const tileGrid = getTileGrid(cfg.tileMatrix.identifier);
64788
64802
  const target = this.getStyleType();
64789
64803
  this.currentStyle = `${target.layerId}::${target.style}`;
64790
- const style = tileGrid.getStyle({ layerId: target.layerId, style: target.style });
64804
+ const style = getTileGridStyle(cfg.tileMatrix, { layerId: target.layerId, style: target.style });
64791
64805
  const location2 = cfg.transformedLocation;
64792
64806
  this.map = new import_maplibre_gl.default.Map({
64793
64807
  container: this.el,
@@ -64887,8 +64901,7 @@ var Basemaps = class extends import_react14.Component {
64887
64901
  this.ensureGeoControl();
64888
64902
  this.ensureScaleControl();
64889
64903
  this.ensureElevationControl();
64890
- const tileGrid = getTileGrid(Config.map.tileMatrix.identifier);
64891
- const style = tileGrid.getStyle(Config.map);
64904
+ const style = getTileGridStyle(Config.map.tileMatrix, Config.map);
64892
64905
  this.map.setStyle(style);
64893
64906
  if (Config.map.tileMatrix !== GoogleTms) {
64894
64907
  this.map.setMaxBounds([-179.9, -85, 179.9, 85]);
@@ -64973,8 +64986,7 @@ var Basemaps = class extends import_react14.Component {
64973
64986
  if (this.el == null)
64974
64987
  throw new Error("Unable to find #map element");
64975
64988
  const cfg = Config.map;
64976
- const tileGrid = getTileGrid(cfg.tileMatrix.identifier);
64977
- const style = tileGrid.getStyle(Config.map);
64989
+ const style = getTileGridStyle(Config.map.tileMatrix, Config.map);
64978
64990
  const location2 = locationTransform(cfg.location, cfg.tileMatrix, GoogleTms);
64979
64991
  this.map = new import_maplibre_gl2.default.Map({
64980
64992
  container: this.el,
@@ -65200,7 +65212,9 @@ var MapAttribution = class {
65200
65212
  var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
65201
65213
  var Categories = [
65202
65214
  "Basemaps",
65203
- "Scanned Aerial Imagery Basemaps",
65215
+ "Basemaps - Hillshade",
65216
+ "Basemaps - Elevation",
65217
+ "Basemaps - Scanned Aerial Imagery",
65204
65218
  "Satellite Imagery",
65205
65219
  "Urban Aerial Photos",
65206
65220
  "Rural Aerial Photos",
@@ -65318,7 +65332,8 @@ var LayerSwitcherDropdown = class extends import_react15.Component {
65318
65332
  onChange: this.onLayerChange,
65319
65333
  value: ret.current,
65320
65334
  classNamePrefix: "layer-selector",
65321
- id: "layer-selector"
65335
+ id: "layer-selector",
65336
+ maxMenuHeight: 520
65322
65337
  }
65323
65338
  ),
65324
65339
  /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
@@ -65479,7 +65494,7 @@ Your Service/App URL:
65479
65494
  children: [
65480
65495
  /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(LayerSwitcherDropdown, {}),
65481
65496
  this.renderLinks(),
65482
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h6", { children: "Developer API Keys" }),
65497
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h6", { children: "Developer API keys" }),
65483
65498
  /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { children: "Contact us for free API keys with better support for public web and mobile apps." }),
65484
65499
  /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { className: "lui-button lui-button-primary contact-us", onClick: this.contactUs, children: "Contact us" }),
65485
65500
  this.renderAbout()
@@ -65530,9 +65545,9 @@ Your Service/App URL:
65530
65545
  }
65531
65546
  renderLinks() {
65532
65547
  return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_react16.Fragment, { children: [
65533
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h6", { children: "90 day API keys" }),
65534
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { children: "API keys expire after 90 days, if a longer duration is needed please request a developer API key" }),
65535
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Copyable, { header: "Api Key", value: Config.ApiKey }),
65548
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h6", { children: "Individual API keys" }),
65549
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { children: "These API keys are for individual users. For use in shared or public maps, apps or tools, please request a free Developer API key." }),
65550
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Copyable, { header: "API Key", value: Config.ApiKey }),
65536
65551
  this.renderLinksTiles()
65537
65552
  ] });
65538
65553
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@basemaps/landing",
3
- "version": "7.15.1",
3
+ "version": "7.17.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.15.0",
32
- "@basemaps/config": "^7.15.0",
33
- "@basemaps/geo": "^7.15.0",
34
- "@basemaps/infra": "^7.15.0",
35
- "@basemaps/shared": "^7.15.0",
31
+ "@basemaps/attribution": "^7.16.0",
32
+ "@basemaps/config": "^7.16.0",
33
+ "@basemaps/geo": "^7.16.0",
34
+ "@basemaps/infra": "^7.16.0",
35
+ "@basemaps/shared": "^7.16.0",
36
36
  "@linzjs/lui": "^21.46.0",
37
37
  "@servie/events": "^3.0.0",
38
38
  "@types/proj4": "^2.5.2",
@@ -113,5 +113,5 @@
113
113
  }
114
114
  }
115
115
  ],
116
- "gitHead": "500e138bf620cebd76dfdad24bde53c192da597b"
116
+ "gitHead": "8d56386678799c617d0a774e59411beacd31e609"
117
117
  }