Use named exports from ol/index.js

This commit is contained in:
Tim Schaub
2017-12-12 10:24:58 -07:00
parent fce644556b
commit 87295a74dd
250 changed files with 874 additions and 887 deletions

View File

@@ -1,7 +1,7 @@
/**
* @module ol/source/BingMaps
*/
import _ol_ from '../index.js';
import {inherits} from '../index.js';
import _ol_TileUrlFunction_ from '../TileUrlFunction.js';
import _ol_extent_ from '../extent.js';
import _ol_net_ from '../net.js';
@@ -75,7 +75,7 @@ var _ol_source_BingMaps_ = function(options) {
};
_ol_.inherits(_ol_source_BingMaps_, _ol_source_TileImage_);
inherits(_ol_source_BingMaps_, _ol_source_TileImage_);
/**

View File

@@ -1,7 +1,7 @@
/**
* @module ol/source/CartoDB
*/
import _ol_ from '../index.js';
import {inherits} from '../index.js';
import _ol_obj_ from '../obj.js';
import _ol_source_State_ from '../source/State.js';
import _ol_source_XYZ_ from '../source/XYZ.js';
@@ -55,7 +55,7 @@ var _ol_source_CartoDB_ = function(options) {
this.initializeMap_();
};
_ol_.inherits(_ol_source_CartoDB_, _ol_source_XYZ_);
inherits(_ol_source_CartoDB_, _ol_source_XYZ_);
/**

View File

@@ -1,10 +1,8 @@
/**
* @module ol/source/Cluster
*/
// FIXME keep cluster cache by resolution ?
// FIXME distance not respected because of the centroid
import _ol_ from '../index.js';
import {getUid, inherits} from '../index.js';
import _ol_asserts_ from '../asserts.js';
import _ol_Feature_ from '../Feature.js';
import _ol_coordinate_ from '../coordinate.js';
@@ -73,7 +71,7 @@ var _ol_source_Cluster_ = function(options) {
_ol_source_Cluster_.prototype.refresh, this);
};
_ol_.inherits(_ol_source_Cluster_, _ol_source_Vector_);
inherits(_ol_source_Cluster_, _ol_source_Vector_);
/**
@@ -153,7 +151,7 @@ _ol_source_Cluster_.prototype.cluster = function() {
for (var i = 0, ii = features.length; i < ii; i++) {
var feature = features[i];
if (!(_ol_.getUid(feature).toString() in clustered)) {
if (!(getUid(feature).toString() in clustered)) {
var geometry = this.geometryFunction(feature);
if (geometry) {
var coordinates = geometry.getCoordinates();
@@ -162,7 +160,7 @@ _ol_source_Cluster_.prototype.cluster = function() {
var neighbors = this.source.getFeaturesInExtent(extent);
neighbors = neighbors.filter(function(neighbor) {
var uid = _ol_.getUid(neighbor).toString();
var uid = getUid(neighbor).toString();
if (!(uid in clustered)) {
clustered[uid] = true;
return true;

View File

@@ -1,7 +1,7 @@
/**
* @module ol/source/Image
*/
import _ol_ from '../index.js';
import {ENABLE_RASTER_REPROJECTION, inherits} from '../index.js';
import _ol_ImageState_ from '../ImageState.js';
import _ol_array_ from '../array.js';
import _ol_events_Event_ from '../events/Event.js';
@@ -53,7 +53,7 @@ var _ol_source_Image_ = function(options) {
this.reprojectedRevision_ = 0;
};
_ol_.inherits(_ol_source_Image_, _ol_source_Source_);
inherits(_ol_source_Image_, _ol_source_Source_);
/**
@@ -88,7 +88,7 @@ _ol_source_Image_.prototype.findNearestResolution = function(resolution) {
*/
_ol_source_Image_.prototype.getImage = function(extent, resolution, pixelRatio, projection) {
var sourceProjection = this.getProjection();
if (!_ol_.ENABLE_RASTER_REPROJECTION ||
if (!ENABLE_RASTER_REPROJECTION ||
!sourceProjection ||
!projection ||
_ol_proj_.equivalent(sourceProjection, projection)) {
@@ -197,7 +197,7 @@ _ol_source_Image_.Event = function(type, image) {
this.image = image;
};
_ol_.inherits(_ol_source_Image_.Event, _ol_events_Event_);
inherits(_ol_source_Image_.Event, _ol_events_Event_);
/**

View File

@@ -1,7 +1,7 @@
/**
* @module ol/source/ImageArcGISRest
*/
import _ol_ from '../index.js';
import {inherits} from '../index.js';
import _ol_Image_ from '../Image.js';
import _ol_asserts_ from '../asserts.js';
import _ol_events_ from '../events.js';
@@ -97,7 +97,7 @@ var _ol_source_ImageArcGISRest_ = function(opt_options) {
};
_ol_.inherits(_ol_source_ImageArcGISRest_, _ol_source_Image_);
inherits(_ol_source_ImageArcGISRest_, _ol_source_Image_);
/**

View File

@@ -1,7 +1,7 @@
/**
* @module ol/source/ImageCanvas
*/
import _ol_ from '../index.js';
import {inherits} from '../index.js';
import _ol_ImageCanvas_ from '../ImageCanvas.js';
import _ol_extent_ from '../extent.js';
import _ol_source_Image_ from '../source/Image.js';
@@ -52,7 +52,7 @@ var _ol_source_ImageCanvas_ = function(options) {
};
_ol_.inherits(_ol_source_ImageCanvas_, _ol_source_Image_);
inherits(_ol_source_ImageCanvas_, _ol_source_Image_);
/**

View File

@@ -1,7 +1,7 @@
/**
* @module ol/source/ImageMapGuide
*/
import _ol_ from '../index.js';
import {inherits} from '../index.js';
import _ol_Image_ from '../Image.js';
import _ol_events_ from '../events.js';
import _ol_events_EventType_ from '../events/EventType.js';
@@ -100,7 +100,7 @@ var _ol_source_ImageMapGuide_ = function(options) {
};
_ol_.inherits(_ol_source_ImageMapGuide_, _ol_source_Image_);
inherits(_ol_source_ImageMapGuide_, _ol_source_Image_);
/**

View File

@@ -1,7 +1,7 @@
/**
* @module ol/source/ImageStatic
*/
import _ol_ from '../index.js';
import {inherits} from '../index.js';
import _ol_Image_ from '../Image.js';
import _ol_ImageState_ from '../ImageState.js';
import _ol_dom_ from '../dom.js';
@@ -53,7 +53,7 @@ var _ol_source_ImageStatic_ = function(options) {
};
_ol_.inherits(_ol_source_ImageStatic_, _ol_source_Image_);
inherits(_ol_source_ImageStatic_, _ol_source_Image_);
/**

View File

@@ -1,7 +1,7 @@
/**
* @module ol/source/ImageVector
*/
import _ol_ from '../index.js';
import {getUid, inherits} from '../index.js';
import _ol_dom_ from '../dom.js';
import _ol_events_ from '../events.js';
import _ol_events_EventType_ from '../events/EventType.js';
@@ -109,7 +109,7 @@ var _ol_source_ImageVector_ = function(options) {
};
_ol_.inherits(_ol_source_ImageVector_, _ol_source_ImageCanvas_);
inherits(_ol_source_ImageVector_, _ol_source_ImageCanvas_);
/**
@@ -182,7 +182,7 @@ _ol_source_ImageVector_.prototype.forEachFeatureAtCoordinate = function(
* @return {?} Callback result.
*/
function(feature) {
var key = _ol_.getUid(feature).toString();
var key = getUid(feature).toString();
if (!(key in features)) {
features[key] = true;
return callback(feature);

View File

@@ -1,9 +1,8 @@
/**
* @module ol/source/ImageWMS
*/
// FIXME cannot be shared between maps with different projections
import _ol_ from '../index.js';
import {DEFAULT_WMS_VERSION, inherits} from '../index.js';
import _ol_Image_ from '../Image.js';
import _ol_asserts_ from '../asserts.js';
import _ol_events_ from '../events.js';
@@ -109,7 +108,7 @@ var _ol_source_ImageWMS_ = function(opt_options) {
};
_ol_.inherits(_ol_source_ImageWMS_, _ol_source_Image_);
inherits(_ol_source_ImageWMS_, _ol_source_Image_);
/**
@@ -152,7 +151,7 @@ _ol_source_ImageWMS_.prototype.getGetFeatureInfoUrl = function(coordinate, resol
var baseParams = {
'SERVICE': 'WMS',
'VERSION': _ol_.DEFAULT_WMS_VERSION,
'VERSION': DEFAULT_WMS_VERSION,
'REQUEST': 'GetFeatureInfo',
'FORMAT': 'image/png',
'TRANSPARENT': true,
@@ -220,7 +219,7 @@ _ol_source_ImageWMS_.prototype.getImageInternal = function(extent, resolution, p
var params = {
'SERVICE': 'WMS',
'VERSION': _ol_.DEFAULT_WMS_VERSION,
'VERSION': DEFAULT_WMS_VERSION,
'REQUEST': 'GetMap',
'FORMAT': 'image/png',
'TRANSPARENT': true
@@ -368,7 +367,7 @@ _ol_source_ImageWMS_.prototype.updateParams = function(params) {
* @private
*/
_ol_source_ImageWMS_.prototype.updateV13_ = function() {
var version = this.params_['VERSION'] || _ol_.DEFAULT_WMS_VERSION;
var version = this.params_['VERSION'] || DEFAULT_WMS_VERSION;
this.v13_ = _ol_string_.compareVersions(version, '1.3') >= 0;
};
export default _ol_source_ImageWMS_;

View File

@@ -1,7 +1,7 @@
/**
* @module ol/source/OSM
*/
import _ol_ from '../index.js';
import {inherits} from '../index.js';
import _ol_source_XYZ_ from '../source/XYZ.js';
/**
@@ -44,7 +44,7 @@ var _ol_source_OSM_ = function(opt_options) {
};
_ol_.inherits(_ol_source_OSM_, _ol_source_XYZ_);
inherits(_ol_source_OSM_, _ol_source_XYZ_);
/**

View File

@@ -1,7 +1,7 @@
/**
* @module ol/source/Raster
*/
import _ol_ from '../index.js';
import {getUid, inherits} from '../index.js';
import _ol_ImageCanvas_ from '../ImageCanvas.js';
import _ol_TileQueue_ from '../TileQueue.js';
import _ol_dom_ from '../dom.js';
@@ -78,7 +78,7 @@ var _ol_source_Raster_ = function(options) {
var layerStatesArray = _ol_source_Raster_.getLayerStatesArray_(this.renderers_);
var layerStates = {};
for (var i = 0, ii = layerStatesArray.length; i < ii; ++i) {
layerStates[_ol_.getUid(layerStatesArray[i].layer)] = layerStatesArray[i];
layerStates[getUid(layerStatesArray[i].layer)] = layerStatesArray[i];
}
/**
@@ -137,7 +137,7 @@ var _ol_source_Raster_ = function(options) {
};
_ol_.inherits(_ol_source_Raster_, _ol_source_Image_);
inherits(_ol_source_Raster_, _ol_source_Image_);
/**
@@ -456,7 +456,7 @@ _ol_source_Raster_.Event = function(type, frameState, data) {
this.data = data;
};
_ol_.inherits(_ol_source_Raster_.Event, _ol_events_Event_);
inherits(_ol_source_Raster_.Event, _ol_events_Event_);
/**

View File

@@ -1,7 +1,7 @@
/**
* @module ol/source/Source
*/
import _ol_ from '../index.js';
import {inherits, nullFunction} from '../index.js';
import _ol_Attribution_ from '../Attribution.js';
import _ol_Object_ from '../Object.js';
import _ol_proj_ from '../proj.js';
@@ -64,7 +64,7 @@ var _ol_source_Source_ = function(options) {
};
_ol_.inherits(_ol_source_Source_, _ol_Object_);
inherits(_ol_source_Source_, _ol_Object_);
/**
* Turns the attributions option into an attributions function.
@@ -134,7 +134,7 @@ _ol_source_Source_.prototype.adaptAttributions_ = function(attributionLike) {
* @return {T|undefined} Callback result.
* @template T
*/
_ol_source_Source_.prototype.forEachFeatureAtCoordinate = _ol_.nullFunction;
_ol_source_Source_.prototype.forEachFeatureAtCoordinate = nullFunction;
/**

View File

@@ -1,7 +1,7 @@
/**
* @module ol/source/Stamen
*/
import _ol_ from '../index.js';
import {inherits} from '../index.js';
import _ol_source_OSM_ from '../source/OSM.js';
import _ol_source_XYZ_ from '../source/XYZ.js';
@@ -39,7 +39,7 @@ var _ol_source_Stamen_ = function(options) {
});
};
_ol_.inherits(_ol_source_Stamen_, _ol_source_XYZ_);
inherits(_ol_source_Stamen_, _ol_source_XYZ_);
/**

View File

@@ -1,7 +1,7 @@
/**
* @module ol/source/Tile
*/
import _ol_ from '../index.js';
import {inherits, nullFunction} from '../index.js';
import _ol_TileCache_ from '../TileCache.js';
import _ol_TileState_ from '../TileState.js';
import _ol_events_Event_ from '../events/Event.js';
@@ -79,7 +79,7 @@ var _ol_source_Tile_ = function(options) {
};
_ol_.inherits(_ol_source_Tile_, _ol_source_Source_);
inherits(_ol_source_Tile_, _ol_source_Source_);
/**
@@ -304,7 +304,7 @@ _ol_source_Tile_.prototype.refresh = function() {
* @param {number} y Tile coordinate y.
* @param {ol.proj.Projection} projection Projection.
*/
_ol_source_Tile_.prototype.useTile = _ol_.nullFunction;
_ol_source_Tile_.prototype.useTile = nullFunction;
/**
@@ -330,5 +330,5 @@ _ol_source_Tile_.Event = function(type, tile) {
this.tile = tile;
};
_ol_.inherits(_ol_source_Tile_.Event, _ol_events_Event_);
inherits(_ol_source_Tile_.Event, _ol_events_Event_);
export default _ol_source_Tile_;

View File

@@ -1,7 +1,7 @@
/**
* @module ol/source/TileArcGISRest
*/
import _ol_ from '../index.js';
import {inherits} from '../index.js';
import _ol_extent_ from '../extent.js';
import _ol_math_ from '../math.js';
import _ol_obj_ from '../obj.js';
@@ -58,7 +58,7 @@ var _ol_source_TileArcGISRest_ = function(opt_options) {
this.setKey(this.getKeyForParams_());
};
_ol_.inherits(_ol_source_TileArcGISRest_, _ol_source_TileImage_);
inherits(_ol_source_TileArcGISRest_, _ol_source_TileImage_);
/**

View File

@@ -1,7 +1,7 @@
/**
* @module ol/source/TileDebug
*/
import _ol_ from '../index.js';
import {inherits} from '../index.js';
import _ol_Tile_ from '../Tile.js';
import _ol_TileState_ from '../TileState.js';
import _ol_dom_ from '../dom.js';
@@ -33,7 +33,7 @@ var _ol_source_TileDebug_ = function(options) {
};
_ol_.inherits(_ol_source_TileDebug_, _ol_source_Tile_);
inherits(_ol_source_TileDebug_, _ol_source_Tile_);
/**
@@ -87,7 +87,7 @@ _ol_source_TileDebug_.Tile_ = function(tileCoord, tileSize, text) {
this.canvas_ = null;
};
_ol_.inherits(_ol_source_TileDebug_.Tile_, _ol_Tile_);
inherits(_ol_source_TileDebug_.Tile_, _ol_Tile_);
/**

View File

@@ -1,7 +1,7 @@
/**
* @module ol/source/TileImage
*/
import _ol_ from '../index.js';
import {ENABLE_RASTER_REPROJECTION, getUid, inherits} from '../index.js';
import _ol_ImageTile_ from '../ImageTile.js';
import _ol_TileCache_ from '../TileCache.js';
import _ol_TileState_ from '../TileState.js';
@@ -84,14 +84,14 @@ var _ol_source_TileImage_ = function(options) {
this.renderReprojectionEdges_ = false;
};
_ol_.inherits(_ol_source_TileImage_, _ol_source_UrlTile_);
inherits(_ol_source_TileImage_, _ol_source_UrlTile_);
/**
* @inheritDoc
*/
_ol_source_TileImage_.prototype.canExpireCache = function() {
if (!_ol_.ENABLE_RASTER_REPROJECTION) {
if (!ENABLE_RASTER_REPROJECTION) {
return _ol_source_UrlTile_.prototype.canExpireCache.call(this);
}
if (this.tileCache.canExpireCache()) {
@@ -111,7 +111,7 @@ _ol_source_TileImage_.prototype.canExpireCache = function() {
* @inheritDoc
*/
_ol_source_TileImage_.prototype.expireCache = function(projection, usedTiles) {
if (!_ol_.ENABLE_RASTER_REPROJECTION) {
if (!ENABLE_RASTER_REPROJECTION) {
_ol_source_UrlTile_.prototype.expireCache.call(this, projection, usedTiles);
return;
}
@@ -129,7 +129,7 @@ _ol_source_TileImage_.prototype.expireCache = function(projection, usedTiles) {
* @inheritDoc
*/
_ol_source_TileImage_.prototype.getGutter = function(projection) {
if (_ol_.ENABLE_RASTER_REPROJECTION &&
if (ENABLE_RASTER_REPROJECTION &&
this.getProjection() && projection &&
!_ol_proj_.equivalent(this.getProjection(), projection)) {
return 0;
@@ -152,7 +152,7 @@ _ol_source_TileImage_.prototype.getGutterInternal = function() {
* @inheritDoc
*/
_ol_source_TileImage_.prototype.getOpaque = function(projection) {
if (_ol_.ENABLE_RASTER_REPROJECTION &&
if (ENABLE_RASTER_REPROJECTION &&
this.getProjection() && projection &&
!_ol_proj_.equivalent(this.getProjection(), projection)) {
return false;
@@ -166,7 +166,7 @@ _ol_source_TileImage_.prototype.getOpaque = function(projection) {
* @inheritDoc
*/
_ol_source_TileImage_.prototype.getTileGridForProjection = function(projection) {
if (!_ol_.ENABLE_RASTER_REPROJECTION) {
if (!ENABLE_RASTER_REPROJECTION) {
return _ol_source_UrlTile_.prototype.getTileGridForProjection.call(this, projection);
}
var thisProj = this.getProjection();
@@ -174,7 +174,7 @@ _ol_source_TileImage_.prototype.getTileGridForProjection = function(projection)
(!thisProj || _ol_proj_.equivalent(thisProj, projection))) {
return this.tileGrid;
} else {
var projKey = _ol_.getUid(projection).toString();
var projKey = getUid(projection).toString();
if (!(projKey in this.tileGridForProjection)) {
this.tileGridForProjection[projKey] =
_ol_tilegrid_.getForProjection(projection);
@@ -188,14 +188,14 @@ _ol_source_TileImage_.prototype.getTileGridForProjection = function(projection)
* @inheritDoc
*/
_ol_source_TileImage_.prototype.getTileCacheForProjection = function(projection) {
if (!_ol_.ENABLE_RASTER_REPROJECTION) {
if (!ENABLE_RASTER_REPROJECTION) {
return _ol_source_UrlTile_.prototype.getTileCacheForProjection.call(this, projection);
}
var thisProj = this.getProjection();
if (!thisProj || _ol_proj_.equivalent(thisProj, projection)) {
return this.tileCache;
} else {
var projKey = _ol_.getUid(projection).toString();
var projKey = getUid(projection).toString();
if (!(projKey in this.tileCacheForProjection)) {
this.tileCacheForProjection[projKey] = new _ol_TileCache_(this.tileCache.highWaterMark);
}
@@ -239,7 +239,7 @@ _ol_source_TileImage_.prototype.createTile_ = function(z, x, y, pixelRatio, proj
*/
_ol_source_TileImage_.prototype.getTile = function(z, x, y, pixelRatio, projection) {
var sourceProjection = /** @type {!ol.proj.Projection} */ (this.getProjection());
if (!_ol_.ENABLE_RASTER_REPROJECTION ||
if (!ENABLE_RASTER_REPROJECTION ||
!sourceProjection || !projection ||
_ol_proj_.equivalent(sourceProjection, projection)) {
return this.getTileInternal(z, x, y, pixelRatio, sourceProjection || projection);
@@ -329,7 +329,7 @@ _ol_source_TileImage_.prototype.getTileInternal = function(z, x, y, pixelRatio,
* @api
*/
_ol_source_TileImage_.prototype.setRenderReprojectionEdges = function(render) {
if (!_ol_.ENABLE_RASTER_REPROJECTION ||
if (!ENABLE_RASTER_REPROJECTION ||
this.renderReprojectionEdges_ == render) {
return;
}
@@ -354,10 +354,10 @@ _ol_source_TileImage_.prototype.setRenderReprojectionEdges = function(render) {
* @api
*/
_ol_source_TileImage_.prototype.setTileGridForProjection = function(projection, tilegrid) {
if (_ol_.ENABLE_RASTER_REPROJECTION) {
if (ENABLE_RASTER_REPROJECTION) {
var proj = _ol_proj_.get(projection);
if (proj) {
var projKey = _ol_.getUid(proj).toString();
var projKey = getUid(proj).toString();
if (!(projKey in this.tileGridForProjection)) {
this.tileGridForProjection[projKey] = tilegrid;
}

View File

@@ -7,7 +7,7 @@
* @see http://mapbox.com/developers/api/
*/
import _ol_ from '../index.js';
import {inherits} from '../index.js';
import _ol_TileUrlFunction_ from '../TileUrlFunction.js';
import _ol_asserts_ from '../asserts.js';
import _ol_extent_ from '../extent.js';
@@ -65,7 +65,7 @@ var _ol_source_TileJSON_ = function(options) {
};
_ol_.inherits(_ol_source_TileJSON_, _ol_source_TileImage_);
inherits(_ol_source_TileJSON_, _ol_source_TileImage_);
/**

View File

@@ -1,7 +1,7 @@
/**
* @module ol/source/TileUTFGrid
*/
import _ol_ from '../index.js';
import {inherits} from '../index.js';
import _ol_Tile_ from '../Tile.js';
import _ol_TileState_ from '../TileState.js';
import _ol_TileUrlFunction_ from '../TileUrlFunction.js';
@@ -74,7 +74,7 @@ var _ol_source_TileUTFGrid_ = function(options) {
}
};
_ol_.inherits(_ol_source_TileUTFGrid_, _ol_source_Tile_);
inherits(_ol_source_TileUTFGrid_, _ol_source_Tile_);
/**
@@ -308,7 +308,7 @@ _ol_source_TileUTFGrid_.Tile_ = function(tileCoord, state, src, extent, preempti
this.jsonp_ = jsonp;
};
_ol_.inherits(_ol_source_TileUTFGrid_.Tile_, _ol_Tile_);
inherits(_ol_source_TileUTFGrid_.Tile_, _ol_Tile_);
/**

View File

@@ -1,11 +1,8 @@
/**
* @module ol/source/TileWMS
*/
// FIXME add minZoom support
// FIXME add date line wrap (tile coord transform)
// FIXME cannot be shared between maps with different projections
import _ol_ from '../index.js';
import {DEFAULT_WMS_VERSION, inherits} from '../index.js';
import _ol_asserts_ from '../asserts.js';
import _ol_extent_ from '../extent.js';
import _ol_obj_ from '../obj.js';
@@ -94,7 +91,7 @@ var _ol_source_TileWMS_ = function(opt_options) {
};
_ol_.inherits(_ol_source_TileWMS_, _ol_source_TileImage_);
inherits(_ol_source_TileWMS_, _ol_source_TileImage_);
/**
@@ -145,7 +142,7 @@ _ol_source_TileWMS_.prototype.getGetFeatureInfoUrl = function(coordinate, resolu
var baseParams = {
'SERVICE': 'WMS',
'VERSION': _ol_.DEFAULT_WMS_VERSION,
'VERSION': DEFAULT_WMS_VERSION,
'REQUEST': 'GetFeatureInfo',
'FORMAT': 'image/png',
'TRANSPARENT': true,
@@ -316,7 +313,7 @@ _ol_source_TileWMS_.prototype.fixedTileUrlFunction = function(tileCoord, pixelRa
var baseParams = {
'SERVICE': 'WMS',
'VERSION': _ol_.DEFAULT_WMS_VERSION,
'VERSION': DEFAULT_WMS_VERSION,
'REQUEST': 'GetMap',
'FORMAT': 'image/png',
'TRANSPARENT': true
@@ -343,7 +340,7 @@ _ol_source_TileWMS_.prototype.updateParams = function(params) {
* @private
*/
_ol_source_TileWMS_.prototype.updateV13_ = function() {
var version = this.params_['VERSION'] || _ol_.DEFAULT_WMS_VERSION;
var version = this.params_['VERSION'] || DEFAULT_WMS_VERSION;
this.v13_ = _ol_string_.compareVersions(version, '1.3') >= 0;
};
export default _ol_source_TileWMS_;

View File

@@ -1,7 +1,7 @@
/**
* @module ol/source/UrlTile
*/
import _ol_ from '../index.js';
import {getUid, inherits} from '../index.js';
import _ol_TileState_ from '../TileState.js';
import _ol_TileUrlFunction_ from '../TileUrlFunction.js';
import _ol_source_Tile_ from '../source/Tile.js';
@@ -71,7 +71,7 @@ var _ol_source_UrlTile_ = function(options) {
};
_ol_.inherits(_ol_source_UrlTile_, _ol_source_Tile_);
inherits(_ol_source_UrlTile_, _ol_source_Tile_);
/**
@@ -119,7 +119,7 @@ _ol_source_UrlTile_.prototype.getUrls = function() {
*/
_ol_source_UrlTile_.prototype.handleTileChange = function(event) {
var tile = /** @type {ol.Tile} */ (event.target);
var uid = _ol_.getUid(tile);
var uid = getUid(tile);
var tileState = tile.getState();
var type;
if (tileState == _ol_TileState_.LOADING) {

View File

@@ -1,10 +1,8 @@
/**
* @module ol/source/Vector
*/
// FIXME bulk feature upload - suppress events
// FIXME make change-detection more refined (notably, geometry hint)
import _ol_ from '../index.js';
import {getUid, inherits, nullFunction} from '../index.js';
import _ol_Collection_ from '../Collection.js';
import _ol_CollectionEventType_ from '../CollectionEventType.js';
import _ol_ObjectEventType_ from '../ObjectEventType.js';
@@ -51,7 +49,7 @@ var _ol_source_Vector_ = function(opt_options) {
* @private
* @type {ol.FeatureLoader}
*/
this.loader_ = _ol_.nullFunction;
this.loader_ = nullFunction;
/**
* @private
@@ -152,7 +150,7 @@ var _ol_source_Vector_ = function(opt_options) {
};
_ol_.inherits(_ol_source_Vector_, _ol_source_Source_);
inherits(_ol_source_Vector_, _ol_source_Source_);
/**
@@ -176,7 +174,7 @@ _ol_source_Vector_.prototype.addFeature = function(feature) {
* @protected
*/
_ol_source_Vector_.prototype.addFeatureInternal = function(feature) {
var featureKey = _ol_.getUid(feature).toString();
var featureKey = getUid(feature).toString();
if (!this.addToIndex_(featureKey, feature)) {
return;
@@ -264,7 +262,7 @@ _ol_source_Vector_.prototype.addFeaturesInternal = function(features) {
for (i = 0, length = features.length; i < length; i++) {
feature = features[i];
featureKey = _ol_.getUid(feature).toString();
featureKey = getUid(feature).toString();
if (this.addToIndex_(featureKey, feature)) {
newFeatures.push(feature);
}
@@ -272,7 +270,7 @@ _ol_source_Vector_.prototype.addFeaturesInternal = function(features) {
for (i = 0, length = newFeatures.length; i < length; i++) {
feature = newFeatures[i];
featureKey = _ol_.getUid(feature).toString();
featureKey = getUid(feature).toString();
this.setupChangeEvents_(featureKey, feature);
var geometry = feature.getGeometry();
@@ -680,7 +678,7 @@ _ol_source_Vector_.prototype.getUrl = function() {
*/
_ol_source_Vector_.prototype.handleFeatureChange_ = function(event) {
var feature = /** @type {ol.Feature} */ (event.target);
var featureKey = _ol_.getUid(feature).toString();
var featureKey = getUid(feature).toString();
var geometry = feature.getGeometry();
if (!geometry) {
if (!(featureKey in this.nullGeometryFeatures_)) {
@@ -791,7 +789,7 @@ _ol_source_Vector_.prototype.removeLoadedExtent = function(extent) {
* @api
*/
_ol_source_Vector_.prototype.removeFeature = function(feature) {
var featureKey = _ol_.getUid(feature).toString();
var featureKey = getUid(feature).toString();
if (featureKey in this.nullGeometryFeatures_) {
delete this.nullGeometryFeatures_[featureKey];
} else {
@@ -810,7 +808,7 @@ _ol_source_Vector_.prototype.removeFeature = function(feature) {
* @protected
*/
_ol_source_Vector_.prototype.removeFeatureInternal = function(feature) {
var featureKey = _ol_.getUid(feature).toString();
var featureKey = getUid(feature).toString();
this.featureChangeKeys_[featureKey].forEach(_ol_events_.unlistenByKey);
delete this.featureChangeKeys_[featureKey];
var id = feature.getId();
@@ -878,5 +876,5 @@ _ol_source_Vector_.Event = function(type, opt_feature) {
this.feature = opt_feature;
};
_ol_.inherits(_ol_source_Vector_.Event, _ol_events_Event_);
inherits(_ol_source_Vector_.Event, _ol_events_Event_);
export default _ol_source_Vector_;

View File

@@ -1,7 +1,7 @@
/**
* @module ol/source/VectorTile
*/
import _ol_ from '../index.js';
import {inherits} from '../index.js';
import _ol_TileState_ from '../TileState.js';
import _ol_VectorImageTile_ from '../VectorImageTile.js';
import _ol_VectorTile_ from '../VectorTile.js';
@@ -89,7 +89,7 @@ var _ol_source_VectorTile_ = function(options) {
};
_ol_.inherits(_ol_source_VectorTile_, _ol_source_UrlTile_);
inherits(_ol_source_VectorTile_, _ol_source_UrlTile_);
/**

View File

@@ -1,7 +1,7 @@
/**
* @module ol/source/WMTS
*/
import _ol_ from '../index.js';
import {inherits} from '../index.js';
import _ol_TileUrlFunction_ from '../TileUrlFunction.js';
import _ol_array_ from '../array.js';
import _ol_extent_ from '../extent.js';
@@ -176,7 +176,7 @@ var _ol_source_WMTS_ = function(options) {
};
_ol_.inherits(_ol_source_WMTS_, _ol_source_TileImage_);
inherits(_ol_source_WMTS_, _ol_source_TileImage_);
/**
* Set the URLs to use for requests.

View File

@@ -1,7 +1,7 @@
/**
* @module ol/source/XYZ
*/
import _ol_ from '../index.js';
import {inherits} from '../index.js';
import _ol_source_TileImage_ from '../source/TileImage.js';
import _ol_tilegrid_ from '../tilegrid.js';
@@ -60,5 +60,5 @@ var _ol_source_XYZ_ = function(opt_options) {
};
_ol_.inherits(_ol_source_XYZ_, _ol_source_TileImage_);
inherits(_ol_source_XYZ_, _ol_source_TileImage_);
export default _ol_source_XYZ_;

View File

@@ -1,7 +1,7 @@
/**
* @module ol/source/Zoomify
*/
import _ol_ from '../index.js';
import {DEFAULT_TILE_SIZE, inherits} from '../index.js';
import _ol_ImageTile_ from '../ImageTile.js';
import _ol_TileState_ from '../TileState.js';
import _ol_TileUrlFunction_ from '../TileUrlFunction.js';
@@ -35,7 +35,7 @@ var _ol_source_Zoomify_ = function(opt_options) {
var imageHeight = size[1];
var extent = options.extent || [0, -size[1], size[0], 0];
var tierSizeInTiles = [];
var tileSize = options.tileSize || _ol_.DEFAULT_TILE_SIZE;
var tileSize = options.tileSize || DEFAULT_TILE_SIZE;
var tileSizeForTierSizeCalculation = tileSize;
switch (tierSizeCalculation) {
@@ -151,7 +151,7 @@ var _ol_source_Zoomify_ = function(opt_options) {
};
_ol_.inherits(_ol_source_Zoomify_, _ol_source_TileImage_);
inherits(_ol_source_Zoomify_, _ol_source_TileImage_);
/**
* @constructor
@@ -182,7 +182,7 @@ _ol_source_Zoomify_.Tile_ = function(
*/
this.tileSize_ = _ol_size_.toSize(tileGrid.getTileSize(tileCoord[0]));
};
_ol_.inherits(_ol_source_Zoomify_.Tile_, _ol_ImageTile_);
inherits(_ol_source_Zoomify_.Tile_, _ol_ImageTile_);
/**