Use ol.object.assign() instead of goog.object.extend()
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
goog.provide('ol.tilegrid.TileGrid');
|
||||
|
||||
goog.require('goog.asserts');
|
||||
goog.require('goog.object');
|
||||
goog.require('ol');
|
||||
goog.require('ol.Coordinate');
|
||||
goog.require('ol.TileCoord');
|
||||
@@ -10,6 +9,7 @@ goog.require('ol.array');
|
||||
goog.require('ol.extent');
|
||||
goog.require('ol.extent.Corner');
|
||||
goog.require('ol.math');
|
||||
goog.require('ol.object');
|
||||
goog.require('ol.proj');
|
||||
goog.require('ol.proj.METERS_PER_UNIT');
|
||||
goog.require('ol.proj.Projection');
|
||||
@@ -542,7 +542,7 @@ ol.tilegrid.createForExtent = function(extent, opt_maxZoom, opt_tileSize, opt_co
|
||||
*/
|
||||
ol.tilegrid.createXYZ = function(opt_options) {
|
||||
var options = /** @type {olx.tilegrid.TileGridOptions} */ ({});
|
||||
goog.object.extend(options, opt_options !== undefined ?
|
||||
ol.object.assign(options, opt_options !== undefined ?
|
||||
opt_options : /** @type {olx.tilegrid.XYZOptions} */ ({}));
|
||||
if (options.extent === undefined) {
|
||||
options.extent = ol.proj.get('EPSG:3857').getExtent();
|
||||
|
||||
Reference in New Issue
Block a user