ol 10.2.2-dev.1728930633144 → 10.2.2-dev.1728966372347
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/ol.js +1 -1
- package/dist/ol.js.map +1 -1
- package/package.json +1 -1
- package/source/ogcTileUtil.d.ts +19 -1
- package/source/ogcTileUtil.d.ts.map +1 -1
- package/source/ogcTileUtil.js +22 -3
- package/util.js +1 -1
package/package.json
CHANGED
package/source/ogcTileUtil.d.ts
CHANGED
|
@@ -147,7 +147,7 @@ export type TileMatrixSet = {
|
|
|
147
147
|
/**
|
|
148
148
|
* The coordinate reference system.
|
|
149
149
|
*/
|
|
150
|
-
crs: string;
|
|
150
|
+
crs: string | CrsUri | CrsWkt | CrsReferenceSystem;
|
|
151
151
|
/**
|
|
152
152
|
* Axis order.
|
|
153
153
|
*/
|
|
@@ -157,6 +157,24 @@ export type TileMatrixSet = {
|
|
|
157
157
|
*/
|
|
158
158
|
tileMatrices: Array<TileMatrix>;
|
|
159
159
|
};
|
|
160
|
+
export type CrsUri = {
|
|
161
|
+
/**
|
|
162
|
+
* Reference to one coordinate reference system (CRS).
|
|
163
|
+
*/
|
|
164
|
+
uri: string;
|
|
165
|
+
};
|
|
166
|
+
export type CrsWkt = {
|
|
167
|
+
/**
|
|
168
|
+
* JSON encoding for WKT representation of CRS 2.0.
|
|
169
|
+
*/
|
|
170
|
+
wkt: any;
|
|
171
|
+
};
|
|
172
|
+
export type CrsReferenceSystem = {
|
|
173
|
+
/**
|
|
174
|
+
* Data structure as defined in the MD_ReferenceSystem of the ISO 19115.
|
|
175
|
+
*/
|
|
176
|
+
referenceSystem: any;
|
|
177
|
+
};
|
|
160
178
|
export type TileMatrix = {
|
|
161
179
|
/**
|
|
162
180
|
* The tile matrix identifier.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ogcTileUtil.d.ts","sourceRoot":"","sources":["ogcTileUtil.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ogcTileUtil.d.ts","sourceRoot":"","sources":["ogcTileUtil.js"],"names":[],"mappings":"AAoGA;;;;;GAKG;AAEH;;;;;;;;GAQG;AAEH;;;;GAIG;AACH,6DAJW,MAAM,eACN,KAAK,CAAC,MAAM,CAAC,GACZ,MAAM,CA6BjB;AAED;;;;;GAKG;AACH,6CALW,KAAK,CAAC,IAAI,CAAC,uEAGV,MAAM,CAiCjB;AAED;;;;;;GAMG;AACH,gDANW,KAAK,CAAC,IAAI,CAAC,mHAIV,MAAM,CAsDjB;AAiOD;;;GAGG;AACH,2CAHW,UAAU,GACT,OAAO,CAAC,WAAW,CAAC,CAM/B;;;;;iBA5Xa,MAAM;;;;UACN,OAAO,yBAAyB,EAAE,OAAO;;;;iBACzC,OAAO,YAAY,EAAE,WAAW;;;;;;SAKhC,MAAM;;;;eACN,MAAM;;;;;;;;gBAEN,OAAO,uBAAuB,EAAE,OAAO;;;;;;;;;;uBAjGxC,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"}
|
package/source/ogcTileUtil.js
CHANGED
|
@@ -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.
|
|
@@ -249,9 +264,13 @@ function parseTileMatrixSet(
|
|
|
249
264
|
) {
|
|
250
265
|
let projection = sourceInfo.projection;
|
|
251
266
|
if (!projection) {
|
|
252
|
-
|
|
267
|
+
if (typeof tileMatrixSet.crs === 'string') {
|
|
268
|
+
projection = getProjection(tileMatrixSet.crs);
|
|
269
|
+
} else if ('uri' in tileMatrixSet.crs) {
|
|
270
|
+
projection = getProjection(tileMatrixSet.crs.uri);
|
|
271
|
+
}
|
|
253
272
|
if (!projection) {
|
|
254
|
-
throw new Error(`Unsupported CRS: ${tileMatrixSet.crs}`);
|
|
273
|
+
throw new Error(`Unsupported CRS: ${JSON.stringify(tileMatrixSet.crs)}`);
|
|
255
274
|
}
|
|
256
275
|
}
|
|
257
276
|
const orderedAxes = tileMatrixSet.orderedAxes;
|
package/util.js
CHANGED