Sources may be configured with a projection, tile grids with an extent

An XYZ tile grid is constructed with an extent defining the bounds of the tile grid.
This commit is contained in:
Tim Schaub
2014-08-18 23:26:36 -06:00
parent e97f79b4ab
commit ee487ca308
5 changed files with 25 additions and 22 deletions
+2 -3
View File
@@ -17,13 +17,12 @@ goog.require('ol.tilegrid.XYZ');
* @api
*/
ol.source.XYZ = function(options) {
var projection = goog.isDef(options.projection) ?
options.projection : 'EPSG:3857';
var tileGrid = new ol.tilegrid.XYZ({
maxZoom: options.maxZoom,
projection: options.projection
extent: ol.tilegrid.extentFromProjection(projection),
maxZoom: options.maxZoom
});
goog.base(this, {