Do not warn about coordinates when view projection is configured

This commit is contained in:
Andreas Hocevar
2022-03-10 16:52:49 +01:00
parent 7d9cf83efe
commit 5c7b9124cc
3 changed files with 12 additions and 4 deletions

View File

@@ -401,15 +401,15 @@ class View extends BaseObject {
*/
this.cancelAnchor_ = undefined;
if (options.projection) {
disableCoordinateWarning();
}
if (options.center) {
options.center = fromUserCoordinate(options.center, this.projection_);
}
if (options.extent) {
options.extent = fromUserExtent(options.extent, this.projection_);
}
if (options.projection) {
disableCoordinateWarning();
}
this.applyOptions_(options);
}