Making extent optional for projections

The projection validity extent is used to generate a sensible
set of default resolutions and a sensible default tile grid.
By making it optional, we can still generate defaults - with
zoom levels that are similar to the default web mercator zoom
levels (based on fitting the world on a single tile, even if the
projection is not available for the whole world).
This commit is contained in:
ahocevar
2013-06-17 15:24:37 +02:00
parent d552d27a35
commit 37b369e0d7
4 changed files with 44 additions and 27 deletions
+1 -1
View File
@@ -74,7 +74,7 @@ ol.Projection = function(options) {
* @private
* @type {ol.Extent}
*/
this.extent_ = options.extent;
this.extent_ = goog.isDef(options.extent) ? options.extent : null;
/**
* @private