Skip to content

Commit 33d6444

Browse files
committed
Website updates
1 parent ec49bab commit 33d6444

File tree

7 files changed

+46
-9
lines changed

7 files changed

+46
-9
lines changed

dist/en/main/examples/common.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/en/main/examples/common.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/en/main/ol/dist/ol.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/en/main/ol/dist/ol.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/en/main/ol/source/ogcTileUtil.d.ts

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ export type TileMatrixSet = {
147147
/**
148148
* The coordinate reference system.
149149
*/
150-
crs: string;
150+
crs: string | CrsUri | CrsWkt | CrsReferenceSystem;
151151
/**
152152
* Axis order.
153153
*/
@@ -157,6 +157,24 @@ export type TileMatrixSet = {
157157
*/
158158
tileMatrices: Array<TileMatrix>;
159159
};
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+
};
160178
export type TileMatrix = {
161179
/**
162180
* The tile matrix identifier.

dist/en/main/ol/source/ogcTileUtil.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/en/main/ol/source/ogcTileUtil.js

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,26 @@ import {error as logError} from '../console.js';
4848
/**
4949
* @typedef {Object} TileMatrixSet
5050
* @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.
5252
* @property {Array<string>} [orderedAxes] Axis order.
5353
* @property {Array<TileMatrix>} tileMatrices Array of tile matrices.
5454
*/
5555

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+
5671
/**
5772
* @typedef {Object} TileMatrix
5873
* @property {string} id The tile matrix identifier.
@@ -249,9 +264,13 @@ function parseTileMatrixSet(
249264
) {
250265
let projection = sourceInfo.projection;
251266
if (!projection) {
252-
projection = getProjection(tileMatrixSet.crs);
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+
}
253272
if (!projection) {
254-
throw new Error(`Unsupported CRS: ${tileMatrixSet.crs}`);
273+
throw new Error(`Unsupported CRS: ${JSON.stringify(tileMatrixSet.crs)}`);
255274
}
256275
}
257276
const orderedAxes = tileMatrixSet.orderedAxes;

0 commit comments

Comments
 (0)