ol 10.2.2-dev.1728931292932 → 10.2.2-dev.1729019374816

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ol",
3
- "version": "10.2.2-dev.1728931292932",
3
+ "version": "10.2.2-dev.1729019374816",
4
4
  "description": "OpenLayers mapping library",
5
5
  "keywords": [
6
6
  "map",
@@ -1 +1 @@
1
- {"version":3,"file":"OGCMapTile.d.ts","sourceRoot":"","sources":["OGCMapTile.js"],"names":[],"mappings":";;;;;SASc,MAAM;;;;;;;;;;;;;;;;iBAKN,OAAO,YAAY,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAPjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH;;;;;;;;GAQG;AACH;IACE;;OAEG;IACH,qBAFW,OAAO,EA2BjB;IAED;;;OAGG;IACH,2BAIC;IAED;;;OAGG;IACH,qBAGC;CACF;sBA9FqB,gBAAgB"}
1
+ {"version":3,"file":"OGCMapTile.d.ts","sourceRoot":"","sources":["OGCMapTile.js"],"names":[],"mappings":";;;;;SASc,MAAM;;;;;;;;;;;;;;;;iBAKN,OAAO,YAAY,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAPjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH;;;;;;;;GAQG;AACH;IACE;;OAEG;IACH,qBAFW,OAAO,EA2BjB;IAED;;;OAGG;IACH,2BAKC;IAED;;;OAGG;IACH,qBAGC;CACF;sBA/FqB,gBAAgB"}
@@ -83,6 +83,7 @@ class OGCMapTile extends TileImage {
83
83
  */
84
84
  handleTileSetInfo_(tileSetInfo) {
85
85
  this.tileGrid = tileSetInfo.grid;
86
+ this.projection = tileSetInfo.projection;
86
87
  this.setTileUrlFunction(tileSetInfo.urlFunction, tileSetInfo.urlTemplate);
87
88
  this.setState('ready');
88
89
  }
@@ -1 +1 @@
1
- {"version":3,"file":"OGCVectorTile.d.ts","sourceRoot":"","sources":["OGCVectorTile.js"],"names":[],"mappings":";oBASoD,WAAW,SAAlD,OAAQ,eAAe,EAAE,WAAY;;;;SAEpC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAaN,OAAO,YAAY,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAhBjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH;;;;;;;;;;;;;;GAcG;AACH,4BAHoD,WAAW,SAAlD,OAAQ,eAAe,EAAE,WAAY;IAIhD;;OAEG;IACH,qBAFW,OAAO,CAAC,WAAW,CAAC,EA6B9B;IAED;;;OAGG;IACH,2BAIC;IAED;;;OAGG;IACH,qBAGC;CACF;6BAtG4B,iBAAiB"}
1
+ {"version":3,"file":"OGCVectorTile.d.ts","sourceRoot":"","sources":["OGCVectorTile.js"],"names":[],"mappings":";oBASoD,WAAW,SAAlD,OAAQ,eAAe,EAAE,WAAY;;;;SAEpC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAaN,OAAO,YAAY,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAhBjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH;;;;;;;;;;;;;;GAcG;AACH,4BAHoD,WAAW,SAAlD,OAAQ,eAAe,EAAE,WAAY;IAIhD;;OAEG;IACH,qBAFW,OAAO,CAAC,WAAW,CAAC,EA6B9B;IAED;;;OAGG;IACH,2BAKC;IAED;;;OAGG;IACH,qBAGC;CACF;6BAvG4B,iBAAiB"}
@@ -92,6 +92,7 @@ class OGCVectorTile extends VectorTileSource {
92
92
  */
93
93
  handleTileSetInfo_(tileSetInfo) {
94
94
  this.tileGrid = tileSetInfo.grid;
95
+ this.projection = tileSetInfo.projection;
95
96
  this.setTileUrlFunction(tileSetInfo.urlFunction, tileSetInfo.urlTemplate);
96
97
  this.setState('ready');
97
98
  }
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * @typedef {Object} TileSetInfo
3
3
  * @property {string} urlTemplate The tile URL template.
4
+ * @property {import("../proj/Projection.js").default} projection The source projection.
4
5
  * @property {import("../tilegrid/TileGrid.js").default} grid The tile grid.
5
6
  * @property {import("../Tile.js").UrlFunction} urlFunction The tile URL function.
6
7
  */
@@ -44,6 +45,10 @@ export type TileSetInfo = {
44
45
  * The tile URL template.
45
46
  */
46
47
  urlTemplate: string;
48
+ /**
49
+ * The source projection.
50
+ */
51
+ projection: import("../proj/Projection.js").default;
47
52
  /**
48
53
  * The tile grid.
49
54
  */
@@ -147,7 +152,7 @@ export type TileMatrixSet = {
147
152
  /**
148
153
  * The coordinate reference system.
149
154
  */
150
- crs: string;
155
+ crs: string | CrsUri | CrsWkt | CrsReferenceSystem;
151
156
  /**
152
157
  * Axis order.
153
158
  */
@@ -157,6 +162,24 @@ export type TileMatrixSet = {
157
162
  */
158
163
  tileMatrices: Array<TileMatrix>;
159
164
  };
165
+ export type CrsUri = {
166
+ /**
167
+ * Reference to one coordinate reference system (CRS).
168
+ */
169
+ uri: string;
170
+ };
171
+ export type CrsWkt = {
172
+ /**
173
+ * JSON encoding for WKT representation of CRS 2.0.
174
+ */
175
+ wkt: any;
176
+ };
177
+ export type CrsReferenceSystem = {
178
+ /**
179
+ * Data structure as defined in the MD_ReferenceSystem of the ISO 19115.
180
+ */
181
+ referenceSystem: any;
182
+ };
160
183
  export type TileMatrix = {
161
184
  /**
162
185
  * The tile matrix identifier.
@@ -1 +1 @@
1
- {"version":3,"file":"ogcTileUtil.d.ts","sourceRoot":"","sources":["ogcTileUtil.js"],"names":[],"mappings":"AAqFA;;;;;GAKG;AAEH;;;;;;;;GAQG;AAEH;;;;GAIG;AACH,6DAJW,MAAM,eACN,KAAK,CAAC,MAAM,CAAC,GACZ,MAAM,C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UAAU,GACT,OAAO,CAAC,WAAW,CAAC,CAM/B;;;;;iBA9Xa,MAAM;;;;gBACN,OAAO,uBAAuB,EAAE,OAAO;;;;UACvC,OAAO,yBAAyB,EAAE,OAAO;;;;iBACzC,OAAO,YAAY,EAAE,WAAW;;;;;;SAKhC,MAAM;;;;eACN,MAAM;;;;;;;;gBAEN,OAAO,uBAAuB,EAAE,OAAO;;;;;;;;;;uBAlGxC,KAAK,GAAG,QAAQ;6BAIhB,SAAS,GAAG,YAAY;;;;;cAKvB,QAAQ;;;;;;;;;;;;;;;;WAIR,KAAK,CAAC,IAAI,CAAC;;;;;;SAKX,MAAM;;;;UACN,MAAM;;;;UACN,MAAM;;;;;;gBAKN,MAAM;;;;gBACN,MAAM;;;;gBACN,MAAM;;;;gBACN,MAAM;;;;gBACN,MAAM;;;;;;QAKN,MAAM;;;;SACN,MAAM,GAAC,MAAM,GAAC,MAAM,GAAC,kBAAkB;;;;;;;;kBAEvC,KAAK,CAAC,UAAU,CAAC;;;;;;SAKjB,MAAM;;;;;;;;;;;;;;;;;;QAeN,MAAM;;;;cACN,MAAM;;;;mBACN,KAAK,CAAC,MAAM,CAAC;;;;;;;;iBAEb,MAAM;;;;kBACN,MAAM;;;;eACN,MAAM;;;;gBACN,MAAM"}
@@ -48,11 +48,26 @@ import {error as logError} from '../console.js';
48
48
  /**
49
49
  * @typedef {Object} TileMatrixSet
50
50
  * @property {string} id The tile matrix set identifier.
51
- * @property {string} crs The coordinate reference system.
51
+ * @property {string|CrsUri|CrsWkt|CrsReferenceSystem} crs The coordinate reference system.
52
52
  * @property {Array<string>} [orderedAxes] Axis order.
53
53
  * @property {Array<TileMatrix>} tileMatrices Array of tile matrices.
54
54
  */
55
55
 
56
+ /**
57
+ * @typedef {Object} CrsUri
58
+ * @property {string} uri Reference to one coordinate reference system (CRS).
59
+ */
60
+
61
+ /**
62
+ * @typedef {Object} CrsWkt
63
+ * @property {Object} wkt JSON encoding for WKT representation of CRS 2.0.
64
+ */
65
+
66
+ /**
67
+ * @typedef {Object} CrsReferenceSystem
68
+ * @property {Object} referenceSystem Data structure as defined in the MD_ReferenceSystem of the ISO 19115.
69
+ */
70
+
56
71
  /**
57
72
  * @typedef {Object} TileMatrix
58
73
  * @property {string} id The tile matrix identifier.
@@ -86,6 +101,7 @@ const knownVectorMediaTypes = {
86
101
  /**
87
102
  * @typedef {Object} TileSetInfo
88
103
  * @property {string} urlTemplate The tile URL template.
104
+ * @property {import("../proj/Projection.js").default} projection The source projection.
89
105
  * @property {import("../tilegrid/TileGrid.js").default} grid The tile grid.
90
106
  * @property {import("../Tile.js").UrlFunction} urlFunction The tile URL function.
91
107
  */
@@ -249,9 +265,13 @@ function parseTileMatrixSet(
249
265
  ) {
250
266
  let projection = sourceInfo.projection;
251
267
  if (!projection) {
252
- projection = getProjection(tileMatrixSet.crs);
268
+ if (typeof tileMatrixSet.crs === 'string') {
269
+ projection = getProjection(tileMatrixSet.crs);
270
+ } else if ('uri' in tileMatrixSet.crs) {
271
+ projection = getProjection(tileMatrixSet.crs.uri);
272
+ }
253
273
  if (!projection) {
254
- throw new Error(`Unsupported CRS: ${tileMatrixSet.crs}`);
274
+ throw new Error(`Unsupported CRS: ${JSON.stringify(tileMatrixSet.crs)}`);
255
275
  }
256
276
  }
257
277
  const orderedAxes = tileMatrixSet.orderedAxes;
@@ -390,6 +410,7 @@ function parseTileMatrixSet(
390
410
 
391
411
  return {
392
412
  grid: tileGrid,
413
+ projection: projection,
393
414
  urlTemplate: tileUrlTemplate,
394
415
  urlFunction: tileUrlFunction,
395
416
  };
package/util.js CHANGED
@@ -33,4 +33,4 @@ export function getUid(obj) {
33
33
  * OpenLayers version.
34
34
  * @type {string}
35
35
  */
36
- export const VERSION = '10.2.2-dev.1728931292932';
36
+ export const VERSION = '10.2.2-dev.1729019374816';