@basemaps/landing 8.2.0 → 8.3.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.
@@ -55808,48 +55808,6 @@ Object.defineProperty(Projection2, "AllowedFloatingError", {
55808
55808
  value: 1e-8
55809
55809
  });
55810
55810
 
55811
- // ../geo/build/proj/projection.loader.js
55812
- var ProjectionLoader = class {
55813
- /**
55814
- * Ensure that a projection EPSG code is avialable for use in Proj4js
55815
- *
55816
- * If its not already loaded, lookup definition from spatialreference.org
55817
- * @param code
55818
- */
55819
- static async load(code) {
55820
- if (Projection2.tryGet(code) != null)
55821
- return Epsg.get(code);
55822
- const url = `https://spatialreference.org/ref/epsg/${code}/ogcwkt/`;
55823
- const res = await this._fetch(url);
55824
- if (!res.ok)
55825
- throw new Error("Failed to load projection information for:" + code);
55826
- let epsg = Epsg.tryGet(code);
55827
- if (epsg == null)
55828
- epsg = new Epsg(code);
55829
- const text = await res.text();
55830
- Projection2.define(epsg, text);
55831
- return epsg;
55832
- }
55833
- };
55834
- Object.defineProperty(ProjectionLoader, "_fetch", {
55835
- enumerable: true,
55836
- configurable: true,
55837
- writable: true,
55838
- value: fetch
55839
- });
55840
-
55841
- // ../geo/build/proj/tile.set.name.js
55842
- var TileSetName;
55843
- (function(TileSetName2) {
55844
- TileSetName2["aerial"] = "aerial";
55845
- })(TileSetName || (TileSetName = {}));
55846
-
55847
- // ../geo/build/quad.key.js
55848
- var CHAR_0 = "0".charCodeAt(0);
55849
- var CHAR_1 = "1".charCodeAt(0);
55850
- var CHAR_2 = "2".charCodeAt(0);
55851
- var CHAR_3 = "3".charCodeAt(0);
55852
-
55853
55811
  // ../geo/build/xy.order.js
55854
55812
  function getXyOrder(epsg) {
55855
55813
  const code = typeof epsg === "number" ? epsg : epsg.code;
@@ -56135,25 +56093,25 @@ var TileMatrixSet = class {
56135
56093
  }
56136
56094
  };
56137
56095
 
56138
- // ../geo/build/tms/citm2000.js
56139
- var Citm2000Tmst = {
56096
+ // ../geo/build/tms/google.js
56097
+ var GoogleTmst = {
56140
56098
  type: "TileMatrixSetType",
56141
- title: "Debug tile matrix for EPSG:3793",
56142
- abstract: "",
56143
- identifier: "CITM2000Quad",
56144
- supportedCRS: "https://www.opengis.net/def/crs/EPSG/0/3793",
56099
+ title: "Google Maps Compatible for the World",
56100
+ identifier: "WebMercatorQuad",
56145
56101
  boundingBox: {
56146
56102
  type: "BoundingBoxType",
56147
- crs: "https://www.opengis.net/def/crs/EPSG/0/3793",
56148
- lowerCorner: [5051234111622438e-9, 3.4301543757978342e6],
56149
- upperCorner: [5207777145550478e-9, 3.5866974097258747e6]
56103
+ crs: "http://www.opengis.net/def/crs/EPSG/0/3857",
56104
+ lowerCorner: [-200375083427892e-7, -200375083427892e-7],
56105
+ upperCorner: [200375083427892e-7, 200375083427892e-7]
56150
56106
  },
56107
+ supportedCRS: "https://www.opengis.net/def/crs/EPSG/0/3857",
56108
+ wellKnownScaleSet: "https://www.opengis.net/def/wkss/OGC/1.0/GoogleMapsCompatible",
56151
56109
  tileMatrix: [
56152
56110
  {
56153
56111
  type: "TileMatrixType",
56154
56112
  identifier: "0",
56155
- scaleDenominator: 218391509386217e-8,
56156
- topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
56113
+ scaleDenominator: 559082264028717e-6,
56114
+ topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
56157
56115
  tileWidth: 256,
56158
56116
  tileHeight: 256,
56159
56117
  matrixWidth: 1,
@@ -56162,8 +56120,8 @@ var Citm2000Tmst = {
56162
56120
  {
56163
56121
  type: "TileMatrixType",
56164
56122
  identifier: "1",
56165
- scaleDenominator: 109195754693108e-8,
56166
- topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
56123
+ scaleDenominator: 279541132014358e-6,
56124
+ topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
56167
56125
  tileWidth: 256,
56168
56126
  tileHeight: 256,
56169
56127
  matrixWidth: 2,
@@ -56172,8 +56130,8 @@ var Citm2000Tmst = {
56172
56130
  {
56173
56131
  type: "TileMatrixType",
56174
56132
  identifier: "2",
56175
- scaleDenominator: 545978.773465544,
56176
- topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
56133
+ scaleDenominator: 139770566007179e-6,
56134
+ topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
56177
56135
  tileWidth: 256,
56178
56136
  tileHeight: 256,
56179
56137
  matrixWidth: 4,
@@ -56182,8 +56140,8 @@ var Citm2000Tmst = {
56182
56140
  {
56183
56141
  type: "TileMatrixType",
56184
56142
  identifier: "3",
56185
- scaleDenominator: 272989.386732772,
56186
- topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
56143
+ scaleDenominator: 698852830035897e-7,
56144
+ topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
56187
56145
  tileWidth: 256,
56188
56146
  tileHeight: 256,
56189
56147
  matrixWidth: 8,
@@ -56192,8 +56150,8 @@ var Citm2000Tmst = {
56192
56150
  {
56193
56151
  type: "TileMatrixType",
56194
56152
  identifier: "4",
56195
- scaleDenominator: 136494.693366386,
56196
- topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
56153
+ scaleDenominator: 349426415017948e-7,
56154
+ topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
56197
56155
  tileWidth: 256,
56198
56156
  tileHeight: 256,
56199
56157
  matrixWidth: 16,
@@ -56202,8 +56160,8 @@ var Citm2000Tmst = {
56202
56160
  {
56203
56161
  type: "TileMatrixType",
56204
56162
  identifier: "5",
56205
- scaleDenominator: 68247.346683193,
56206
- topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
56163
+ scaleDenominator: 174713207508974e-7,
56164
+ topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
56207
56165
  tileWidth: 256,
56208
56166
  tileHeight: 256,
56209
56167
  matrixWidth: 32,
@@ -56212,8 +56170,8 @@ var Citm2000Tmst = {
56212
56170
  {
56213
56171
  type: "TileMatrixType",
56214
56172
  identifier: "6",
56215
- scaleDenominator: 34123.6733415964,
56216
- topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
56173
+ scaleDenominator: 873566037544871e-8,
56174
+ topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
56217
56175
  tileWidth: 256,
56218
56176
  tileHeight: 256,
56219
56177
  matrixWidth: 64,
@@ -56222,8 +56180,8 @@ var Citm2000Tmst = {
56222
56180
  {
56223
56181
  type: "TileMatrixType",
56224
56182
  identifier: "7",
56225
- scaleDenominator: 17061.8366707982,
56226
- topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
56183
+ scaleDenominator: 436783018772435e-8,
56184
+ topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
56227
56185
  tileWidth: 256,
56228
56186
  tileHeight: 256,
56229
56187
  matrixWidth: 128,
@@ -56232,8 +56190,8 @@ var Citm2000Tmst = {
56232
56190
  {
56233
56191
  type: "TileMatrixType",
56234
56192
  identifier: "8",
56235
- scaleDenominator: 8530.91833539913,
56236
- topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
56193
+ scaleDenominator: 218391509386217e-8,
56194
+ topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
56237
56195
  tileWidth: 256,
56238
56196
  tileHeight: 256,
56239
56197
  matrixWidth: 256,
@@ -56242,8 +56200,8 @@ var Citm2000Tmst = {
56242
56200
  {
56243
56201
  type: "TileMatrixType",
56244
56202
  identifier: "9",
56245
- scaleDenominator: 4265.45916769956,
56246
- topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
56203
+ scaleDenominator: 109195754693108e-8,
56204
+ topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
56247
56205
  tileWidth: 256,
56248
56206
  tileHeight: 256,
56249
56207
  matrixWidth: 512,
@@ -56252,8 +56210,8 @@ var Citm2000Tmst = {
56252
56210
  {
56253
56211
  type: "TileMatrixType",
56254
56212
  identifier: "10",
56255
- scaleDenominator: 2132.72958384978,
56256
- topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
56213
+ scaleDenominator: 545978.773465544,
56214
+ topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
56257
56215
  tileWidth: 256,
56258
56216
  tileHeight: 256,
56259
56217
  matrixWidth: 1024,
@@ -56262,8 +56220,8 @@ var Citm2000Tmst = {
56262
56220
  {
56263
56221
  type: "TileMatrixType",
56264
56222
  identifier: "11",
56265
- scaleDenominator: 1066.36479192489,
56266
- topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
56223
+ scaleDenominator: 272989.386732772,
56224
+ topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
56267
56225
  tileWidth: 256,
56268
56226
  tileHeight: 256,
56269
56227
  matrixWidth: 2048,
@@ -56272,8 +56230,8 @@ var Citm2000Tmst = {
56272
56230
  {
56273
56231
  type: "TileMatrixType",
56274
56232
  identifier: "12",
56275
- scaleDenominator: 533.182395962445,
56276
- topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
56233
+ scaleDenominator: 136494.693366386,
56234
+ topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
56277
56235
  tileWidth: 256,
56278
56236
  tileHeight: 256,
56279
56237
  matrixWidth: 4096,
@@ -56282,8 +56240,8 @@ var Citm2000Tmst = {
56282
56240
  {
56283
56241
  type: "TileMatrixType",
56284
56242
  identifier: "13",
56285
- scaleDenominator: 266.591197981222,
56286
- topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
56243
+ scaleDenominator: 68247.346683193,
56244
+ topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
56287
56245
  tileWidth: 256,
56288
56246
  tileHeight: 256,
56289
56247
  matrixWidth: 8192,
@@ -56292,8 +56250,8 @@ var Citm2000Tmst = {
56292
56250
  {
56293
56251
  type: "TileMatrixType",
56294
56252
  identifier: "14",
56295
- scaleDenominator: 133.295598990611,
56296
- topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
56253
+ scaleDenominator: 34123.6733415964,
56254
+ topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
56297
56255
  tileWidth: 256,
56298
56256
  tileHeight: 256,
56299
56257
  matrixWidth: 16384,
@@ -56302,8 +56260,8 @@ var Citm2000Tmst = {
56302
56260
  {
56303
56261
  type: "TileMatrixType",
56304
56262
  identifier: "15",
56305
- scaleDenominator: 66.6477994953056,
56306
- topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
56263
+ scaleDenominator: 17061.8366707982,
56264
+ topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
56307
56265
  tileWidth: 256,
56308
56266
  tileHeight: 256,
56309
56267
  matrixWidth: 32768,
@@ -56312,46 +56270,227 @@ var Citm2000Tmst = {
56312
56270
  {
56313
56271
  type: "TileMatrixType",
56314
56272
  identifier: "16",
56315
- scaleDenominator: 33.3238997476528,
56316
- topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
56273
+ scaleDenominator: 8530.91833539913,
56274
+ topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
56317
56275
  tileWidth: 256,
56318
56276
  tileHeight: 256,
56319
56277
  matrixWidth: 65536,
56320
56278
  matrixHeight: 65536
56279
+ },
56280
+ {
56281
+ type: "TileMatrixType",
56282
+ identifier: "17",
56283
+ scaleDenominator: 4265.45916769956,
56284
+ topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
56285
+ tileWidth: 256,
56286
+ tileHeight: 256,
56287
+ matrixWidth: 131072,
56288
+ matrixHeight: 131072
56289
+ },
56290
+ {
56291
+ type: "TileMatrixType",
56292
+ identifier: "18",
56293
+ scaleDenominator: 2132.72958384978,
56294
+ topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
56295
+ tileWidth: 256,
56296
+ tileHeight: 256,
56297
+ matrixWidth: 262144,
56298
+ matrixHeight: 262144
56299
+ },
56300
+ {
56301
+ type: "TileMatrixType",
56302
+ identifier: "19",
56303
+ scaleDenominator: 1066.36479192489,
56304
+ topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
56305
+ tileWidth: 256,
56306
+ tileHeight: 256,
56307
+ matrixWidth: 524288,
56308
+ matrixHeight: 524288
56309
+ },
56310
+ {
56311
+ type: "TileMatrixType",
56312
+ identifier: "20",
56313
+ scaleDenominator: 533.182395962445,
56314
+ topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
56315
+ tileWidth: 256,
56316
+ tileHeight: 256,
56317
+ matrixWidth: 1048576,
56318
+ matrixHeight: 1048576
56319
+ },
56320
+ {
56321
+ type: "TileMatrixType",
56322
+ identifier: "21",
56323
+ scaleDenominator: 266.591197981222,
56324
+ topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
56325
+ tileWidth: 256,
56326
+ tileHeight: 256,
56327
+ matrixWidth: 2097152,
56328
+ matrixHeight: 2097152
56329
+ },
56330
+ {
56331
+ type: "TileMatrixType",
56332
+ identifier: "22",
56333
+ scaleDenominator: 133.295598990611,
56334
+ topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
56335
+ tileWidth: 256,
56336
+ tileHeight: 256,
56337
+ matrixWidth: 4194304,
56338
+ matrixHeight: 4194304
56339
+ },
56340
+ {
56341
+ type: "TileMatrixType",
56342
+ identifier: "23",
56343
+ scaleDenominator: 66.6477994953056,
56344
+ topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
56345
+ tileWidth: 256,
56346
+ tileHeight: 256,
56347
+ matrixWidth: 8388608,
56348
+ matrixHeight: 8388608
56349
+ },
56350
+ {
56351
+ type: "TileMatrixType",
56352
+ identifier: "24",
56353
+ scaleDenominator: 33.3238997476528,
56354
+ topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
56355
+ tileWidth: 256,
56356
+ tileHeight: 256,
56357
+ matrixWidth: 16777216,
56358
+ matrixHeight: 16777216
56321
56359
  }
56322
- ],
56323
- $generated: {
56324
- package: "@basemaps/cli",
56325
- version: "v7.14.0-4-g2766010d",
56326
- hash: "2766010d8d2bb8b673f6bcbef2fe2636f2e0f4ea",
56327
- createdAt: "2025-02-10T20:34:46.643Z"
56328
- },
56329
- $options: {
56330
- sourceTileMatrix: "WebMercatorQuad",
56331
- zoomOffset: 8
56360
+ ]
56361
+ };
56362
+ var GoogleTms = new TileMatrixSet(GoogleTmst);
56363
+
56364
+ // ../geo/build/location.transform.js
56365
+ function isGoogle(tms) {
56366
+ return tms.identifier === GoogleTms.identifier;
56367
+ }
56368
+ function locationTransform(location2, tileMatrix, targetTileMatrix) {
56369
+ if (tileMatrix.identifier === targetTileMatrix.identifier)
56370
+ return location2;
56371
+ if (!isGoogle(tileMatrix) && !isGoogle(targetTileMatrix)) {
56372
+ throw new Error("Either tileMatrix or targetTileMatrix must be GoogleTms");
56373
+ }
56374
+ const coords = Projection2.get(tileMatrix).fromWgs84([location2.lon, location2.lat]);
56375
+ const point = tileMatrix.sourceToPixels(coords[0], coords[1], Math.round(location2.zoom));
56376
+ const tile = { x: point.x / tileMatrix.tileSize, y: point.y / tileMatrix.tileSize, z: Math.round(location2.zoom) };
56377
+ const source = targetTileMatrix.tileToSource(tile);
56378
+ const lonLat = Projection2.get(targetTileMatrix).toWgs84([source.x, source.y]);
56379
+ return { lon: Math.round(lonLat[0] * 1e8) / 1e8, lat: Math.round(lonLat[1] * 1e8) / 1e8, zoom: location2.zoom };
56380
+ }
56381
+ function projectGeoJson(g, targetTileMatrix) {
56382
+ if (g.type === "FeatureCollection") {
56383
+ for (const f of g.features) {
56384
+ projectFeature(f, targetTileMatrix);
56385
+ }
56386
+ } else if (g.type === "Feature") {
56387
+ projectFeature(g, targetTileMatrix);
56388
+ }
56389
+ }
56390
+ function projectFeature(f, targetTileMatrix) {
56391
+ if (f.geometry.type === "Polygon") {
56392
+ for (const poly of f.geometry.coordinates) {
56393
+ for (const coord of poly) {
56394
+ const output = locationTransform({ lat: coord[1], lon: coord[0], zoom: targetTileMatrix.maxZoom }, targetTileMatrix, GoogleTms);
56395
+ coord[0] = output.lon;
56396
+ coord[1] = output.lat;
56397
+ }
56398
+ }
56399
+ } else if (f.geometry.type === "MultiPolygon") {
56400
+ for (const multiPoly of f.geometry.coordinates) {
56401
+ for (const poly of multiPoly) {
56402
+ for (const coord of poly) {
56403
+ const output = locationTransform({ lat: coord[1], lon: coord[0], zoom: targetTileMatrix.maxZoom }, targetTileMatrix, GoogleTms);
56404
+ coord[0] = output.lon;
56405
+ coord[1] = output.lat;
56406
+ }
56407
+ }
56408
+ }
56409
+ } else if (f.geometry.type === "Point") {
56410
+ const coord = f.geometry.coordinates;
56411
+ const output = locationTransform({ lat: coord[1], lon: coord[0], zoom: targetTileMatrix.maxZoom }, targetTileMatrix, GoogleTms);
56412
+ coord[0] = output.lon;
56413
+ coord[1] = output.lat;
56414
+ } else if (f.geometry.type === "MultiLineString") {
56415
+ for (const line2 of f.geometry.coordinates) {
56416
+ for (const coord of line2) {
56417
+ const output = locationTransform({ lat: coord[1], lon: coord[0], zoom: targetTileMatrix.maxZoom }, targetTileMatrix, GoogleTms);
56418
+ coord[0] = output.lon;
56419
+ coord[1] = output.lat;
56420
+ }
56421
+ }
56422
+ } else if (f.geometry.type === "LineString") {
56423
+ for (const coord of f.geometry.coordinates) {
56424
+ const output = locationTransform({ lat: coord[1], lon: coord[0], zoom: targetTileMatrix.maxZoom }, targetTileMatrix, GoogleTms);
56425
+ coord[0] = output.lon;
56426
+ coord[1] = output.lat;
56427
+ }
56428
+ } else {
56429
+ throw new Error(`Geometry feature type: ${f.geometry.type} not supported`);
56430
+ }
56431
+ }
56432
+
56433
+ // ../geo/build/proj/projection.loader.js
56434
+ var ProjectionLoader = class {
56435
+ /**
56436
+ * Ensure that a projection EPSG code is avialable for use in Proj4js
56437
+ *
56438
+ * If its not already loaded, lookup definition from spatialreference.org
56439
+ * @param code
56440
+ */
56441
+ static async load(code) {
56442
+ if (Projection2.tryGet(code) != null)
56443
+ return Epsg.get(code);
56444
+ const url = `https://spatialreference.org/ref/epsg/${code}/ogcwkt/`;
56445
+ const res = await this._fetch(url);
56446
+ if (!res.ok)
56447
+ throw new Error("Failed to load projection information for:" + code);
56448
+ let epsg = Epsg.tryGet(code);
56449
+ if (epsg == null)
56450
+ epsg = new Epsg(code);
56451
+ const text = await res.text();
56452
+ Projection2.define(epsg, text);
56453
+ return epsg;
56332
56454
  }
56333
56455
  };
56334
- var Citm2000Tms = new TileMatrixSet(Citm2000Tmst);
56456
+ Object.defineProperty(ProjectionLoader, "_fetch", {
56457
+ enumerable: true,
56458
+ configurable: true,
56459
+ writable: true,
56460
+ value: fetch
56461
+ });
56335
56462
 
56336
- // ../geo/build/tms/google.js
56337
- var GoogleTmst = {
56463
+ // ../geo/build/proj/tile.set.name.js
56464
+ var TileSetName;
56465
+ (function(TileSetName2) {
56466
+ TileSetName2["aerial"] = "aerial";
56467
+ })(TileSetName || (TileSetName = {}));
56468
+
56469
+ // ../geo/build/quad.key.js
56470
+ var CHAR_0 = "0".charCodeAt(0);
56471
+ var CHAR_1 = "1".charCodeAt(0);
56472
+ var CHAR_2 = "2".charCodeAt(0);
56473
+ var CHAR_3 = "3".charCodeAt(0);
56474
+
56475
+ // ../geo/build/tms/citm2000.js
56476
+ var Citm2000Tmst = {
56338
56477
  type: "TileMatrixSetType",
56339
- title: "Google Maps Compatible for the World",
56340
- identifier: "WebMercatorQuad",
56478
+ title: "Debug tile matrix for EPSG:3793",
56479
+ abstract: "",
56480
+ identifier: "CITM2000Quad",
56481
+ supportedCRS: "https://www.opengis.net/def/crs/EPSG/0/3793",
56341
56482
  boundingBox: {
56342
56483
  type: "BoundingBoxType",
56343
- crs: "http://www.opengis.net/def/crs/EPSG/0/3857",
56344
- lowerCorner: [-200375083427892e-7, -200375083427892e-7],
56345
- upperCorner: [200375083427892e-7, 200375083427892e-7]
56484
+ crs: "https://www.opengis.net/def/crs/EPSG/0/3793",
56485
+ lowerCorner: [5051234111622438e-9, 3.4301543757978342e6],
56486
+ upperCorner: [5207777145550478e-9, 3.5866974097258747e6]
56346
56487
  },
56347
- supportedCRS: "https://www.opengis.net/def/crs/EPSG/0/3857",
56348
- wellKnownScaleSet: "https://www.opengis.net/def/wkss/OGC/1.0/GoogleMapsCompatible",
56349
56488
  tileMatrix: [
56350
56489
  {
56351
56490
  type: "TileMatrixType",
56352
56491
  identifier: "0",
56353
- scaleDenominator: 559082264028717e-6,
56354
- topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
56492
+ scaleDenominator: 218391509386217e-8,
56493
+ topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
56355
56494
  tileWidth: 256,
56356
56495
  tileHeight: 256,
56357
56496
  matrixWidth: 1,
@@ -56360,8 +56499,8 @@ var GoogleTmst = {
56360
56499
  {
56361
56500
  type: "TileMatrixType",
56362
56501
  identifier: "1",
56363
- scaleDenominator: 279541132014358e-6,
56364
- topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
56502
+ scaleDenominator: 109195754693108e-8,
56503
+ topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
56365
56504
  tileWidth: 256,
56366
56505
  tileHeight: 256,
56367
56506
  matrixWidth: 2,
@@ -56370,8 +56509,8 @@ var GoogleTmst = {
56370
56509
  {
56371
56510
  type: "TileMatrixType",
56372
56511
  identifier: "2",
56373
- scaleDenominator: 139770566007179e-6,
56374
- topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
56512
+ scaleDenominator: 545978.773465544,
56513
+ topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
56375
56514
  tileWidth: 256,
56376
56515
  tileHeight: 256,
56377
56516
  matrixWidth: 4,
@@ -56380,8 +56519,8 @@ var GoogleTmst = {
56380
56519
  {
56381
56520
  type: "TileMatrixType",
56382
56521
  identifier: "3",
56383
- scaleDenominator: 698852830035897e-7,
56384
- topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
56522
+ scaleDenominator: 272989.386732772,
56523
+ topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
56385
56524
  tileWidth: 256,
56386
56525
  tileHeight: 256,
56387
56526
  matrixWidth: 8,
@@ -56390,8 +56529,8 @@ var GoogleTmst = {
56390
56529
  {
56391
56530
  type: "TileMatrixType",
56392
56531
  identifier: "4",
56393
- scaleDenominator: 349426415017948e-7,
56394
- topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
56532
+ scaleDenominator: 136494.693366386,
56533
+ topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
56395
56534
  tileWidth: 256,
56396
56535
  tileHeight: 256,
56397
56536
  matrixWidth: 16,
@@ -56400,8 +56539,8 @@ var GoogleTmst = {
56400
56539
  {
56401
56540
  type: "TileMatrixType",
56402
56541
  identifier: "5",
56403
- scaleDenominator: 174713207508974e-7,
56404
- topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
56542
+ scaleDenominator: 68247.346683193,
56543
+ topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
56405
56544
  tileWidth: 256,
56406
56545
  tileHeight: 256,
56407
56546
  matrixWidth: 32,
@@ -56410,8 +56549,8 @@ var GoogleTmst = {
56410
56549
  {
56411
56550
  type: "TileMatrixType",
56412
56551
  identifier: "6",
56413
- scaleDenominator: 873566037544871e-8,
56414
- topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
56552
+ scaleDenominator: 34123.6733415964,
56553
+ topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
56415
56554
  tileWidth: 256,
56416
56555
  tileHeight: 256,
56417
56556
  matrixWidth: 64,
@@ -56420,8 +56559,8 @@ var GoogleTmst = {
56420
56559
  {
56421
56560
  type: "TileMatrixType",
56422
56561
  identifier: "7",
56423
- scaleDenominator: 436783018772435e-8,
56424
- topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
56562
+ scaleDenominator: 17061.8366707982,
56563
+ topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
56425
56564
  tileWidth: 256,
56426
56565
  tileHeight: 256,
56427
56566
  matrixWidth: 128,
@@ -56430,8 +56569,8 @@ var GoogleTmst = {
56430
56569
  {
56431
56570
  type: "TileMatrixType",
56432
56571
  identifier: "8",
56433
- scaleDenominator: 218391509386217e-8,
56434
- topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
56572
+ scaleDenominator: 8530.91833539913,
56573
+ topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
56435
56574
  tileWidth: 256,
56436
56575
  tileHeight: 256,
56437
56576
  matrixWidth: 256,
@@ -56440,8 +56579,8 @@ var GoogleTmst = {
56440
56579
  {
56441
56580
  type: "TileMatrixType",
56442
56581
  identifier: "9",
56443
- scaleDenominator: 109195754693108e-8,
56444
- topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
56582
+ scaleDenominator: 4265.45916769956,
56583
+ topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
56445
56584
  tileWidth: 256,
56446
56585
  tileHeight: 256,
56447
56586
  matrixWidth: 512,
@@ -56450,8 +56589,8 @@ var GoogleTmst = {
56450
56589
  {
56451
56590
  type: "TileMatrixType",
56452
56591
  identifier: "10",
56453
- scaleDenominator: 545978.773465544,
56454
- topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
56592
+ scaleDenominator: 2132.72958384978,
56593
+ topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
56455
56594
  tileWidth: 256,
56456
56595
  tileHeight: 256,
56457
56596
  matrixWidth: 1024,
@@ -56460,8 +56599,8 @@ var GoogleTmst = {
56460
56599
  {
56461
56600
  type: "TileMatrixType",
56462
56601
  identifier: "11",
56463
- scaleDenominator: 272989.386732772,
56464
- topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
56602
+ scaleDenominator: 1066.36479192489,
56603
+ topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
56465
56604
  tileWidth: 256,
56466
56605
  tileHeight: 256,
56467
56606
  matrixWidth: 2048,
@@ -56470,8 +56609,8 @@ var GoogleTmst = {
56470
56609
  {
56471
56610
  type: "TileMatrixType",
56472
56611
  identifier: "12",
56473
- scaleDenominator: 136494.693366386,
56474
- topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
56612
+ scaleDenominator: 533.182395962445,
56613
+ topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
56475
56614
  tileWidth: 256,
56476
56615
  tileHeight: 256,
56477
56616
  matrixWidth: 4096,
@@ -56480,8 +56619,8 @@ var GoogleTmst = {
56480
56619
  {
56481
56620
  type: "TileMatrixType",
56482
56621
  identifier: "13",
56483
- scaleDenominator: 68247.346683193,
56484
- topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
56622
+ scaleDenominator: 266.591197981222,
56623
+ topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
56485
56624
  tileWidth: 256,
56486
56625
  tileHeight: 256,
56487
56626
  matrixWidth: 8192,
@@ -56490,8 +56629,8 @@ var GoogleTmst = {
56490
56629
  {
56491
56630
  type: "TileMatrixType",
56492
56631
  identifier: "14",
56493
- scaleDenominator: 34123.6733415964,
56494
- topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
56632
+ scaleDenominator: 133.295598990611,
56633
+ topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
56495
56634
  tileWidth: 256,
56496
56635
  tileHeight: 256,
56497
56636
  matrixWidth: 16384,
@@ -56500,8 +56639,8 @@ var GoogleTmst = {
56500
56639
  {
56501
56640
  type: "TileMatrixType",
56502
56641
  identifier: "15",
56503
- scaleDenominator: 17061.8366707982,
56504
- topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
56642
+ scaleDenominator: 66.6477994953056,
56643
+ topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
56505
56644
  tileWidth: 256,
56506
56645
  tileHeight: 256,
56507
56646
  matrixWidth: 32768,
@@ -56510,96 +56649,26 @@ var GoogleTmst = {
56510
56649
  {
56511
56650
  type: "TileMatrixType",
56512
56651
  identifier: "16",
56513
- scaleDenominator: 8530.91833539913,
56514
- topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
56652
+ scaleDenominator: 33.3238997476528,
56653
+ topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
56515
56654
  tileWidth: 256,
56516
56655
  tileHeight: 256,
56517
56656
  matrixWidth: 65536,
56518
56657
  matrixHeight: 65536
56519
- },
56520
- {
56521
- type: "TileMatrixType",
56522
- identifier: "17",
56523
- scaleDenominator: 4265.45916769956,
56524
- topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
56525
- tileWidth: 256,
56526
- tileHeight: 256,
56527
- matrixWidth: 131072,
56528
- matrixHeight: 131072
56529
- },
56530
- {
56531
- type: "TileMatrixType",
56532
- identifier: "18",
56533
- scaleDenominator: 2132.72958384978,
56534
- topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
56535
- tileWidth: 256,
56536
- tileHeight: 256,
56537
- matrixWidth: 262144,
56538
- matrixHeight: 262144
56539
- },
56540
- {
56541
- type: "TileMatrixType",
56542
- identifier: "19",
56543
- scaleDenominator: 1066.36479192489,
56544
- topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
56545
- tileWidth: 256,
56546
- tileHeight: 256,
56547
- matrixWidth: 524288,
56548
- matrixHeight: 524288
56549
- },
56550
- {
56551
- type: "TileMatrixType",
56552
- identifier: "20",
56553
- scaleDenominator: 533.182395962445,
56554
- topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
56555
- tileWidth: 256,
56556
- tileHeight: 256,
56557
- matrixWidth: 1048576,
56558
- matrixHeight: 1048576
56559
- },
56560
- {
56561
- type: "TileMatrixType",
56562
- identifier: "21",
56563
- scaleDenominator: 266.591197981222,
56564
- topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
56565
- tileWidth: 256,
56566
- tileHeight: 256,
56567
- matrixWidth: 2097152,
56568
- matrixHeight: 2097152
56569
- },
56570
- {
56571
- type: "TileMatrixType",
56572
- identifier: "22",
56573
- scaleDenominator: 133.295598990611,
56574
- topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
56575
- tileWidth: 256,
56576
- tileHeight: 256,
56577
- matrixWidth: 4194304,
56578
- matrixHeight: 4194304
56579
- },
56580
- {
56581
- type: "TileMatrixType",
56582
- identifier: "23",
56583
- scaleDenominator: 66.6477994953056,
56584
- topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
56585
- tileWidth: 256,
56586
- tileHeight: 256,
56587
- matrixWidth: 8388608,
56588
- matrixHeight: 8388608
56589
- },
56590
- {
56591
- type: "TileMatrixType",
56592
- identifier: "24",
56593
- scaleDenominator: 33.3238997476528,
56594
- topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
56595
- tileWidth: 256,
56596
- tileHeight: 256,
56597
- matrixWidth: 16777216,
56598
- matrixHeight: 16777216
56599
56658
  }
56600
- ]
56659
+ ],
56660
+ $generated: {
56661
+ package: "@basemaps/cli",
56662
+ version: "v7.14.0-4-g2766010d",
56663
+ hash: "2766010d8d2bb8b673f6bcbef2fe2636f2e0f4ea",
56664
+ createdAt: "2025-02-10T20:34:46.643Z"
56665
+ },
56666
+ $options: {
56667
+ sourceTileMatrix: "WebMercatorQuad",
56668
+ zoomOffset: 8
56669
+ }
56601
56670
  };
56602
- var GoogleTms = new TileMatrixSet(GoogleTmst);
56671
+ var Citm2000Tms = new TileMatrixSet(Citm2000Tmst);
56603
56672
 
56604
56673
  // ../geo/build/tms/nztm2000.js
56605
56674
  var Nztm20002 = __toESM(require_src(), 1);
@@ -57106,22 +57175,6 @@ function getTileGridStyle(tileMatrixSet, cfg) {
57106
57175
  labels: cfg.labels ?? Config.map.labels
57107
57176
  });
57108
57177
  }
57109
- function isGoogle(tms) {
57110
- return tms.identifier === GoogleTms.identifier;
57111
- }
57112
- function locationTransform(location2, tileMatrix, targetTileMatrix) {
57113
- if (tileMatrix.identifier === targetTileMatrix.identifier)
57114
- return location2;
57115
- if (!isGoogle(tileMatrix) && !isGoogle(targetTileMatrix)) {
57116
- throw new Error("Either tileMatrix or targetTileMatrix must be GoogleTms");
57117
- }
57118
- const coords = Projection2.get(tileMatrix).fromWgs84([location2.lon, location2.lat]);
57119
- const point = tileMatrix.sourceToPixels(coords[0], coords[1], Math.round(location2.zoom));
57120
- const tile = { x: point.x / tileMatrix.tileSize, y: point.y / tileMatrix.tileSize, z: Math.round(location2.zoom) };
57121
- const source = targetTileMatrix.tileToSource(tile);
57122
- const lonLat = Projection2.get(targetTileMatrix).toWgs84([source.x, source.y]);
57123
- return { lon: Math.round(lonLat[0] * 1e8) / 1e8, lat: Math.round(lonLat[1] * 1e8) / 1e8, zoom: location2.zoom };
57124
- }
57125
57178
  function mapToBoundingBox(map, zoom, tileMatrix) {
57126
57179
  const bounds = map.getBounds();
57127
57180
  const swLocation = { lon: bounds.getWest(), lat: bounds.getSouth(), zoom };
@@ -57136,46 +57189,6 @@ function mapToBoundingBox(map, zoom, tileMatrix) {
57136
57189
  ];
57137
57190
  return bbox;
57138
57191
  }
57139
- function projectGeoJson(g, targetTileMatrix) {
57140
- if (g.type === "FeatureCollection") {
57141
- for (const f of g.features) {
57142
- projectFeature(f, targetTileMatrix);
57143
- }
57144
- } else if (g.type === "Feature") {
57145
- projectFeature(g, targetTileMatrix);
57146
- }
57147
- }
57148
- function projectFeature(f, targetTileMatrix) {
57149
- if (f.geometry.type === "Polygon") {
57150
- for (const poly of f.geometry.coordinates) {
57151
- for (const coord of poly) {
57152
- const output = locationTransform(
57153
- { lat: coord[1], lon: coord[0], zoom: targetTileMatrix.maxZoom },
57154
- targetTileMatrix,
57155
- GoogleTms
57156
- );
57157
- coord[0] = output.lon;
57158
- coord[1] = output.lat;
57159
- }
57160
- }
57161
- } else if (f.geometry.type === "MultiPolygon") {
57162
- for (const multiPoly of f.geometry.coordinates) {
57163
- for (const poly of multiPoly) {
57164
- for (const coord of poly) {
57165
- const output = locationTransform(
57166
- { lat: coord[1], lon: coord[0], zoom: targetTileMatrix.maxZoom },
57167
- targetTileMatrix,
57168
- GoogleTms
57169
- );
57170
- coord[0] = output.lon;
57171
- coord[1] = output.lat;
57172
- }
57173
- }
57174
- }
57175
- } else {
57176
- throw new Error(`Geometry feature type: ${f.geometry.type} not supported`);
57177
- }
57178
- }
57179
57192
 
57180
57193
  // src/config.map.ts
57181
57194
  var DefaultCenter = {
@@ -57236,7 +57249,7 @@ var MapConfig = class _MapConfig extends import_events.Emitter {
57236
57249
  return this.transformLocation(this.location.lat, this.location.lon, this.location.zoom);
57237
57250
  }
57238
57251
  get isVector() {
57239
- return this.layerId === "topographic";
57252
+ return this.layerId.startsWith("topographic");
57240
57253
  }
57241
57254
  /** Key to reference the combined layer & style */
57242
57255
  get layerKey() {
@@ -57279,8 +57292,8 @@ var MapConfig = class _MapConfig extends import_events.Emitter {
57279
57292
  } else {
57280
57293
  this.labels = labels !== "false";
57281
57294
  }
57282
- if (this.layerId === "topographic" && this.style == null)
57283
- this.style = "topographic";
57295
+ if (this.layerId.startsWith("topographic") && this.style == null)
57296
+ this.style = this.layerId;
57284
57297
  this.emit("tileMatrix", this.tileMatrix);
57285
57298
  this.emit("layer", this.layerId, this.style, this.pipeline, this.imageFormat);
57286
57299
  if (previousUrl !== _MapConfig.toUrl(this))
@@ -57536,11 +57549,11 @@ var Config = {
57536
57549
  return "";
57537
57550
  },
57538
57551
  get Version() {
57539
- return "v8.1.0-6-g69195be6";
57552
+ return "v8.2.0-8-gfe8bbf9d";
57540
57553
  },
57541
57554
  /** Github buildId */
57542
57555
  get BuildId() {
57543
- return "15601557572-1";
57556
+ return "15719849199-1";
57544
57557
  },
57545
57558
  map: new MapConfig()
57546
57559
  };
@@ -64081,7 +64094,7 @@ var DebugMap = class {
64081
64094
  return;
64082
64095
  }
64083
64096
  const layers = styleJson.layers?.filter((f) => f.type !== "background" && f.source === "LINZ Basemaps") ?? [];
64084
- if (Config.map.layerId === "topographic")
64097
+ if (Config.map.isVector)
64085
64098
  return;
64086
64099
  for (const layer of layers) {
64087
64100
  const paint = layer.paint ?? {};
@@ -65554,40 +65567,65 @@ Your Service/App URL:
65554
65567
  validProjections() {
65555
65568
  if (this.state?.layers == null)
65556
65569
  return this._validProjections;
65557
- return this.state.layers.get(Config.map.layerId)?.projections ?? this._validProjections;
65558
- }
65559
- renderLinksTiles() {
65560
65570
  if (Config.map.isVector) {
65561
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_react16.Fragment, { children: [
65562
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Copyable, { header: "StyleJSON", value: Config.map.toTileUrl("style" /* Style */) }, "StyleJSON"),
65563
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Copyable, { header: "XYZ", value: Config.map.toTileUrl("vector-xyz" /* TileVectorXyz */) }, "XYZ")
65564
- ] });
65571
+ return this.state.layers.get(`${Config.map.layerId}::${Config.map.style}`)?.projections ?? this._validProjections;
65572
+ } else {
65573
+ return this.state.layers.get(Config.map.layerId)?.projections ?? this._validProjections;
65565
65574
  }
65575
+ }
65576
+ renderLinksTiles() {
65566
65577
  const projections = this.validProjections();
65567
65578
  const children = [];
65568
65579
  if (projections.has(EpsgCode.Nztm2000)) {
65569
- const nztmTileUrl = Config.map.toTileUrl(
65570
- "wmts" /* Wmts */,
65571
- Nztm2000QuadTms,
65572
- void 0,
65573
- void 0,
65574
- void 0,
65575
- Config.map.filter.date
65576
- );
65577
- children.push(/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Copyable, { header: "WMTS: NZTM2000Quad", value: nztmTileUrl }, "NZTM2000Quad"));
65580
+ if (Config.map.isVector) {
65581
+ children.push(
65582
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
65583
+ Copyable,
65584
+ {
65585
+ header: "StyleJSON: NZTM2000Quad",
65586
+ value: Config.map.toTileUrl("style" /* Style */, Nztm2000QuadTms)
65587
+ },
65588
+ "StyleJSON-NZTM2000Quad"
65589
+ )
65590
+ );
65591
+ } else {
65592
+ children.push(
65593
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
65594
+ Copyable,
65595
+ {
65596
+ header: "WMTS: NZTM2000Quad",
65597
+ value: Config.map.toTileUrl("wmts" /* Wmts */, Nztm2000QuadTms)
65598
+ },
65599
+ "NZTM2000Quad"
65600
+ )
65601
+ );
65602
+ }
65578
65603
  }
65579
65604
  if (projections.has(EpsgCode.Google)) {
65580
- const googleTileUrl = Config.map.toTileUrl(
65581
- "wmts" /* Wmts */,
65582
- GoogleTms,
65583
- void 0,
65584
- void 0,
65585
- void 0,
65586
- Config.map.filter.date
65587
- );
65588
- const googleXyzTileUrl = Config.map.toTileUrl("raster" /* TileRaster */, GoogleTms);
65589
- children.push(/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Copyable, { header: "WMTS: WebMercatorQuad", value: googleTileUrl }, "WebMercatorQuad"));
65590
- children.push(/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Copyable, { header: "XYZ", value: googleXyzTileUrl }, "XYZ"));
65605
+ if (Config.map.isVector) {
65606
+ children.push(
65607
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
65608
+ Copyable,
65609
+ {
65610
+ header: "StyleJSON: WebMercatorQuad",
65611
+ value: Config.map.toTileUrl("style" /* Style */)
65612
+ },
65613
+ "StyleJSON-WebMercatorQuad"
65614
+ )
65615
+ );
65616
+ } else {
65617
+ children.push(
65618
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
65619
+ Copyable,
65620
+ {
65621
+ header: "WMTS: WebMercatorQuad",
65622
+ value: Config.map.toTileUrl("wmts" /* Wmts */)
65623
+ },
65624
+ "WebMercatorQuad"
65625
+ )
65626
+ );
65627
+ children.push(/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Copyable, { header: "XYZ", value: Config.map.toTileUrl("raster" /* TileRaster */) }, "XYZ"));
65628
+ }
65591
65629
  }
65592
65630
  return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react16.Fragment, { children });
65593
65631
  }