Named exports from ol/obj
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* @module ol/source/CartoDB
|
||||
*/
|
||||
import {inherits} from '../index.js';
|
||||
import _ol_obj_ from '../obj.js';
|
||||
import {assign} from '../obj.js';
|
||||
import SourceState from '../source/State.js';
|
||||
import XYZ from '../source/XYZ.js';
|
||||
|
||||
@@ -74,7 +74,7 @@ CartoDB.prototype.getConfig = function() {
|
||||
* @api
|
||||
*/
|
||||
CartoDB.prototype.updateConfig = function(config) {
|
||||
_ol_obj_.assign(this.config_, config);
|
||||
assign(this.config_, config);
|
||||
this.initializeMap_();
|
||||
};
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import {assert} from '../asserts.js';
|
||||
import _ol_events_ from '../events.js';
|
||||
import EventType from '../events/EventType.js';
|
||||
import {containsExtent, getHeight, getWidth} from '../extent.js';
|
||||
import _ol_obj_ from '../obj.js';
|
||||
import {assign} from '../obj.js';
|
||||
import ImageSource from '../source/Image.js';
|
||||
import {appendParams} from '../uri.js';
|
||||
|
||||
@@ -136,7 +136,7 @@ ImageArcGISRest.prototype.getImageInternal = function(extent, resolution, pixelR
|
||||
'FORMAT': 'PNG32',
|
||||
'TRANSPARENT': true
|
||||
};
|
||||
_ol_obj_.assign(params, this.params_);
|
||||
assign(params, this.params_);
|
||||
|
||||
extent = extent.slice();
|
||||
const centerX = (extent[0] + extent[2]) / 2;
|
||||
@@ -264,7 +264,7 @@ ImageArcGISRest.prototype.setUrl = function(url) {
|
||||
* @api
|
||||
*/
|
||||
ImageArcGISRest.prototype.updateParams = function(params) {
|
||||
_ol_obj_.assign(this.params_, params);
|
||||
assign(this.params_, params);
|
||||
this.image_ = null;
|
||||
this.changed();
|
||||
};
|
||||
|
||||
@@ -6,7 +6,7 @@ import _ol_Image_ from '../Image.js';
|
||||
import _ol_events_ from '../events.js';
|
||||
import EventType from '../events/EventType.js';
|
||||
import {containsExtent, getCenter, getHeight, getWidth, scaleFromCenter} from '../extent.js';
|
||||
import _ol_obj_ from '../obj.js';
|
||||
import {assign} from '../obj.js';
|
||||
import ImageSource from '../source/Image.js';
|
||||
import {appendParams} from '../uri.js';
|
||||
|
||||
@@ -193,7 +193,7 @@ ImageMapGuide.getScale = function(extent, size, metersPerUnit, dpi) {
|
||||
* @api
|
||||
*/
|
||||
ImageMapGuide.prototype.updateParams = function(params) {
|
||||
_ol_obj_.assign(this.params_, params);
|
||||
assign(this.params_, params);
|
||||
this.changed();
|
||||
};
|
||||
|
||||
@@ -223,7 +223,7 @@ ImageMapGuide.prototype.getUrl = function(baseUrl, params, extent, size, project
|
||||
'SETVIEWCENTERX': center[0],
|
||||
'SETVIEWCENTERY': center[1]
|
||||
};
|
||||
_ol_obj_.assign(baseParams, params);
|
||||
assign(baseParams, params);
|
||||
return appendParams(baseUrl, baseParams);
|
||||
};
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import {assert} from '../asserts.js';
|
||||
import _ol_events_ from '../events.js';
|
||||
import EventType from '../events/EventType.js';
|
||||
import {containsExtent, getCenter, getForViewAndSize, getHeight, getWidth} from '../extent.js';
|
||||
import _ol_obj_ from '../obj.js';
|
||||
import {assign} from '../obj.js';
|
||||
import {get as getProjection, transform} from '../proj.js';
|
||||
import _ol_reproj_ from '../reproj.js';
|
||||
import ImageSource from '../source/Image.js';
|
||||
@@ -156,7 +156,7 @@ ImageWMS.prototype.getGetFeatureInfoUrl = function(coordinate, resolution, proje
|
||||
'TRANSPARENT': true,
|
||||
'QUERY_LAYERS': this.params_['LAYERS']
|
||||
};
|
||||
_ol_obj_.assign(baseParams, this.params_, params);
|
||||
assign(baseParams, this.params_, params);
|
||||
|
||||
const x = Math.floor((coordinate[0] - extent[0]) / resolution);
|
||||
const y = Math.floor((extent[3] - coordinate[1]) / resolution);
|
||||
@@ -223,7 +223,7 @@ ImageWMS.prototype.getImageInternal = function(extent, resolution, pixelRatio, p
|
||||
'FORMAT': 'image/png',
|
||||
'TRANSPARENT': true
|
||||
};
|
||||
_ol_obj_.assign(params, this.params_);
|
||||
assign(params, this.params_);
|
||||
|
||||
this.imageSize_[0] = Math.round(getWidth(requestExtent) / imageResolution);
|
||||
this.imageSize_[1] = Math.round(getHeight(requestExtent) / imageResolution);
|
||||
@@ -355,7 +355,7 @@ ImageWMS.prototype.setUrl = function(url) {
|
||||
* @api
|
||||
*/
|
||||
ImageWMS.prototype.updateParams = function(params) {
|
||||
_ol_obj_.assign(this.params_, params);
|
||||
assign(this.params_, params);
|
||||
this.updateV13_();
|
||||
this.image_ = null;
|
||||
this.changed();
|
||||
|
||||
@@ -12,7 +12,7 @@ import {Processor} from 'pixelworks';
|
||||
import {equals, getCenter, getHeight, getWidth} from '../extent.js';
|
||||
import ImageLayer from '../layer/Image.js';
|
||||
import TileLayer from '../layer/Tile.js';
|
||||
import _ol_obj_ from '../obj.js';
|
||||
import {assign} from '../obj.js';
|
||||
import CanvasImageLayerRenderer from '../renderer/canvas/ImageLayer.js';
|
||||
import CanvasTileLayerRenderer from '../renderer/canvas/TileLayer.js';
|
||||
import ImageSource from '../source/Image.js';
|
||||
@@ -189,11 +189,9 @@ RasterSource.prototype.setOperation = function(operation, opt_lib) {
|
||||
*/
|
||||
RasterSource.prototype.updateFrameState_ = function(extent, resolution, projection) {
|
||||
|
||||
const frameState = /** @type {olx.FrameState} */ (
|
||||
_ol_obj_.assign({}, this.frameState_));
|
||||
const frameState = /** @type {olx.FrameState} */ (assign({}, this.frameState_));
|
||||
|
||||
frameState.viewState = /** @type {olx.ViewState} */ (
|
||||
_ol_obj_.assign({}, frameState.viewState));
|
||||
frameState.viewState = /** @type {olx.ViewState} */ (assign({}, frameState.viewState));
|
||||
|
||||
const center = getCenter(extent);
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
import {inherits} from '../index.js';
|
||||
import {createEmpty} from '../extent.js';
|
||||
import {modulo} from '../math.js';
|
||||
import _ol_obj_ from '../obj.js';
|
||||
import {assign} from '../obj.js';
|
||||
import _ol_size_ from '../size.js';
|
||||
import TileImage from '../source/TileImage.js';
|
||||
import _ol_tilecoord_ from '../tilecoord.js';
|
||||
@@ -166,7 +166,7 @@ TileArcGISRest.prototype.fixedTileUrlFunction = function(tileCoord, pixelRatio,
|
||||
'FORMAT': 'PNG32',
|
||||
'TRANSPARENT': true
|
||||
};
|
||||
_ol_obj_.assign(baseParams, this.params_);
|
||||
assign(baseParams, this.params_);
|
||||
|
||||
return this.getRequestUrl_(tileCoord, tileSize, tileExtent,
|
||||
pixelRatio, projection, baseParams);
|
||||
@@ -179,7 +179,7 @@ TileArcGISRest.prototype.fixedTileUrlFunction = function(tileCoord, pixelRatio,
|
||||
* @api
|
||||
*/
|
||||
TileArcGISRest.prototype.updateParams = function(params) {
|
||||
_ol_obj_.assign(this.params_, params);
|
||||
assign(this.params_, params);
|
||||
this.setKey(this.getKeyForParams_());
|
||||
};
|
||||
export default TileArcGISRest;
|
||||
|
||||
@@ -6,7 +6,7 @@ import {DEFAULT_WMS_VERSION} from './common.js';
|
||||
import {inherits} from '../index.js';
|
||||
import {assert} from '../asserts.js';
|
||||
import {buffer, createEmpty} from '../extent.js';
|
||||
import _ol_obj_ from '../obj.js';
|
||||
import {assign} from '../obj.js';
|
||||
import {modulo} from '../math.js';
|
||||
import {get as getProjection, transform, transformExtent} from '../proj.js';
|
||||
import _ol_reproj_ from '../reproj.js';
|
||||
@@ -148,7 +148,7 @@ TileWMS.prototype.getGetFeatureInfoUrl = function(coordinate, resolution, projec
|
||||
'TRANSPARENT': true,
|
||||
'QUERY_LAYERS': this.params_['LAYERS']
|
||||
};
|
||||
_ol_obj_.assign(baseParams, this.params_, params);
|
||||
assign(baseParams, this.params_, params);
|
||||
|
||||
const x = Math.floor((coordinate[0] - tileExtent[0]) / tileResolution);
|
||||
const y = Math.floor((tileExtent[3] - coordinate[1]) / tileResolution);
|
||||
@@ -317,7 +317,7 @@ TileWMS.prototype.fixedTileUrlFunction = function(tileCoord, pixelRatio, project
|
||||
'FORMAT': 'image/png',
|
||||
'TRANSPARENT': true
|
||||
};
|
||||
_ol_obj_.assign(baseParams, this.params_);
|
||||
assign(baseParams, this.params_);
|
||||
|
||||
return this.getRequestUrl_(tileCoord, tileSize, tileExtent,
|
||||
pixelRatio, projection, baseParams);
|
||||
@@ -329,7 +329,7 @@ TileWMS.prototype.fixedTileUrlFunction = function(tileCoord, pixelRatio, project
|
||||
* @api
|
||||
*/
|
||||
TileWMS.prototype.updateParams = function(params) {
|
||||
_ol_obj_.assign(this.params_, params);
|
||||
assign(this.params_, params);
|
||||
this.updateV13_();
|
||||
this.setKey(this.getKeyForParams_());
|
||||
};
|
||||
|
||||
@@ -15,7 +15,7 @@ import {containsExtent, equals} from '../extent.js';
|
||||
import {xhr} from '../featureloader.js';
|
||||
import {TRUE} from '../functions.js';
|
||||
import _ol_loadingstrategy_ from '../loadingstrategy.js';
|
||||
import _ol_obj_ from '../obj.js';
|
||||
import {isEmpty, getValues} from '../obj.js';
|
||||
import Source from '../source/Source.js';
|
||||
import SourceState from '../source/State.js';
|
||||
import VectorEventType from '../source/VectorEventType.js';
|
||||
@@ -506,8 +506,8 @@ VectorSource.prototype.getFeatures = function() {
|
||||
features = this.featuresCollection_.getArray();
|
||||
} else if (this.featuresRtree_) {
|
||||
features = this.featuresRtree_.getAll();
|
||||
if (!_ol_obj_.isEmpty(this.nullGeometryFeatures_)) {
|
||||
extend(features, _ol_obj_.getValues(this.nullGeometryFeatures_));
|
||||
if (!isEmpty(this.nullGeometryFeatures_)) {
|
||||
extend(features, getValues(this.nullGeometryFeatures_));
|
||||
}
|
||||
}
|
||||
return /** @type {Array.<ol.Feature>} */ (features);
|
||||
@@ -722,8 +722,7 @@ VectorSource.prototype.handleFeatureChange_ = function(event) {
|
||||
* @return {boolean} Is empty.
|
||||
*/
|
||||
VectorSource.prototype.isEmpty = function() {
|
||||
return this.featuresRtree_.isEmpty() &&
|
||||
_ol_obj_.isEmpty(this.nullGeometryFeatures_);
|
||||
return this.featuresRtree_.isEmpty() && isEmpty(this.nullGeometryFeatures_);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import {inherits} from '../index.js';
|
||||
import {expandUrl, createFromTileUrlFunctions, nullTileUrlFunction} from '../tileurlfunction.js';
|
||||
import {find, findIndex, includes} from '../array.js';
|
||||
import {containsExtent} from '../extent.js';
|
||||
import _ol_obj_ from '../obj.js';
|
||||
import {assign} from '../obj.js';
|
||||
import {get as getProjection, equivalent, transformExtent} from '../proj.js';
|
||||
import TileImage from '../source/TileImage.js';
|
||||
import WMTSRequestEncoding from '../source/WMTSRequestEncoding.js';
|
||||
@@ -92,7 +92,7 @@ const WMTS = function(options) {
|
||||
};
|
||||
|
||||
if (requestEncoding == WMTSRequestEncoding.KVP) {
|
||||
_ol_obj_.assign(context, {
|
||||
assign(context, {
|
||||
'Service': 'WMTS',
|
||||
'Request': 'GetTile',
|
||||
'Version': this.version_,
|
||||
@@ -135,7 +135,7 @@ const WMTS = function(options) {
|
||||
'TileCol': tileCoord[1],
|
||||
'TileRow': -tileCoord[2] - 1
|
||||
};
|
||||
_ol_obj_.assign(localContext, dimensions);
|
||||
assign(localContext, dimensions);
|
||||
let url = template;
|
||||
if (requestEncoding == WMTSRequestEncoding.KVP) {
|
||||
url = appendParams(url, localContext);
|
||||
@@ -280,7 +280,7 @@ WMTS.prototype.getKeyForDimensions_ = function() {
|
||||
* @api
|
||||
*/
|
||||
WMTS.prototype.updateDimensions = function(dimensions) {
|
||||
_ol_obj_.assign(this.dimensions_, dimensions);
|
||||
assign(this.dimensions_, dimensions);
|
||||
this.setKey(this.getKeyForDimensions_());
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user