Remove remaining ol.foo notation from the source

This commit is contained in:
Tim Schaub
2018-05-07 21:00:03 -06:00
parent 34c1a6b9ba
commit 5b65336328
15 changed files with 34 additions and 30 deletions

View File

@@ -148,7 +148,7 @@ import Units from './proj/Units.js';
* during a rotation or resolution animation.
* @property {number} [duration=1000] The duration of the animation in milliseconds.
* @property {function(number):number} [easing] The easing function used
* during the animation (defaults to {@link ol.easing.inAndOut}).
* during the animation (defaults to {@link module:ol/easing~inAndOut}).
* The function will be called for each frame with a number representing a
* fraction of the animation's duration. The function should return a number
* between 0 and 1 representing the progress toward the destination state.

View File

@@ -21,7 +21,7 @@ import {appendParams} from '../uri.js';
* {@link https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image} for more detail.
* @property {boolean} [hidpi=true] Use the `ol/Map#pixelRatio` value when requesting the image from
* the remote server.
* @property {ol.ImageLoadFunctionType} [imageLoadFunction] Optional function to load an image given
* @property {module:ol/Image~LoadFunction} [imageLoadFunction] Optional function to load an image given
* a URL.
* @property {Object.<string,*>} params ArcGIS Rest parameters. This field is optional. Service
* defaults will be used for any fields not specified. `FORMAT` is `PNG32` by default. `F` is

View File

@@ -15,7 +15,7 @@ import {appendParams} from '../uri.js';
* @property {string} [url] The mapagent url.
* @property {number} [displayDpi=96] The display resolution.
* @property {number} [metersPerUnit=1] The meters-per-unit value.
* @property {boolean} [hidpi=true] Use the `ol.Map#pixelRatio` value when requesting
* @property {boolean} [hidpi=true] Use the `ol/Map#pixelRatio` value when requesting
* the image from the remote server.
* @property {boolean} [useOverlay] If `true`, will use `GETDYNAMICMAPOVERLAYIMAGE`.
* @property {module:ol/proj~ProjectionLike} projection Projection.
@@ -23,7 +23,7 @@ import {appendParams} from '../uri.js';
* twice the width and height of the map viewport, and so on. Must be `1` or higher.
* @property {Array.<number>} [resolutions] Resolutions.
* If specified, requests will be made for these resolutions only.
* @property {ol.ImageLoadFunctionType} [imageLoadFunction] Optional function to load an image given a URL.
* @property {module:ol/Image~LoadFunction} [imageLoadFunction] Optional function to load an image given a URL.
* @property {Object} [params] Additional parameters.
*/
@@ -232,7 +232,7 @@ ImageMapGuide.prototype.getUrl = function(baseUrl, params, extent, size, project
'OPERATION': this.useOverlay_ ? 'GETDYNAMICMAPOVERLAYIMAGE' : 'GETMAPIMAGE',
'VERSION': '2.0.0',
'LOCALE': 'en',
'CLIENTAGENT': 'ol.source.ImageMapGuide source',
'CLIENTAGENT': 'ol/source/ImageMapGuide source',
'CLIP': '1',
'SETDISPLAYDPI': this.displayDpi_,
'SETDISPLAYWIDTH': Math.round(size[0]),

View File

@@ -20,7 +20,7 @@ import ImageSource, {defaultImageLoadFunction} from '../source/Image.js';
* {@link https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image} for more detail.
* @property {module:ol/extent~Extent} [imageExtent] Extent of the image in map coordinates.
* This is the [left, bottom, right, top] map coordinates of your image.
* @property {ol.ImageLoadFunctionType} [imageLoadFunction] Optional function to load an image given a URL.
* @property {module:ol/Image~LoadFunction} [imageLoadFunction] Optional function to load an image given a URL.
* @property {module:ol/proj~ProjectionLike} projection Projection.
* @property {module:ol/size~Size} [imageSize] Size of the image in pixels. Usually the image size is auto-detected, so this
* only needs to be set if auto-detection fails for some reason.

View File

@@ -24,11 +24,11 @@ import {appendParams} from '../uri.js';
* you must provide a `crossOrigin` value if you are using the WebGL renderer or if you want to
* access pixel data with the Canvas renderer. See
* {@link https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image} for more detail.
* @property {boolean} [hidpi=true] Use the `ol.Map#pixelRatio` value when requesting
* @property {boolean} [hidpi=true] Use the `ol/Map#pixelRatio` value when requesting
* the image from the remote server.
* @property {module:ol/source/WMSServerType|string} [serverType] The type of
* the remote WMS server: `mapserver`, `geoserver` or `qgis`. Only needed if `hidpi` is `true`.
* @property {ol.ImageLoadFunctionType} [imageLoadFunction] Optional function to load an image given a URL.
* @property {module:ol/Image~LoadFunction} [imageLoadFunction] Optional function to load an image given a URL.
* @property {Object.<string,*>} params WMS request parameters.
* At least a `LAYERS` param is required. `STYLES` is
* `''` by default. `VERSION` is `1.3.0` by default. `WIDTH`, `HEIGHT`, `BBOX`

View File

@@ -72,7 +72,7 @@ const RasterOperationType = {
/**
* @classdesc
* Events emitted by {@link ol.source.Raster} instances are instances of this
* Events emitted by {@link module:ol/source/Raster} instances are instances of this
* type.
*
* @constructor
@@ -152,7 +152,7 @@ const RasterSource = function(options) {
/**
* @private
* @type {ol.source.RasterOperationType}
* @type {module:ol/source/RasterOperationType}
*/
this.operationType_ = options.operationType !== undefined ?
options.operationType : RasterOperationType.PIXEL;
@@ -328,7 +328,7 @@ RasterSource.prototype.getImage = function(extent, resolution, pixelRatio, proje
const frameState = this.updateFrameState_(extent, resolution, projection);
this.requestedFrameState_ = frameState;
// check if we can't reuse the existing ol.ImageCanvas
// check if we can't reuse the existing ol/ImageCanvas
if (this.renderedImageCanvas_) {
const renderedResolution = this.renderedImageCanvas_.getResolution();
const renderedExtent = this.renderedImageCanvas_.getExtent();

View File

@@ -26,12 +26,12 @@ import {appendParams} from '../uri.js';
* override the default service layer visibility. See
* {@link http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Export_Map/02r3000000v7000000/}
* for further reference.
* @property {ol.tilegrid.TileGrid} [tileGrid] Tile grid. Base this on the resolutions,
* @property {module:ol/tilegrid/TileGrid} [tileGrid] Tile grid. Base this on the resolutions,
* tilesize and extent supported by the server.
* If this is not defined, a default grid will be used: if there is a projection
* extent, the grid will be based on that; if not, a grid based on a global
* extent with origin at 0,0 will be used.
* @property {ol.ProjectionLike} projection Projection.
* @property {module:ol/proj~ProjectionLike} projection Projection.
* @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).
* Higher values can increase reprojection performance, but decrease precision.
* @property {module:ol/Tile~LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL.

View File

@@ -116,7 +116,7 @@ inherits(TileDebug, TileSource);
TileDebug.prototype.getTile = function(z, x, y) {
const tileCoordKey = getKeyZXY(z, x, y);
if (this.tileCache.containsKey(tileCoordKey)) {
return /** @type {!ol.source.LabeledTile} */ (this.tileCache.get(tileCoordKey));
return /** @type {!module:ol/source/LabeledTile} */ (this.tileCache.get(tileCoordKey));
} else {
const tileSize = toSize(this.tileGrid.getTileSize(z));
const tileCoord = [z, x, y];

View File

@@ -40,7 +40,7 @@ import {getForProjection as getTileGridForProjection} from '../tilegrid.js';
* service advertizes 256px by 256px tiles but actually sends 512px
* by 512px images (for retina/hidpi devices) then `tilePixelRatio`
* should be set to `2`.
* @property {ol.TileUrlFunctionType} [tileUrlFunction] Optional function to get tile URL given a tile coordinate and the projection.
* @property {module:ol/Tile~UrlFunction} [tileUrlFunction] Optional function to get tile URL given a tile coordinate and the projection.
* @property {string} [url] URL template. Must include `{x}`, `{y}` or `{-y}`, and `{z}` placeholders.
* A `{?-?}` template pattern, for example `subdomain{a-f}.domain.com`, may be
* used instead of defining each one separately in the `urls` option.

View File

@@ -384,7 +384,7 @@ UTFGrid.prototype.forDataAtCoordinateAndResolution = function(
if (this.tileGrid) {
const tileCoord = this.tileGrid.getTileCoordForCoordAndResolution(
coordinate, resolution);
const tile = /** @type {!ol.source.CustomTile} */(this.getTile(
const tile = /** @type {!module:ol/source/CustomTile} */(this.getTile(
tileCoord[0], tileCoord[1], tileCoord[2], 1, this.getProjection()));
tile.forDataAtCoordinate(coordinate, callback, null, opt_request);
} else {
@@ -408,7 +408,7 @@ UTFGrid.prototype.handleTileJSONError = function() {
/**
* TODO: very similar to ol.source.TileJSON#handleTileJSONResponse
* TODO: very similar to ol/source/TileJSON#handleTileJSONResponse
* @protected
* @param {TileJSON} tileJSON Tile JSON.
*/

View File

@@ -38,7 +38,7 @@ import {appendParams} from '../uri.js';
* "artifacts at tile edges" issues by properly configuring the WMS service. For
* example, MapServer has a `tile_map_edge_buffer` configuration parameter for
* this. See http://mapserver.org/output/tile_mode.html.
* @property {boolean} [hidpi=true] Use the `ol.Map#pixelRatio` value when requesting
* @property {boolean} [hidpi=true] Use the `ol/Map#pixelRatio` value when requesting
* the image from the remote server.
* @property {module:ol/proj~ProjectionLike} projection Projection.
* @property {boolean} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).

View File

@@ -24,7 +24,7 @@ import RBush from '../structs/RBush.js';
/**
* A function that takes an {@link module:ol/extent~Extent} and a resolution as arguments, and
* returns an array of {@link module:ol/extent~Extent} with the extents to load. Usually this
* is one of the standard {@link ol.loadingstrategy} strategies.
* is one of the standard {@link module:ol/loadingstrategy} strategies.
*
* @typedef {function(module:ol/extent~Extent, number): Array.<module:ol/extent~Extent>} LoadingStrategy
* @api
@@ -73,8 +73,12 @@ inherits(VectorSourceEvent, Event);
* Example:
*
* ```js
* var vectorSource = new VectorSource({
* format: new ol.format.GeoJSON(),
* import {Vector} from 'ol/source';
* import {GeoJSON} from 'ol/format';
* import {bbox} from 'ol/loadingstrategy';
*
* var vectorSource = new Vector({
* format: new GeoJSON(),
* loader: function(extent, resolution, projection) {
* var proj = projection.getCode();
* var url = 'https://ahocevar.com/geoserver/wfs?service=WFS&' +
@@ -97,7 +101,7 @@ inherits(VectorSourceEvent, Event);
* }
* xhr.send();
* },
* strategy: ol.loadingstrategy.bbox
* strategy: bbox
* });
* ```
* @property {boolean} [overlaps=true] This source may have overlapping geometries.
@@ -105,12 +109,12 @@ inherits(VectorSourceEvent, Event);
* boundaries or TopoJSON sources) allows the renderer to optimise fill and
* stroke operations.
* @property {module:ol/source/Vector~LoadingStrategy} [strategy] The loading strategy to use.
* By default an {@link ol.loadingstrategy.all}
* By default an {@link module:ol/loadingstrategy~all}
* strategy is used, a one-off strategy which loads all features at once.
* @property {string|module:ol/featureloader~FeatureUrlfunction} [url]
* Setting this option instructs the source to load features using an XHR loader
* (see {@link ol.featureloader.xhr}). Use a `string` and an
* {@link ol.loadingstrategy.all} for a one-off download of all features from
* (see {@link module:ol/featureloader~xhr}). Use a `string` and an
* {@link module:ol/loadingstrategy~all} for a one-off download of all features from
* the given URL. Use a {@link module:ol/featureloader~FeatureUrlfunction} to generate the url with
* other loading strategies.
* Requires `format` to be set as well.
@@ -233,7 +237,7 @@ const VectorSource = function(opt_options) {
this.idIndex_ = {};
/**
* A lookup of features without id (keyed by ol.getUid(feature)).
* A lookup of features without id (keyed by getUid(feature)).
* @private
* @type {!Object.<string, module:ol/Feature>}
*/

View File

@@ -29,7 +29,7 @@ export default {
/**
* Triggered when a feature is removed from the source.
* See {@link ol.source.Vector#clear source.clear()} for exceptions.
* See {@link module:ol/source/Vector#clear source.clear()} for exceptions.
* @event ol/source/Vector~VectorSourceEvent#removefeature
* @api
*/

View File

@@ -22,7 +22,7 @@ import {createXYZ, extentFromProjection, createForProjection} from '../tilegrid.
* @property {module:ol/proj~ProjectionLike} projection Projection.
* @property {module:ol/source/State~State} [state] Source state.
* @property {module:ol/VectorTile~TileClass} [tileClass] Class used to instantiate image tiles.
* Default is {@link ol.VectorTile}.
* Default is {@link module:ol/VectorTile}.
* @property {module:ol/tilegrid/TileGrid} [tileGrid] Tile grid.
* @property {module:ol/Tile~LoadFunction} [tileLoadFunction]
* Optional function to load a tile given a URL. Could look like this:
@@ -38,7 +38,7 @@ import {createXYZ, extentFromProjection, createForProjection} from '../tilegrid.
* }));
* };
* });
* @property {ol.TileUrlFunctionType} [tileUrlFunction] Optional function to get tile URL given a tile coordinate and the projection.
* @property {module:ol/Tile~UrlFunction} [tileUrlFunction] Optional function to get tile URL given a tile coordinate and the projection.
* @property {string} [url] URL template. Must include `{x}`, `{y}` or `{-y}`, and `{z}` placeholders.
* A `{?-?}` template pattern, for example `subdomain{a-f}.domain.com`, may be
* used instead of defining each one separately in the `urls` option.

View File

@@ -31,7 +31,7 @@ import {createXYZ, extentFromProjection} from '../tilegrid.js';
* by 512px images (for retina/hidpi devices) then `tilePixelRatio`
* should be set to `2`.
* @property {number|module:ol/size~Size} [tileSize=[256, 256]] The tile size used by the tile service.
* @property {ol.TileUrlFunctionType} [tileUrlFunction] Optional function to get
* @property {module:ol/Tile~UrlFunction} [tileUrlFunction] Optional function to get
* tile URL given a tile coordinate and the projection.
* Required if url or urls are not provided.
* @property {string} [url] URL template. Must include `{x}`, `{y}` or `{-y}`,