Rename ol/objectutil.js to ol/obj.js
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
goog.provide('ol.source.CartoDB');
|
||||
|
||||
goog.require('ol.object');
|
||||
goog.require('ol.obj');
|
||||
goog.require('ol.source.State');
|
||||
goog.require('ol.source.XYZ');
|
||||
|
||||
@@ -73,7 +73,7 @@ ol.source.CartoDB.prototype.getConfig = function() {
|
||||
* @api
|
||||
*/
|
||||
ol.source.CartoDB.prototype.updateConfig = function(config) {
|
||||
ol.object.assign(this.config_, config);
|
||||
ol.obj.assign(this.config_, config);
|
||||
this.initializeMap_();
|
||||
};
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ goog.require('ol.Image');
|
||||
goog.require('ol.events');
|
||||
goog.require('ol.events.EventType');
|
||||
goog.require('ol.extent');
|
||||
goog.require('ol.object');
|
||||
goog.require('ol.obj');
|
||||
goog.require('ol.proj');
|
||||
goog.require('ol.source.Image');
|
||||
goog.require('ol.uri');
|
||||
@@ -129,7 +129,7 @@ ol.source.ImageArcGISRest.prototype.getImageInternal = function(extent, resoluti
|
||||
'FORMAT': 'PNG32',
|
||||
'TRANSPARENT': true
|
||||
};
|
||||
ol.object.assign(params, this.params_);
|
||||
ol.obj.assign(params, this.params_);
|
||||
|
||||
extent = extent.slice();
|
||||
var centerX = (extent[0] + extent[2]) / 2;
|
||||
@@ -260,7 +260,7 @@ ol.source.ImageArcGISRest.prototype.setUrl = function(url) {
|
||||
* @api stable
|
||||
*/
|
||||
ol.source.ImageArcGISRest.prototype.updateParams = function(params) {
|
||||
ol.object.assign(this.params_, params);
|
||||
ol.obj.assign(this.params_, params);
|
||||
this.image_ = null;
|
||||
this.changed();
|
||||
};
|
||||
|
||||
@@ -4,7 +4,7 @@ goog.require('ol.events');
|
||||
goog.require('ol.events.EventType');
|
||||
goog.require('ol.Image');
|
||||
goog.require('ol.extent');
|
||||
goog.require('ol.object');
|
||||
goog.require('ol.obj');
|
||||
goog.require('ol.source.Image');
|
||||
goog.require('ol.uri');
|
||||
|
||||
@@ -191,7 +191,7 @@ ol.source.ImageMapGuide.getScale = function(extent, size, metersPerUnit, dpi) {
|
||||
* @api stable
|
||||
*/
|
||||
ol.source.ImageMapGuide.prototype.updateParams = function(params) {
|
||||
ol.object.assign(this.params_, params);
|
||||
ol.obj.assign(this.params_, params);
|
||||
this.changed();
|
||||
};
|
||||
|
||||
@@ -221,7 +221,7 @@ ol.source.ImageMapGuide.prototype.getUrl = function(baseUrl, params, extent, siz
|
||||
'SETVIEWCENTERX': center[0],
|
||||
'SETVIEWCENTERY': center[1]
|
||||
};
|
||||
ol.object.assign(baseParams, params);
|
||||
ol.obj.assign(baseParams, params);
|
||||
return ol.uri.appendParams(baseUrl, baseParams);
|
||||
};
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ goog.require('ol.Image');
|
||||
goog.require('ol.events');
|
||||
goog.require('ol.events.EventType');
|
||||
goog.require('ol.extent');
|
||||
goog.require('ol.object');
|
||||
goog.require('ol.obj');
|
||||
goog.require('ol.proj');
|
||||
goog.require('ol.source.Image');
|
||||
goog.require('ol.source.wms');
|
||||
@@ -154,7 +154,7 @@ ol.source.ImageWMS.prototype.getGetFeatureInfoUrl = function(coordinate, resolut
|
||||
'TRANSPARENT': true,
|
||||
'QUERY_LAYERS': this.params_['LAYERS']
|
||||
};
|
||||
ol.object.assign(baseParams, this.params_, params);
|
||||
ol.obj.assign(baseParams, this.params_, params);
|
||||
|
||||
var x = Math.floor((coordinate[0] - extent[0]) / resolution);
|
||||
var y = Math.floor((extent[3] - coordinate[1]) / resolution);
|
||||
@@ -226,7 +226,7 @@ ol.source.ImageWMS.prototype.getImageInternal = function(extent, resolution, pix
|
||||
'FORMAT': 'image/png',
|
||||
'TRANSPARENT': true
|
||||
};
|
||||
ol.object.assign(params, this.params_);
|
||||
ol.obj.assign(params, this.params_);
|
||||
|
||||
this.imageSize_[0] = Math.ceil(imageWidth * this.ratio_);
|
||||
this.imageSize_[1] = Math.ceil(imageHeight * this.ratio_);
|
||||
@@ -358,7 +358,7 @@ ol.source.ImageWMS.prototype.setUrl = function(url) {
|
||||
* @api stable
|
||||
*/
|
||||
ol.source.ImageWMS.prototype.updateParams = function(params) {
|
||||
ol.object.assign(this.params_, params);
|
||||
ol.obj.assign(this.params_, params);
|
||||
this.updateV13_();
|
||||
this.image_ = null;
|
||||
this.changed();
|
||||
|
||||
@@ -14,7 +14,7 @@ goog.require('ol.ext.pixelworks');
|
||||
goog.require('ol.extent');
|
||||
goog.require('ol.layer.Image');
|
||||
goog.require('ol.layer.Tile');
|
||||
goog.require('ol.object');
|
||||
goog.require('ol.obj');
|
||||
goog.require('ol.renderer.canvas.ImageLayer');
|
||||
goog.require('ol.renderer.canvas.TileLayer');
|
||||
goog.require('ol.source.Image');
|
||||
@@ -181,10 +181,10 @@ ol.source.Raster.prototype.setOperation = function(operation, opt_lib) {
|
||||
ol.source.Raster.prototype.updateFrameState_ = function(extent, resolution, projection) {
|
||||
|
||||
var frameState = /** @type {olx.FrameState} */ (
|
||||
ol.object.assign({}, this.frameState_));
|
||||
ol.obj.assign({}, this.frameState_));
|
||||
|
||||
frameState.viewState = /** @type {olx.ViewState} */ (
|
||||
ol.object.assign({}, frameState.viewState));
|
||||
ol.obj.assign({}, frameState.viewState));
|
||||
|
||||
var center = ol.extent.getCenter(extent);
|
||||
var width = Math.round(ol.extent.getWidth(extent) / resolution);
|
||||
|
||||
@@ -2,7 +2,7 @@ goog.provide('ol.source.TileArcGISRest');
|
||||
|
||||
goog.require('ol');
|
||||
goog.require('ol.extent');
|
||||
goog.require('ol.object');
|
||||
goog.require('ol.obj');
|
||||
goog.require('ol.math');
|
||||
goog.require('ol.proj');
|
||||
goog.require('ol.size');
|
||||
@@ -154,7 +154,7 @@ ol.source.TileArcGISRest.prototype.fixedTileUrlFunction = function(tileCoord, pi
|
||||
'FORMAT': 'PNG32',
|
||||
'TRANSPARENT': true
|
||||
};
|
||||
ol.object.assign(baseParams, this.params_);
|
||||
ol.obj.assign(baseParams, this.params_);
|
||||
|
||||
return this.getRequestUrl_(tileCoord, tileSize, tileExtent,
|
||||
pixelRatio, projection, baseParams);
|
||||
@@ -167,6 +167,6 @@ ol.source.TileArcGISRest.prototype.fixedTileUrlFunction = function(tileCoord, pi
|
||||
* @api stable
|
||||
*/
|
||||
ol.source.TileArcGISRest.prototype.updateParams = function(params) {
|
||||
ol.object.assign(this.params_, params);
|
||||
ol.obj.assign(this.params_, params);
|
||||
this.changed();
|
||||
};
|
||||
|
||||
@@ -6,7 +6,7 @@ goog.provide('ol.source.TileWMS');
|
||||
|
||||
goog.require('ol');
|
||||
goog.require('ol.extent');
|
||||
goog.require('ol.object');
|
||||
goog.require('ol.obj');
|
||||
goog.require('ol.math');
|
||||
goog.require('ol.proj');
|
||||
goog.require('ol.size');
|
||||
@@ -153,7 +153,7 @@ ol.source.TileWMS.prototype.getGetFeatureInfoUrl = function(coordinate, resoluti
|
||||
'TRANSPARENT': true,
|
||||
'QUERY_LAYERS': this.params_['LAYERS']
|
||||
};
|
||||
ol.object.assign(baseParams, this.params_, params);
|
||||
ol.obj.assign(baseParams, this.params_, params);
|
||||
|
||||
var x = Math.floor((coordinate[0] - tileExtent[0]) / tileResolution);
|
||||
var y = Math.floor((tileExtent[3] - coordinate[1]) / tileResolution);
|
||||
@@ -348,7 +348,7 @@ ol.source.TileWMS.prototype.fixedTileUrlFunction = function(tileCoord, pixelRati
|
||||
'FORMAT': 'image/png',
|
||||
'TRANSPARENT': true
|
||||
};
|
||||
ol.object.assign(baseParams, this.params_);
|
||||
ol.obj.assign(baseParams, this.params_);
|
||||
|
||||
return this.getRequestUrl_(tileCoord, tileSize, tileExtent,
|
||||
pixelRatio, projection, baseParams);
|
||||
@@ -369,7 +369,7 @@ ol.source.TileWMS.prototype.setUrls = function(urls) {
|
||||
* @api stable
|
||||
*/
|
||||
ol.source.TileWMS.prototype.updateParams = function(params) {
|
||||
ol.object.assign(this.params_, params);
|
||||
ol.obj.assign(this.params_, params);
|
||||
this.resetCoordKeyPrefix_();
|
||||
this.updateV13_();
|
||||
this.setKey(this.getKeyForParams_());
|
||||
|
||||
@@ -16,7 +16,7 @@ goog.require('ol.events.EventType');
|
||||
goog.require('ol.extent');
|
||||
goog.require('ol.featureloader');
|
||||
goog.require('ol.loadingstrategy');
|
||||
goog.require('ol.object');
|
||||
goog.require('ol.obj');
|
||||
goog.require('ol.proj');
|
||||
goog.require('ol.source.Source');
|
||||
goog.require('ol.source.State');
|
||||
@@ -394,11 +394,11 @@ ol.source.Vector.prototype.clear = function(opt_fast) {
|
||||
if (this.featuresCollection_) {
|
||||
this.featuresCollection_.clear();
|
||||
}
|
||||
goog.DEBUG && console.assert(ol.object.isEmpty(this.featureChangeKeys_),
|
||||
goog.DEBUG && console.assert(ol.obj.isEmpty(this.featureChangeKeys_),
|
||||
'featureChangeKeys is an empty object now');
|
||||
goog.DEBUG && console.assert(ol.object.isEmpty(this.idIndex_),
|
||||
goog.DEBUG && console.assert(ol.obj.isEmpty(this.idIndex_),
|
||||
'idIndex is an empty object now');
|
||||
goog.DEBUG && console.assert(ol.object.isEmpty(this.undefIdIndex_),
|
||||
goog.DEBUG && console.assert(ol.obj.isEmpty(this.undefIdIndex_),
|
||||
'undefIdIndex is an empty object now');
|
||||
|
||||
if (this.featuresRtree_) {
|
||||
@@ -552,9 +552,9 @@ ol.source.Vector.prototype.getFeatures = function() {
|
||||
features = this.featuresCollection_.getArray();
|
||||
} else if (this.featuresRtree_) {
|
||||
features = this.featuresRtree_.getAll();
|
||||
if (!ol.object.isEmpty(this.nullGeometryFeatures_)) {
|
||||
if (!ol.obj.isEmpty(this.nullGeometryFeatures_)) {
|
||||
ol.array.extend(
|
||||
features, ol.object.getValues(this.nullGeometryFeatures_));
|
||||
features, ol.obj.getValues(this.nullGeometryFeatures_));
|
||||
}
|
||||
}
|
||||
return /** @type {Array.<ol.Feature>} */ (features);
|
||||
@@ -771,7 +771,7 @@ ol.source.Vector.prototype.handleFeatureChange_ = function(event) {
|
||||
*/
|
||||
ol.source.Vector.prototype.isEmpty = function() {
|
||||
return this.featuresRtree_.isEmpty() &&
|
||||
ol.object.isEmpty(this.nullGeometryFeatures_);
|
||||
ol.obj.isEmpty(this.nullGeometryFeatures_);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ goog.provide('ol.source.WMTSRequestEncoding');
|
||||
goog.require('ol.TileUrlFunction');
|
||||
goog.require('ol.array');
|
||||
goog.require('ol.extent');
|
||||
goog.require('ol.object');
|
||||
goog.require('ol.obj');
|
||||
goog.require('ol.proj');
|
||||
goog.require('ol.source.TileImage');
|
||||
goog.require('ol.tilegrid.WMTS');
|
||||
@@ -101,7 +101,7 @@ ol.source.WMTS = function(options) {
|
||||
};
|
||||
|
||||
if (requestEncoding == ol.source.WMTSRequestEncoding.KVP) {
|
||||
ol.object.assign(context, {
|
||||
ol.obj.assign(context, {
|
||||
'Service': 'WMTS',
|
||||
'Request': 'GetTile',
|
||||
'Version': this.version_,
|
||||
@@ -143,7 +143,7 @@ ol.source.WMTS = function(options) {
|
||||
'TileCol': tileCoord[1],
|
||||
'TileRow': -tileCoord[2] - 1
|
||||
};
|
||||
ol.object.assign(localContext, dimensions);
|
||||
ol.obj.assign(localContext, dimensions);
|
||||
var url = template;
|
||||
if (requestEncoding == ol.source.WMTSRequestEncoding.KVP) {
|
||||
url = ol.uri.appendParams(url, localContext);
|
||||
@@ -276,7 +276,7 @@ ol.source.WMTS.prototype.getKeyForDimensions_ = function() {
|
||||
* @api
|
||||
*/
|
||||
ol.source.WMTS.prototype.updateDimensions = function(dimensions) {
|
||||
ol.object.assign(this.dimensions_, dimensions);
|
||||
ol.obj.assign(this.dimensions_, dimensions);
|
||||
this.setKey(this.getKeyForDimensions_());
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user