Ensure we cannot set both origin and origins in the tilegrid

This commit is contained in:
Bruno Binet
2013-03-03 20:32:39 +01:00
parent f7a895a823
commit 7c440d087f
2 changed files with 17 additions and 0 deletions

View File

@@ -58,6 +58,9 @@ ol.tilegrid.TileGrid = function(tileGridOptions) {
this.origins_ = tileGridOptions.origins;
goog.asserts.assert(this.origins_.length == this.resolutions_.length);
}
goog.asserts.assert(
(goog.isNull(this.origin_) && !goog.isNull(this.origins_)) ||
(!goog.isNull(this.origin_) && goog.isNull(this.origins_)));
/**
* @private