Merge pull request #13565 from mike-000/null-projection
Do not assert null projection
This commit is contained in:
@@ -54,7 +54,7 @@ class Source extends BaseObject {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @protected
|
* @protected
|
||||||
* @type {import("../proj/Projection.js").default}
|
* @type {import("../proj/Projection.js").default|null}
|
||||||
*/
|
*/
|
||||||
this.projection = getProjection(options.projection);
|
this.projection = getProjection(options.projection);
|
||||||
|
|
||||||
@@ -141,7 +141,7 @@ class Source extends BaseObject {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the projection of the source.
|
* Get the projection of the source.
|
||||||
* @return {import("../proj/Projection.js").default} Projection.
|
* @return {import("../proj/Projection.js").default|null} Projection.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
getProjection() {
|
getProjection() {
|
||||||
|
|||||||
@@ -281,8 +281,9 @@ class TileSource extends Source {
|
|||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
getTileCacheForProjection(projection) {
|
getTileCacheForProjection(projection) {
|
||||||
|
const sourceProjection = this.getProjection();
|
||||||
assert(
|
assert(
|
||||||
equivalent(this.getProjection(), projection),
|
sourceProjection === null || equivalent(sourceProjection, projection),
|
||||||
68 // A VectorTile source can only be rendered if it has a projection compatible with the view projection.
|
68 // A VectorTile source can only be rendered if it has a projection compatible with the view projection.
|
||||||
);
|
);
|
||||||
return this.tileCache;
|
return this.tileCache;
|
||||||
|
|||||||
Reference in New Issue
Block a user