Merge pull request #4602 from tschaub/eslint

Use ESLint.
This commit is contained in:
Tim Schaub
2016-01-12 00:09:15 -08:00
341 changed files with 1621 additions and 2336 deletions
+1 -3
View File
@@ -13,7 +13,6 @@ goog.require('ol.source.TileImage');
goog.require('ol.tilecoord');
/**
* @classdesc
* Layer source for Bing Maps tile data.
@@ -79,8 +78,7 @@ ol.source.BingMaps.TOS_ATTRIBUTION = new ol.Attribution({
/**
* @param {BingMapsImageryMetadataResponse} response Response.
*/
ol.source.BingMaps.prototype.handleImageryMetadataResponse =
function(response) {
ol.source.BingMaps.prototype.handleImageryMetadataResponse = function(response) {
if (response.statusCode != 200 ||
response.statusDescription != 'OK' ||
+2 -3
View File
@@ -13,13 +13,12 @@ goog.require('ol.geom.Point');
goog.require('ol.source.Vector');
/**
* @classdesc
* Layer source to cluster vector data.
*
* @constructor
* @param {olx.source.ClusterOptions} options
* @param {olx.source.ClusterOptions} options Constructor options.
* @extends {ol.source.Vector}
* @api
*/
@@ -148,7 +147,7 @@ ol.source.Cluster.prototype.cluster_ = function() {
/**
* @param {Array.<ol.Feature>} features Features
* @return {ol.Feature}
* @return {ol.Feature} The cluster feature.
* @private
*/
ol.source.Cluster.prototype.createCluster_ = function(features) {
+2 -4
View File
@@ -6,14 +6,13 @@ goog.require('ol.extent');
goog.require('ol.source.Image');
/**
* @classdesc
* Base class for image sources where a canvas element is the image.
*
* @constructor
* @extends {ol.source.Image}
* @param {olx.source.ImageCanvasOptions} options
* @param {olx.source.ImageCanvasOptions} options Constructor options.
* @api
*/
ol.source.ImageCanvas = function(options) {
@@ -59,8 +58,7 @@ goog.inherits(ol.source.ImageCanvas, ol.source.Image);
/**
* @inheritDoc
*/
ol.source.ImageCanvas.prototype.getImageInternal =
function(extent, resolution, pixelRatio, projection) {
ol.source.ImageCanvas.prototype.getImageInternal = function(extent, resolution, pixelRatio, projection) {
resolution = this.findNearestResolution(resolution);
var canvas = this.canvas_;
+2 -5
View File
@@ -10,7 +10,6 @@ goog.require('ol.extent');
goog.require('ol.source.Image');
/**
* @classdesc
* Source for images from Mapguide servers
@@ -117,8 +116,7 @@ ol.source.ImageMapGuide.prototype.getParams = function() {
/**
* @inheritDoc
*/
ol.source.ImageMapGuide.prototype.getImageInternal =
function(extent, resolution, pixelRatio, projection) {
ol.source.ImageMapGuide.prototype.getImageInternal = function(extent, resolution, pixelRatio, projection) {
resolution = this.findNearestResolution(resolution);
pixelRatio = this.hidpi_ ? pixelRatio : 1;
@@ -207,8 +205,7 @@ ol.source.ImageMapGuide.prototype.updateParams = function(params) {
* @param {ol.proj.Projection} projection Projection.
* @return {string} The mapagent map image request URL.
*/
ol.source.ImageMapGuide.prototype.getUrl =
function(baseUrl, params, extent, size, projection) {
ol.source.ImageMapGuide.prototype.getUrl = function(baseUrl, params, extent, size, projection) {
var scale = ol.source.ImageMapGuide.getScale(extent, size,
this.metersPerUnit_, this.displayDpi_);
var center = ol.extent.getCenter(extent);
+4 -6
View File
@@ -24,7 +24,6 @@ goog.require('ol.source.Source');
ol.source.ImageOptions;
/**
* @classdesc
* Abstract base class; normally only used for creating subclasses and not
@@ -89,8 +88,7 @@ ol.source.Image.prototype.getResolutions = function() {
* @param {number} resolution Resolution.
* @return {number} Resolution.
*/
ol.source.Image.prototype.findNearestResolution =
function(resolution) {
ol.source.Image.prototype.findNearestResolution = function(resolution) {
if (this.resolutions_) {
var idx = ol.array.linearFindNearest(this.resolutions_, resolution, 0);
resolution = this.resolutions_[idx];
@@ -106,8 +104,7 @@ ol.source.Image.prototype.findNearestResolution =
* @param {ol.proj.Projection} projection Projection.
* @return {ol.ImageBase} Single image.
*/
ol.source.Image.prototype.getImage =
function(extent, resolution, pixelRatio, projection) {
ol.source.Image.prototype.getImage = function(extent, resolution, pixelRatio, projection) {
var sourceProjection = this.getProjection();
if (!ol.ENABLE_RASTER_REPROJECTION ||
!sourceProjection ||
@@ -178,6 +175,8 @@ ol.source.Image.prototype.handleImageChange = function(event) {
new ol.source.ImageEvent(ol.source.ImageEventType.IMAGELOADERROR,
image));
break;
default:
// pass
}
};
@@ -193,7 +192,6 @@ ol.source.Image.defaultImageLoadFunction = function(image, src) {
};
/**
* @classdesc
* Events emitted by {@link ol.source.Image} instances are instances of this
+1 -3
View File
@@ -10,7 +10,6 @@ goog.require('ol.proj');
goog.require('ol.source.Image');
/**
* @classdesc
* A layer source for displaying a single, static image.
@@ -63,8 +62,7 @@ goog.inherits(ol.source.ImageStatic, ol.source.Image);
/**
* @inheritDoc
*/
ol.source.ImageStatic.prototype.getImageInternal =
function(extent, resolution, pixelRatio, projection) {
ol.source.ImageStatic.prototype.getImageInternal = function(extent, resolution, pixelRatio, projection) {
if (ol.extent.intersects(extent, this.image_.getExtent())) {
return this.image_;
}
+4 -9
View File
@@ -14,7 +14,6 @@ goog.require('ol.style.Style');
goog.require('ol.vec.Mat4');
/**
* @classdesc
* An image source whose images are canvas elements into which vector features
@@ -106,8 +105,7 @@ goog.inherits(ol.source.ImageVector, ol.source.ImageCanvas);
* @return {HTMLCanvasElement} Canvas element.
* @private
*/
ol.source.ImageVector.prototype.canvasFunctionInternal_ =
function(extent, resolution, pixelRatio, size, projection) {
ol.source.ImageVector.prototype.canvasFunctionInternal_ = function(extent, resolution, pixelRatio, size, projection) {
var replayGroup = new ol.render.canvas.ReplayGroup(
ol.renderer.vector.getTolerance(resolution, pixelRatio), extent,
@@ -217,8 +215,7 @@ ol.source.ImageVector.prototype.getStyleFunction = function() {
* @return {!goog.vec.Mat4.Number} Transform.
* @private
*/
ol.source.ImageVector.prototype.getTransform_ =
function(center, resolution, pixelRatio, size) {
ol.source.ImageVector.prototype.getTransform_ = function(center, resolution, pixelRatio, size) {
return ol.vec.Mat4.makeTransform2D(this.transform_,
size[0] / 2, size[1] / 2,
pixelRatio / resolution, -pixelRatio / resolution,
@@ -232,8 +229,7 @@ ol.source.ImageVector.prototype.getTransform_ =
* @param {goog.events.Event} event Image style change event.
* @private
*/
ol.source.ImageVector.prototype.handleImageChange_ =
function(event) {
ol.source.ImageVector.prototype.handleImageChange_ = function(event) {
this.changed();
};
@@ -256,8 +252,7 @@ ol.source.ImageVector.prototype.handleSourceChange_ = function() {
* @return {boolean} `true` if an image is loading.
* @private
*/
ol.source.ImageVector.prototype.renderFeature_ =
function(feature, resolution, pixelRatio, replayGroup) {
ol.source.ImageVector.prototype.renderFeature_ = function(feature, resolution, pixelRatio, replayGroup) {
var styles;
var styleFunction = feature.getStyleFunction();
if (styleFunction) {
+3 -9
View File
@@ -18,7 +18,6 @@ goog.require('ol.source.wms');
goog.require('ol.source.wms.ServerType');
/**
* @classdesc
* Source for WMS servers providing single, untiled images.
@@ -136,8 +135,7 @@ ol.source.ImageWMS.GETFEATUREINFO_IMAGE_SIZE_ = [101, 101];
* @return {string|undefined} GetFeatureInfo URL.
* @api stable
*/
ol.source.ImageWMS.prototype.getGetFeatureInfoUrl =
function(coordinate, resolution, projection, params) {
ol.source.ImageWMS.prototype.getGetFeatureInfoUrl = function(coordinate, resolution, projection, params) {
goog.asserts.assert(!('VERSION' in params),
'key VERSION is not allowed in params');
@@ -185,8 +183,7 @@ ol.source.ImageWMS.prototype.getParams = function() {
/**
* @inheritDoc
*/
ol.source.ImageWMS.prototype.getImageInternal =
function(extent, resolution, pixelRatio, projection) {
ol.source.ImageWMS.prototype.getImageInternal = function(extent, resolution, pixelRatio, projection) {
if (this.url_ === undefined) {
return null;
@@ -271,17 +268,14 @@ ol.source.ImageWMS.prototype.getImageLoadFunction = function() {
* @return {string} Request URL.
* @private
*/
ol.source.ImageWMS.prototype.getRequestUrl_ =
function(extent, size, pixelRatio, projection, params) {
ol.source.ImageWMS.prototype.getRequestUrl_ = function(extent, size, pixelRatio, projection, params) {
goog.asserts.assert(this.url_ !== undefined, 'url is defined');
params[this.v13_ ? 'CRS' : 'SRS'] = projection.getCode();
if (!('STYLES' in this.params_)) {
/* jshint -W053 */
params['STYLES'] = new String('');
/* jshint +W053 */
}
if (pixelRatio != 1) {
-1
View File
@@ -6,7 +6,6 @@ goog.require('ol.source.OSM');
goog.require('ol.source.XYZ');
/**
* @classdesc
* Layer source for the MapQuest tile server.
-1
View File
@@ -4,7 +4,6 @@ goog.require('ol.Attribution');
goog.require('ol.source.XYZ');
/**
* @classdesc
* Layer source for the OpenStreetMap tile server.
+6 -9
View File
@@ -23,7 +23,6 @@ goog.require('ol.source.State');
goog.require('ol.source.Tile');
/**
* @classdesc
* A source that transforms data from any number of input sources using an array
@@ -78,7 +77,9 @@ ol.source.Raster = function(options) {
* @type {ol.TileQueue}
*/
this.tileQueue_ = new ol.TileQueue(
function() { return 1; },
function() {
return 1;
},
goog.bind(this.changed, this));
var layerStatesArray = ol.source.Raster.getLayerStatesArray_(this.renderers_);
@@ -167,8 +168,7 @@ ol.source.Raster.prototype.setOperation = function(operation, opt_lib) {
* @return {olx.FrameState} The updated frame state.
* @private
*/
ol.source.Raster.prototype.updateFrameState_ =
function(extent, resolution, projection) {
ol.source.Raster.prototype.updateFrameState_ = function(extent, resolution, projection) {
var frameState = /** @type {olx.FrameState} */ (
goog.object.clone(this.frameState_));
@@ -212,8 +212,7 @@ ol.source.Raster.prototype.isDirty_ = function(extent, resolution) {
/**
* @inheritDoc
*/
ol.source.Raster.prototype.getImage =
function(extent, resolution, pixelRatio, projection) {
ol.source.Raster.prototype.getImage = function(extent, resolution, pixelRatio, projection) {
if (!this.allSourcesReady_()) {
return null;
@@ -313,8 +312,7 @@ ol.source.Raster.prototype.composeFrame_ = function(frameState, callback) {
* @param {Object} data The user data.
* @private
*/
ol.source.Raster.prototype.onWorkerComplete_ =
function(frameState, callback, err, output, data) {
ol.source.Raster.prototype.onWorkerComplete_ = function(frameState, callback, err, output, data) {
if (err) {
callback(err);
return;
@@ -470,7 +468,6 @@ ol.source.Raster.createTileRenderer_ = function(source) {
ol.source.Raster.RenderedState;
/**
* @classdesc
* Events emitted by {@link ol.source.Raster} instances are instances of this
-1
View File
@@ -30,7 +30,6 @@ ol.source.State = {
ol.source.SourceOptions;
/**
* @classdesc
* Abstract base class; normally only used for creating subclasses and not
-1
View File
@@ -76,7 +76,6 @@ ol.source.StamenProviderConfig = {
};
/**
* @classdesc
* Layer source for the Stamen tile server.
+4 -9
View File
@@ -14,7 +14,6 @@ goog.require('ol.source.TileImage');
goog.require('ol.tilecoord');
/**
* @classdesc
* Layer source for tile data from ArcGIS Rest services. Map and Image
@@ -86,8 +85,7 @@ ol.source.TileArcGISRest.prototype.getParams = function() {
* @return {string|undefined} Request URL.
* @private
*/
ol.source.TileArcGISRest.prototype.getRequestUrl_ =
function(tileCoord, tileSize, tileExtent,
ol.source.TileArcGISRest.prototype.getRequestUrl_ = function(tileCoord, tileSize, tileExtent,
pixelRatio, projection, params) {
var urls = this.urls;
@@ -121,11 +119,9 @@ ol.source.TileArcGISRest.prototype.getRequestUrl_ =
// If a MapServer, use export. If an ImageServer, use exportImage.
if (goog.string.endsWith(url, 'MapServer/')) {
url = url + 'export';
}
else if (goog.string.endsWith(url, 'ImageServer/')) {
} else if (goog.string.endsWith(url, 'ImageServer/')) {
url = url + 'exportImage';
}
else {
} else {
goog.asserts.fail('Unknown Rest Service', url);
}
@@ -148,8 +144,7 @@ ol.source.TileArcGISRest.prototype.getTilePixelRatio = function(pixelRatio) {
* @return {string|undefined} Tile URL.
* @private
*/
ol.source.TileArcGISRest.prototype.tileUrlFunction_ =
function(tileCoord, pixelRatio, projection) {
ol.source.TileArcGISRest.prototype.tileUrlFunction_ = function(tileCoord, pixelRatio, projection) {
var tileGrid = this.getTileGrid();
if (!tileGrid) {
-2
View File
@@ -8,7 +8,6 @@ goog.require('ol.size');
goog.require('ol.source.Tile');
/**
* @constructor
* @extends {ol.Tile}
@@ -74,7 +73,6 @@ ol.DebugTile_.prototype.getImage = function(opt_context) {
};
/**
* @classdesc
* A pseudo tile source, which does not fetch tiles from a server, but renders
+4 -9
View File
@@ -12,7 +12,6 @@ goog.require('ol.reproj.Tile');
goog.require('ol.source.UrlTile');
/**
* @classdesc
* Base class for sources providing images divided into a tile grid.
@@ -186,8 +185,7 @@ ol.source.TileImage.prototype.getTileCacheForProjection = function(projection) {
* @return {ol.Tile} Tile.
* @private
*/
ol.source.TileImage.prototype.createTile_ =
function(z, x, y, pixelRatio, projection, key) {
ol.source.TileImage.prototype.createTile_ = function(z, x, y, pixelRatio, projection, key) {
var tileCoord = [z, x, y];
var urlTileCoord = this.getTileCoordForTileUrlFunction(
tileCoord, projection);
@@ -209,8 +207,7 @@ ol.source.TileImage.prototype.createTile_ =
/**
* @inheritDoc
*/
ol.source.TileImage.prototype.getTile =
function(z, x, y, pixelRatio, projection) {
ol.source.TileImage.prototype.getTile = function(z, x, y, pixelRatio, projection) {
if (!ol.ENABLE_RASTER_REPROJECTION ||
!this.getProjection() ||
!projection ||
@@ -253,8 +250,7 @@ ol.source.TileImage.prototype.getTile =
* @return {!ol.Tile} Tile.
* @protected
*/
ol.source.TileImage.prototype.getTileInternal =
function(z, x, y, pixelRatio, projection) {
ol.source.TileImage.prototype.getTileInternal = function(z, x, y, pixelRatio, projection) {
var /** @type {ol.Tile} */ tile = null;
var tileCoordKey = this.getKeyZXY(z, x, y);
var paramsKey = this.getKeyParams();
@@ -327,8 +323,7 @@ ol.source.TileImage.prototype.setRenderReprojectionEdges = function(render) {
* @param {ol.tilegrid.TileGrid} tilegrid Tile grid to use for the projection.
* @api
*/
ol.source.TileImage.prototype.setTileGridForProjection =
function(projection, tilegrid) {
ol.source.TileImage.prototype.setTileGridForProjection = function(projection, tilegrid) {
if (ol.ENABLE_RASTER_REPROJECTION) {
var proj = ol.proj.get(projection);
if (proj) {
-1
View File
@@ -22,7 +22,6 @@ goog.require('ol.source.State');
goog.require('ol.source.TileImage');
/**
* @classdesc
* Layer source for tile data in TileJSON format.
+3 -8
View File
@@ -32,7 +32,6 @@ goog.require('ol.tilegrid.TileGrid');
ol.source.TileOptions;
/**
* @classdesc
* Abstract base class; normally only used for creating subclasses and not
@@ -119,8 +118,7 @@ ol.source.Tile.prototype.expireCache = function(projection, usedTiles) {
* considered loaded.
* @return {boolean} The tile range is fully covered with loaded tiles.
*/
ol.source.Tile.prototype.forEachLoadedTile =
function(projection, z, tileRange, callback) {
ol.source.Tile.prototype.forEachLoadedTile = function(projection, z, tileRange, callback) {
var tileCache = this.getTileCacheForProjection(projection);
if (!tileCache) {
return false;
@@ -258,8 +256,7 @@ ol.source.Tile.prototype.getTilePixelRatio = function(pixelRatio) {
* @param {ol.proj.Projection} projection Projection.
* @return {ol.Size} Tile size.
*/
ol.source.Tile.prototype.getTilePixelSize =
function(z, pixelRatio, projection) {
ol.source.Tile.prototype.getTilePixelSize = function(z, pixelRatio, projection) {
var tileGrid = this.getTileGridForProjection(projection);
var tilePixelRatio = this.getTilePixelRatio(pixelRatio);
var tileSize = ol.size.toSize(tileGrid.getTileSize(z), this.tmpSize);
@@ -280,8 +277,7 @@ ol.source.Tile.prototype.getTilePixelSize =
* @return {ol.TileCoord} Tile coordinate to be passed to the tileUrlFunction or
* null if no tile URL should be created for the passed `tileCoord`.
*/
ol.source.Tile.prototype.getTileCoordForTileUrlFunction =
function(tileCoord, opt_projection) {
ol.source.Tile.prototype.getTileCoordForTileUrlFunction = function(tileCoord, opt_projection) {
var projection = opt_projection !== undefined ?
opt_projection : this.getProjection();
var tileGrid = this.getTileGridForProjection(projection);
@@ -303,7 +299,6 @@ ol.source.Tile.prototype.getTileCoordForTileUrlFunction =
ol.source.Tile.prototype.useTile = ol.nullFunction;
/**
* @classdesc
* Events emitted by {@link ol.source.Tile} instances are instances of this
+5 -10
View File
@@ -15,7 +15,6 @@ goog.require('ol.source.State');
goog.require('ol.source.Tile');
/**
* @classdesc
* Layer source for UTFGrid interaction data loaded from TileJSON format.
@@ -166,8 +165,7 @@ ol.source.TileUTFGrid.prototype.handleTileJSONResponse = function(tileJSON) {
/**
* @inheritDoc
*/
ol.source.TileUTFGrid.prototype.getTile =
function(z, x, y, pixelRatio, projection) {
ol.source.TileUTFGrid.prototype.getTile = function(z, x, y, pixelRatio, projection) {
var tileCoordKey = this.getKeyZXY(z, x, y);
if (this.tileCache.containsKey(tileCoordKey)) {
return /** @type {!ol.Tile} */ (this.tileCache.get(tileCoordKey));
@@ -200,7 +198,6 @@ ol.source.TileUTFGrid.prototype.useTile = function(z, x, y) {
};
/**
* @constructor
* @extends {ol.Tile}
@@ -211,8 +208,7 @@ ol.source.TileUTFGrid.prototype.useTile = function(z, x, y) {
* @param {boolean} preemptive Load the tile when visible (before it's needed).
* @private
*/
ol.source.TileUTFGridTile_ =
function(tileCoord, state, src, extent, preemptive) {
ol.source.TileUTFGridTile_ = function(tileCoord, state, src, extent, preemptive) {
goog.base(this, tileCoord, state);
@@ -269,7 +265,7 @@ ol.source.TileUTFGridTile_.prototype.getImage = function(opt_context) {
/**
* Synchronously returns data at given coordinate (if available).
* @param {ol.Coordinate} coordinate Coordinate.
* @return {Object}
* @return {Object} The data.
*/
ol.source.TileUTFGridTile_.prototype.getData = function(coordinate) {
if (!this.grid_ || !this.keys_ || !this.data_) {
@@ -309,8 +305,7 @@ ol.source.TileUTFGridTile_.prototype.getData = function(coordinate) {
* The tile data is requested if not yet loaded.
* @template T
*/
ol.source.TileUTFGridTile_.prototype.forDataAtCoordinate =
function(coordinate, callback, opt_this, opt_request) {
ol.source.TileUTFGridTile_.prototype.forDataAtCoordinate = function(coordinate, callback, opt_this, opt_request) {
if (this.state == ol.TileState.IDLE && opt_request === true) {
goog.events.listenOnce(this, goog.events.EventType.CHANGE, function(e) {
callback.call(opt_this, this.getData(coordinate));
@@ -346,7 +341,7 @@ ol.source.TileUTFGridTile_.prototype.handleError_ = function() {
/**
* @param {!UTFGridJSON} json
* @param {!UTFGridJSON} json UTFGrid data.
* @private
*/
ol.source.TileUTFGridTile_.prototype.handleLoad_ = function(json) {
+3 -9
View File
@@ -20,7 +20,6 @@ goog.require('ol.source.wms.ServerType');
goog.require('ol.tilecoord');
/**
* @classdesc
* Layer source for tile data from WMS servers.
@@ -117,8 +116,7 @@ goog.inherits(ol.source.TileWMS, ol.source.TileImage);
* @return {string|undefined} GetFeatureInfo URL.
* @api stable
*/
ol.source.TileWMS.prototype.getGetFeatureInfoUrl =
function(coordinate, resolution, projection, params) {
ol.source.TileWMS.prototype.getGetFeatureInfoUrl = function(coordinate, resolution, projection, params) {
goog.asserts.assert(!('VERSION' in params),
'key VERSION is not allowed in params');
@@ -207,8 +205,7 @@ ol.source.TileWMS.prototype.getParams = function() {
* @return {string|undefined} Request URL.
* @private
*/
ol.source.TileWMS.prototype.getRequestUrl_ =
function(tileCoord, tileSize, tileExtent,
ol.source.TileWMS.prototype.getRequestUrl_ = function(tileCoord, tileSize, tileExtent,
pixelRatio, projection, params) {
var urls = this.urls;
@@ -222,9 +219,7 @@ ol.source.TileWMS.prototype.getRequestUrl_ =
params[this.v13_ ? 'CRS' : 'SRS'] = projection.getCode();
if (!('STYLES' in this.params_)) {
/* jshint -W053 */
params['STYLES'] = new String('');
/* jshint +W053 */
}
if (pixelRatio != 1) {
@@ -312,8 +307,7 @@ ol.source.TileWMS.prototype.resetCoordKeyPrefix_ = function() {
* @return {string|undefined} Tile URL.
* @private
*/
ol.source.TileWMS.prototype.tileUrlFunction_ =
function(tileCoord, pixelRatio, projection) {
ol.source.TileWMS.prototype.tileUrlFunction_ = function(tileCoord, pixelRatio, projection) {
var tileGrid = this.getTileGrid();
if (!tileGrid) {
+2 -1
View File
@@ -28,7 +28,6 @@ goog.require('ol.source.TileEvent');
ol.source.UrlTileOptions;
/**
* @classdesc
* Base class for sources providing tiles divided into a tile grid over http.
@@ -143,6 +142,8 @@ ol.source.UrlTile.prototype.handleTileChange = function(event) {
this.dispatchEvent(
new ol.source.TileEvent(ol.source.TileEventType.TILELOADERROR, tile));
break;
default:
// pass
}
};
+11 -17
View File
@@ -63,7 +63,6 @@ ol.source.VectorEventType = {
};
/**
* @classdesc
* Provides a source of features for vector layers. Vector features provided
@@ -221,8 +220,8 @@ ol.source.Vector.prototype.addFeatureInternal = function(feature) {
/**
* @param {string} featureKey
* @param {ol.Feature} feature
* @param {string} featureKey Unique identifier for the feature.
* @param {ol.Feature} feature The feature.
* @private
*/
ol.source.Vector.prototype.setupChangeEvents_ = function(featureKey, feature) {
@@ -240,10 +239,10 @@ ol.source.Vector.prototype.setupChangeEvents_ = function(featureKey, feature) {
/**
* @param {string} featureKey
* @param {ol.Feature} feature
* @return {boolean} `true` if the feature is "valid", in the sense that it is
* also a candidate for insertion into the Rtree, otherwise `false`.
* @param {string} featureKey Unique identifier for the feature.
* @param {ol.Feature} feature The feature.
* @return {boolean} The feature is "valid", in the sense that it is also a
* candidate for insertion into the Rtree.
* @private
*/
ol.source.Vector.prototype.addToIndex_ = function(featureKey, feature) {
@@ -447,8 +446,7 @@ ol.source.Vector.prototype.forEachFeature = function(callback, opt_this) {
* @return {S|undefined} The return value from the last call to the callback.
* @template T,S
*/
ol.source.Vector.prototype.forEachFeatureAtCoordinateDirect =
function(coordinate, callback, opt_this) {
ol.source.Vector.prototype.forEachFeatureAtCoordinateDirect = function(coordinate, callback, opt_this) {
var extent = [coordinate[0], coordinate[1], coordinate[0], coordinate[1]];
return this.forEachFeatureInExtent(extent, function(feature) {
var geometry = feature.getGeometry();
@@ -483,8 +481,7 @@ ol.source.Vector.prototype.forEachFeatureAtCoordinateDirect =
* @template T,S
* @api
*/
ol.source.Vector.prototype.forEachFeatureInExtent =
function(extent, callback, opt_this) {
ol.source.Vector.prototype.forEachFeatureInExtent = function(extent, callback, opt_this) {
if (this.featuresRtree_) {
return this.featuresRtree_.forEachInExtent(extent, callback, opt_this);
} else if (this.featuresCollection_) {
@@ -510,8 +507,7 @@ ol.source.Vector.prototype.forEachFeatureInExtent =
* @template T,S
* @api
*/
ol.source.Vector.prototype.forEachFeatureIntersectingExtent =
function(extent, callback, opt_this) {
ol.source.Vector.prototype.forEachFeatureIntersectingExtent = function(extent, callback, opt_this) {
return this.forEachFeatureInExtent(extent,
/**
* @param {ol.Feature} feature Feature.
@@ -536,7 +532,7 @@ ol.source.Vector.prototype.forEachFeatureIntersectingExtent =
* Get the features collection associated with this source. Will be `null`
* unless the source was configured with `useSpatialIndex` set to `false`, or
* with an {@link ol.Collection} as `features`.
* @return {ol.Collection.<ol.Feature>}
* @return {ol.Collection.<ol.Feature>} The collection of features.
* @api
*/
ol.source.Vector.prototype.getFeaturesCollection = function() {
@@ -608,8 +604,7 @@ ol.source.Vector.prototype.getFeaturesInExtent = function(extent) {
* @return {ol.Feature} Closest feature.
* @api stable
*/
ol.source.Vector.prototype.getClosestFeatureToCoordinate =
function(coordinate) {
ol.source.Vector.prototype.getClosestFeatureToCoordinate = function(coordinate) {
// Find the closest feature using branch and bound. We start searching an
// infinite extent, and find the distance from the first feature found. This
// becomes the closest feature. We then compute a smaller extent which any
@@ -844,7 +839,6 @@ ol.source.Vector.prototype.removeFromIdIndex_ = function(feature) {
};
/**
* @classdesc
* Events emitted by {@link ol.source.Vector} instances are instances of this
+1 -3
View File
@@ -9,7 +9,6 @@ goog.require('ol.featureloader');
goog.require('ol.source.UrlTile');
/**
* @classdesc
* Class for layer sources providing vector data divided into a tile grid, to be
@@ -67,8 +66,7 @@ goog.inherits(ol.source.VectorTile, ol.source.UrlTile);
/**
* @inheritDoc
*/
ol.source.VectorTile.prototype.getTile =
function(z, x, y, pixelRatio, projection) {
ol.source.VectorTile.prototype.getTile = function(z, x, y, pixelRatio, projection) {
var tileCoordKey = this.getKeyZXY(z, x, y);
if (this.tileCache.containsKey(tileCoordKey)) {
return /** @type {!ol.Tile} */ (this.tileCache.get(tileCoordKey));
-1
View File
@@ -25,7 +25,6 @@ ol.source.WMTSRequestEncoding = {
};
/**
* @classdesc
* Layer source for tile data from WMTS servers.
-1
View File
@@ -3,7 +3,6 @@ goog.provide('ol.source.XYZ');
goog.require('ol.source.TileImage');
/**
* @classdesc
* Layer source for tile data with URLs in a set XYZ format that are
-2
View File
@@ -21,7 +21,6 @@ ol.source.ZoomifyTierSizeCalculation = {
};
/**
* @classdesc
* Layer source for tile data in Zoomify format.
@@ -134,7 +133,6 @@ ol.source.Zoomify = function(opt_options) {
goog.inherits(ol.source.Zoomify, ol.source.TileImage);
/**
* @constructor
* @extends {ol.ImageTile}