Tidy up setting of default projection
This commit is contained in:
@@ -3,7 +3,6 @@ goog.provide('ol.source.XYZ');
|
|||||||
goog.require('ol.Attribution');
|
goog.require('ol.Attribution');
|
||||||
goog.require('ol.TileUrlFunction');
|
goog.require('ol.TileUrlFunction');
|
||||||
goog.require('ol.TileUrlFunctionType');
|
goog.require('ol.TileUrlFunctionType');
|
||||||
goog.require('ol.proj');
|
|
||||||
goog.require('ol.source.TileImage');
|
goog.require('ol.source.TileImage');
|
||||||
goog.require('ol.tilegrid.XYZ');
|
goog.require('ol.tilegrid.XYZ');
|
||||||
|
|
||||||
@@ -17,7 +16,8 @@ goog.require('ol.tilegrid.XYZ');
|
|||||||
*/
|
*/
|
||||||
ol.source.XYZ = function(options) {
|
ol.source.XYZ = function(options) {
|
||||||
|
|
||||||
var projection = options.projection || ol.proj.get('EPSG:3857');
|
var projection = goog.isDef(options.projection) ?
|
||||||
|
options.projection : 'EPSG:3857';
|
||||||
|
|
||||||
var maxZoom = goog.isDef(options.maxZoom) ? options.maxZoom : 18;
|
var maxZoom = goog.isDef(options.maxZoom) ? options.maxZoom : 18;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user