Remove extra imports in jsdoc
The symbols are already imported (es6 import)
This commit is contained in:
@@ -24,7 +24,7 @@ const Property = {
|
||||
export class CollectionEvent extends Event {
|
||||
|
||||
/**
|
||||
* @param {import("./CollectionEventType.js").default} type Type.
|
||||
* @param {CollectionEventType} type Type.
|
||||
* @param {*=} opt_element Element.
|
||||
*/
|
||||
constructor(type, opt_element) {
|
||||
|
||||
@@ -17,7 +17,7 @@ import Text from './style/Text.js';
|
||||
|
||||
|
||||
/**
|
||||
* @type {import("./style/Stroke.js").default}
|
||||
* @type {Stroke}
|
||||
* @private
|
||||
* @const
|
||||
*/
|
||||
@@ -36,7 +36,7 @@ const INTERVALS = [
|
||||
|
||||
/**
|
||||
* @typedef {Object} GraticuleLabelDataType
|
||||
* @property {import("./geom/Point.js").default} geom
|
||||
* @property {Point} geom
|
||||
* @property {string} text
|
||||
*/
|
||||
|
||||
@@ -50,7 +50,7 @@ const INTERVALS = [
|
||||
* appropriate for conformal projections like Spherical Mercator. If you
|
||||
* increase the value, more lines will be drawn and the drawing performance will
|
||||
* decrease.
|
||||
* @property {import("./style/Stroke.js").default} [strokeStyle='rgba(0,0,0,0.2)'] The
|
||||
* @property {Stroke} [strokeStyle='rgba(0,0,0,0.2)'] The
|
||||
* stroke style to use for drawing the graticule. If not provided, a not fully
|
||||
* opaque black will be used.
|
||||
* @property {number} [targetSize=100] The target size of the graticule cells,
|
||||
@@ -71,7 +71,7 @@ const INTERVALS = [
|
||||
* @property {number} [latLabelPosition=1] Latitude label position in fractions
|
||||
* (0..1) of view extent. 0 means at the left of the viewport, 1 means at the
|
||||
* right.
|
||||
* @property {import("./style/Text.js").default} [lonLabelStyle] Longitude label text
|
||||
* @property {Text} [lonLabelStyle] Longitude label text
|
||||
* style. If not provided, the following style will be used:
|
||||
* ```js
|
||||
* new Text({
|
||||
@@ -89,7 +89,7 @@ const INTERVALS = [
|
||||
* Note that the default's `textBaseline` configuration will not work well for
|
||||
* `lonLabelPosition` configurations that position labels close to the top of
|
||||
* the viewport.
|
||||
* @property {import("./style/Text.js").default} [latLabelStyle] Latitude label text style.
|
||||
* @property {Text} [latLabelStyle] Latitude label text style.
|
||||
* If not provided, the following style will be used:
|
||||
* ```js
|
||||
* new Text({
|
||||
@@ -200,19 +200,19 @@ class Graticule {
|
||||
this.maxLines_ = options.maxLines !== undefined ? options.maxLines : 100;
|
||||
|
||||
/**
|
||||
* @type {Array<import("./geom/LineString.js").default>}
|
||||
* @type {Array<LineString>}
|
||||
* @private
|
||||
*/
|
||||
this.meridians_ = [];
|
||||
|
||||
/**
|
||||
* @type {Array<import("./geom/LineString.js").default>}
|
||||
* @type {Array<LineString>}
|
||||
* @private
|
||||
*/
|
||||
this.parallels_ = [];
|
||||
|
||||
/**
|
||||
* @type {import("./style/Stroke.js").default}
|
||||
* @type {Stroke}
|
||||
* @private
|
||||
*/
|
||||
this.strokeStyle_ = options.strokeStyle !== undefined ? options.strokeStyle : DEFAULT_STROKE_STYLE;
|
||||
@@ -282,7 +282,7 @@ class Graticule {
|
||||
options.latLabelPosition;
|
||||
|
||||
/**
|
||||
* @type {import("./style/Text.js").default}
|
||||
* @type {Text}
|
||||
* @private
|
||||
*/
|
||||
this.lonLabelStyle_ = options.lonLabelStyle !== undefined ? options.lonLabelStyle :
|
||||
@@ -299,7 +299,7 @@ class Graticule {
|
||||
});
|
||||
|
||||
/**
|
||||
* @type {import("./style/Text.js").default}
|
||||
* @type {Text}
|
||||
* @private
|
||||
*/
|
||||
this.latLabelStyle_ = options.latLabelStyle !== undefined ? options.latLabelStyle :
|
||||
@@ -348,10 +348,10 @@ class Graticule {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {import("./geom/LineString.js").default} lineString Meridian
|
||||
* @param {LineString} lineString Meridian
|
||||
* @param {import("./extent.js").Extent} extent Extent.
|
||||
* @param {number} index Index.
|
||||
* @return {import("./geom/Point.js").default} Meridian point.
|
||||
* @return {Point} Meridian point.
|
||||
* @private
|
||||
*/
|
||||
getMeridianPoint_(lineString, extent, index) {
|
||||
@@ -398,10 +398,10 @@ class Graticule {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {import("./geom/LineString.js").default} lineString Parallels.
|
||||
* @param {LineString} lineString Parallels.
|
||||
* @param {import("./extent.js").Extent} extent Extent.
|
||||
* @param {number} index Index.
|
||||
* @return {import("./geom/Point.js").default} Parallel point.
|
||||
* @return {Point} Parallel point.
|
||||
* @private
|
||||
*/
|
||||
getParallelPoint_(lineString, extent, index) {
|
||||
@@ -561,7 +561,7 @@ class Graticule {
|
||||
* @param {number} minLat Minimal latitude.
|
||||
* @param {number} maxLat Maximal latitude.
|
||||
* @param {number} squaredTolerance Squared tolerance.
|
||||
* @return {import("./geom/LineString.js").default} The meridian line string.
|
||||
* @return {LineString} The meridian line string.
|
||||
* @param {number} index Index.
|
||||
* @private
|
||||
*/
|
||||
@@ -579,7 +579,7 @@ class Graticule {
|
||||
|
||||
/**
|
||||
* Get the list of meridians. Meridians are lines of equal longitude.
|
||||
* @return {Array<import("./geom/LineString.js").default>} The meridians.
|
||||
* @return {Array<LineString>} The meridians.
|
||||
* @api
|
||||
*/
|
||||
getMeridians() {
|
||||
@@ -591,7 +591,7 @@ class Graticule {
|
||||
* @param {number} minLon Minimal longitude.
|
||||
* @param {number} maxLon Maximal longitude.
|
||||
* @param {number} squaredTolerance Squared tolerance.
|
||||
* @return {import("./geom/LineString.js").default} The parallel line string.
|
||||
* @return {LineString} The parallel line string.
|
||||
* @param {number} index Index.
|
||||
* @private
|
||||
*/
|
||||
@@ -609,7 +609,7 @@ class Graticule {
|
||||
|
||||
/**
|
||||
* Get the list of parallels. Parallels are lines of equal latitude.
|
||||
* @return {Array<import("./geom/LineString.js").default>} The parallels.
|
||||
* @return {Array<LineString>} The parallels.
|
||||
* @api
|
||||
*/
|
||||
getParallels() {
|
||||
|
||||
@@ -64,7 +64,7 @@ class ImageWrapper extends ImageBase {
|
||||
|
||||
/**
|
||||
* @protected
|
||||
* @type {import("./ImageState.js").default}
|
||||
* @type {ImageState}
|
||||
*/
|
||||
this.state = ImageState.IDLE;
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import EventType from './events/EventType.js';
|
||||
|
||||
/**
|
||||
* @typedef {function(new: ImageTile, import("./tilecoord.js").TileCoord,
|
||||
* import("./TileState.js").default, string, ?string, import("./Tile.js").LoadFunction)} TileClass
|
||||
* TileState, string, ?string, import("./Tile.js").LoadFunction)} TileClass
|
||||
* @api
|
||||
*/
|
||||
|
||||
@@ -17,7 +17,7 @@ class ImageTile extends Tile {
|
||||
|
||||
/**
|
||||
* @param {import("./tilecoord.js").TileCoord} tileCoord Tile coordinate.
|
||||
* @param {import("./TileState.js").default} state State.
|
||||
* @param {TileState} state State.
|
||||
* @param {string} src Image source URI.
|
||||
* @param {?string} crossOrigin Cross origin.
|
||||
* @param {import("./Tile.js").LoadFunction} tileLoadFunction Tile load function.
|
||||
|
||||
@@ -22,7 +22,7 @@ import {containsExtent} from './extent.js';
|
||||
* shifts the overlay down.
|
||||
* @property {import("./coordinate.js").Coordinate} [position] The overlay position
|
||||
* in map projection.
|
||||
* @property {import("./OverlayPositioning.js").default} [positioning='top-left'] Defines how
|
||||
* @property {OverlayPositioning} [positioning='top-left'] Defines how
|
||||
* the overlay is actually positioned with respect to its `position` property.
|
||||
* Possible values are `'bottom-left'`, `'bottom-center'`, `'bottom-right'`,
|
||||
* `'center-left'`, `'center-center'`, `'center-right'`, `'top-left'`,
|
||||
@@ -205,7 +205,7 @@ class Overlay extends BaseObject {
|
||||
this.setOffset(options.offset !== undefined ? options.offset : [0, 0]);
|
||||
|
||||
this.setPositioning(options.positioning !== undefined ?
|
||||
/** @type {import("./OverlayPositioning.js").default} */ (options.positioning) :
|
||||
/** @type {OverlayPositioning} */ (options.positioning) :
|
||||
OverlayPositioning.TOP_LEFT);
|
||||
|
||||
if (options.position !== undefined) {
|
||||
@@ -271,14 +271,14 @@ class Overlay extends BaseObject {
|
||||
|
||||
/**
|
||||
* Get the current positioning of this overlay.
|
||||
* @return {import("./OverlayPositioning.js").default} How the overlay is positioned
|
||||
* @return {OverlayPositioning} How the overlay is positioned
|
||||
* relative to its point on the map.
|
||||
* @observable
|
||||
* @api
|
||||
*/
|
||||
getPositioning() {
|
||||
return (
|
||||
/** @type {import("./OverlayPositioning.js").default} */ (this.get(Property.POSITIONING))
|
||||
/** @type {OverlayPositioning} */ (this.get(Property.POSITIONING))
|
||||
);
|
||||
}
|
||||
|
||||
@@ -469,7 +469,7 @@ class Overlay extends BaseObject {
|
||||
|
||||
/**
|
||||
* Set the positioning for this overlay.
|
||||
* @param {import("./OverlayPositioning.js").default} positioning how the overlay is
|
||||
* @param {OverlayPositioning} positioning how the overlay is
|
||||
* positioned relative to its point on the map.
|
||||
* @observable
|
||||
* @api
|
||||
|
||||
@@ -25,7 +25,7 @@ class VectorImageTile extends Tile {
|
||||
|
||||
/**
|
||||
* @param {import("./tilecoord.js").TileCoord} tileCoord Tile coordinate.
|
||||
* @param {import("./TileState.js").default} state State.
|
||||
* @param {TileState} state State.
|
||||
* @param {number} sourceRevision Source revision.
|
||||
* @param {import("./format/Feature.js").default} format Feature format.
|
||||
* @param {import("./Tile.js").LoadFunction} tileLoadFunction Tile load function.
|
||||
@@ -36,7 +36,7 @@ class VectorImageTile extends Tile {
|
||||
* @param {Object<string, import("./VectorTile.js").default>} sourceTiles Source tiles.
|
||||
* @param {number} pixelRatio Pixel ratio.
|
||||
* @param {import("./proj/Projection.js").default} projection Projection.
|
||||
* @param {function(new: import("./VectorTile.js").default, import("./tilecoord.js").TileCoord, import("./TileState.js").default, string,
|
||||
* @param {function(new: import("./VectorTile.js").default, import("./tilecoord.js").TileCoord, TileState, string,
|
||||
* import("./format/Feature.js").default, import("./Tile.js").LoadFunction)} tileClass Class to
|
||||
* instantiate for source tiles.
|
||||
* @param {function(this: import("./source/VectorTile.js").default, import("./events/Event.js").default)} handleTileChange
|
||||
|
||||
@@ -974,7 +974,7 @@ class View extends BaseObject {
|
||||
* The size is pixel dimensions of the box to fit the extent into.
|
||||
* In most cases you will want to use the map size, that is `map.getSize()`.
|
||||
* Takes care of the map angle.
|
||||
* @param {import("./geom/SimpleGeometry.js").default|import("./extent.js").Extent} geometryOrExtent The geometry or
|
||||
* @param {SimpleGeometry|import("./extent.js").Extent} geometryOrExtent The geometry or
|
||||
* extent to fit the view to.
|
||||
* @param {FitOptions=} opt_options Options.
|
||||
* @api
|
||||
@@ -985,7 +985,7 @@ class View extends BaseObject {
|
||||
if (!size) {
|
||||
size = this.getSizeFromViewport_();
|
||||
}
|
||||
/** @type {import("./geom/SimpleGeometry.js").default} */
|
||||
/** @type {SimpleGeometry} */
|
||||
let geometry;
|
||||
if (!(geometryOrExtent instanceof SimpleGeometry)) {
|
||||
assert(Array.isArray(geometryOrExtent),
|
||||
@@ -1135,7 +1135,7 @@ class View extends BaseObject {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {import("./ViewHint.js").default} hint Hint.
|
||||
* @param {ViewHint} hint Hint.
|
||||
* @param {number} delta Delta.
|
||||
* @return {number} New value.
|
||||
*/
|
||||
|
||||
@@ -165,7 +165,7 @@ export function containsXY(extent, x, y) {
|
||||
* Get the relationship between a coordinate and extent.
|
||||
* @param {Extent} extent The extent.
|
||||
* @param {import("./coordinate.js").Coordinate} coordinate The coordinate.
|
||||
* @return {import("./extent/Relationship.js").default} The relationship (bitwise compare with
|
||||
* @return {Relationship} The relationship (bitwise compare with
|
||||
* import("./extent/Relationship.js").Relationship).
|
||||
*/
|
||||
export function coordinateRelationship(extent, coordinate) {
|
||||
@@ -478,7 +478,7 @@ export function getCenter(extent) {
|
||||
/**
|
||||
* Get a corner coordinate of an extent.
|
||||
* @param {Extent} extent Extent.
|
||||
* @param {import("./extent/Corner.js").default} corner Corner.
|
||||
* @param {Corner} corner Corner.
|
||||
* @return {import("./coordinate.js").Coordinate} Corner coordinate.
|
||||
*/
|
||||
export function getCorner(extent, corner) {
|
||||
|
||||
@@ -24,7 +24,7 @@ import Within from '../format/filter/Within.js';
|
||||
* Create a logical `<And>` operator between two or more filter conditions.
|
||||
*
|
||||
* @param {...import("./filter/Filter.js").default} conditions Filter conditions.
|
||||
* @returns {!import("./filter/And.js").default} `<And>` operator.
|
||||
* @returns {!And} `<And>` operator.
|
||||
* @api
|
||||
*/
|
||||
export function and(conditions) {
|
||||
@@ -37,7 +37,7 @@ export function and(conditions) {
|
||||
* Create a logical `<Or>` operator between two or more filter conditions.
|
||||
*
|
||||
* @param {...import("./filter/Filter.js").default} conditions Filter conditions.
|
||||
* @returns {!import("./filter/Or.js").default} `<Or>` operator.
|
||||
* @returns {!Or} `<Or>` operator.
|
||||
* @api
|
||||
*/
|
||||
export function or(conditions) {
|
||||
@@ -50,7 +50,7 @@ export function or(conditions) {
|
||||
* Represents a logical `<Not>` operator for a filter condition.
|
||||
*
|
||||
* @param {!import("./filter/Filter.js").default} condition Filter condition.
|
||||
* @returns {!import("./filter/Not.js").default} `<Not>` operator.
|
||||
* @returns {!Not} `<Not>` operator.
|
||||
* @api
|
||||
*/
|
||||
export function not(condition) {
|
||||
@@ -66,7 +66,7 @@ export function not(condition) {
|
||||
* @param {!import("../extent.js").Extent} extent Extent.
|
||||
* @param {string=} opt_srsName SRS name. No srsName attribute will be
|
||||
* set on geometries when this is not provided.
|
||||
* @returns {!import("./filter/Bbox.js").default} `<BBOX>` operator.
|
||||
* @returns {!Bbox} `<BBOX>` operator.
|
||||
* @api
|
||||
*/
|
||||
export function bbox(geometryName, extent, opt_srsName) {
|
||||
@@ -81,7 +81,7 @@ export function bbox(geometryName, extent, opt_srsName) {
|
||||
* @param {!import("../geom/Geometry.js").default} geometry Geometry.
|
||||
* @param {string=} opt_srsName SRS name. No srsName attribute will be
|
||||
* set on geometries when this is not provided.
|
||||
* @returns {!import("./filter/Contains.js").default} `<Contains>` operator.
|
||||
* @returns {!Contains} `<Contains>` operator.
|
||||
* @api
|
||||
*/
|
||||
export function contains(geometryName, geometry, opt_srsName) {
|
||||
@@ -96,7 +96,7 @@ export function contains(geometryName, geometry, opt_srsName) {
|
||||
* @param {!import("../geom/Geometry.js").default} geometry Geometry.
|
||||
* @param {string=} opt_srsName SRS name. No srsName attribute will be
|
||||
* set on geometries when this is not provided.
|
||||
* @returns {!import("./filter/Intersects.js").default} `<Intersects>` operator.
|
||||
* @returns {!Intersects} `<Intersects>` operator.
|
||||
* @api
|
||||
*/
|
||||
export function intersects(geometryName, geometry, opt_srsName) {
|
||||
@@ -111,7 +111,7 @@ export function intersects(geometryName, geometry, opt_srsName) {
|
||||
* @param {!import("../geom/Geometry.js").default} geometry Geometry.
|
||||
* @param {string=} opt_srsName SRS name. No srsName attribute will be
|
||||
* set on geometries when this is not provided.
|
||||
* @returns {!import("./filter/Within.js").default} `<Within>` operator.
|
||||
* @returns {!Within} `<Within>` operator.
|
||||
* @api
|
||||
*/
|
||||
export function within(geometryName, geometry, opt_srsName) {
|
||||
@@ -125,7 +125,7 @@ export function within(geometryName, geometry, opt_srsName) {
|
||||
* @param {!string} propertyName Name of the context property to compare.
|
||||
* @param {!(string|number)} expression The value to compare.
|
||||
* @param {boolean=} opt_matchCase Case-sensitive?
|
||||
* @returns {!import("./filter/EqualTo.js").default} `<PropertyIsEqualTo>` operator.
|
||||
* @returns {!EqualTo} `<PropertyIsEqualTo>` operator.
|
||||
* @api
|
||||
*/
|
||||
export function equalTo(propertyName, expression, opt_matchCase) {
|
||||
@@ -139,7 +139,7 @@ export function equalTo(propertyName, expression, opt_matchCase) {
|
||||
* @param {!string} propertyName Name of the context property to compare.
|
||||
* @param {!(string|number)} expression The value to compare.
|
||||
* @param {boolean=} opt_matchCase Case-sensitive?
|
||||
* @returns {!import("./filter/NotEqualTo.js").default} `<PropertyIsNotEqualTo>` operator.
|
||||
* @returns {!NotEqualTo} `<PropertyIsNotEqualTo>` operator.
|
||||
* @api
|
||||
*/
|
||||
export function notEqualTo(propertyName, expression, opt_matchCase) {
|
||||
@@ -152,7 +152,7 @@ export function notEqualTo(propertyName, expression, opt_matchCase) {
|
||||
*
|
||||
* @param {!string} propertyName Name of the context property to compare.
|
||||
* @param {!number} expression The value to compare.
|
||||
* @returns {!import("./filter/LessThan.js").default} `<PropertyIsLessThan>` operator.
|
||||
* @returns {!LessThan} `<PropertyIsLessThan>` operator.
|
||||
* @api
|
||||
*/
|
||||
export function lessThan(propertyName, expression) {
|
||||
@@ -165,7 +165,7 @@ export function lessThan(propertyName, expression) {
|
||||
*
|
||||
* @param {!string} propertyName Name of the context property to compare.
|
||||
* @param {!number} expression The value to compare.
|
||||
* @returns {!import("./filter/LessThanOrEqualTo.js").default} `<PropertyIsLessThanOrEqualTo>` operator.
|
||||
* @returns {!LessThanOrEqualTo} `<PropertyIsLessThanOrEqualTo>` operator.
|
||||
* @api
|
||||
*/
|
||||
export function lessThanOrEqualTo(propertyName, expression) {
|
||||
@@ -178,7 +178,7 @@ export function lessThanOrEqualTo(propertyName, expression) {
|
||||
*
|
||||
* @param {!string} propertyName Name of the context property to compare.
|
||||
* @param {!number} expression The value to compare.
|
||||
* @returns {!import("./filter/GreaterThan.js").default} `<PropertyIsGreaterThan>` operator.
|
||||
* @returns {!GreaterThan} `<PropertyIsGreaterThan>` operator.
|
||||
* @api
|
||||
*/
|
||||
export function greaterThan(propertyName, expression) {
|
||||
@@ -191,7 +191,7 @@ export function greaterThan(propertyName, expression) {
|
||||
*
|
||||
* @param {!string} propertyName Name of the context property to compare.
|
||||
* @param {!number} expression The value to compare.
|
||||
* @returns {!import("./filter/GreaterThanOrEqualTo.js").default} `<PropertyIsGreaterThanOrEqualTo>` operator.
|
||||
* @returns {!GreaterThanOrEqualTo} `<PropertyIsGreaterThanOrEqualTo>` operator.
|
||||
* @api
|
||||
*/
|
||||
export function greaterThanOrEqualTo(propertyName, expression) {
|
||||
@@ -204,7 +204,7 @@ export function greaterThanOrEqualTo(propertyName, expression) {
|
||||
* is null.
|
||||
*
|
||||
* @param {!string} propertyName Name of the context property to compare.
|
||||
* @returns {!import("./filter/IsNull.js").default} `<PropertyIsNull>` operator.
|
||||
* @returns {!IsNull} `<PropertyIsNull>` operator.
|
||||
* @api
|
||||
*/
|
||||
export function isNull(propertyName) {
|
||||
@@ -219,7 +219,7 @@ export function isNull(propertyName) {
|
||||
* @param {!string} propertyName Name of the context property to compare.
|
||||
* @param {!number} lowerBoundary The lower bound of the range.
|
||||
* @param {!number} upperBoundary The upper bound of the range.
|
||||
* @returns {!import("./filter/IsBetween.js").default} `<PropertyIsBetween>` operator.
|
||||
* @returns {!IsBetween} `<PropertyIsBetween>` operator.
|
||||
* @api
|
||||
*/
|
||||
export function between(propertyName, lowerBoundary, upperBoundary) {
|
||||
@@ -240,7 +240,7 @@ export function between(propertyName, lowerBoundary, upperBoundary) {
|
||||
* @param {string=} opt_escapeChar Escape character which can be used to escape
|
||||
* the pattern characters. Default is '!'.
|
||||
* @param {boolean=} opt_matchCase Case-sensitive?
|
||||
* @returns {!import("./filter/IsLike.js").default} `<PropertyIsLike>` operator.
|
||||
* @returns {!IsLike} `<PropertyIsLike>` operator.
|
||||
* @api
|
||||
*/
|
||||
export function like(propertyName, pattern,
|
||||
@@ -256,7 +256,7 @@ export function like(propertyName, pattern,
|
||||
* @param {!string} propertyName Name of the context property to compare.
|
||||
* @param {!string} begin The begin date in ISO-8601 format.
|
||||
* @param {!string} end The end date in ISO-8601 format.
|
||||
* @returns {!import("./filter/During.js").default} `<During>` operator.
|
||||
* @returns {!During} `<During>` operator.
|
||||
* @api
|
||||
*/
|
||||
export function during(propertyName, begin, end) {
|
||||
|
||||
@@ -67,7 +67,7 @@ import {add as addTransformFunc, clear as clearTransformFuncs, get as getTransfo
|
||||
/**
|
||||
* A projection as {@link module:ol/proj/Projection}, SRS identifier
|
||||
* string or undefined.
|
||||
* @typedef {import("./proj/Projection.js").default|string|undefined} ProjectionLike
|
||||
* @typedef {Projection|string|undefined} ProjectionLike
|
||||
* @api
|
||||
*/
|
||||
|
||||
@@ -129,7 +129,7 @@ export function identityTransform(input, opt_output, opt_dimension) {
|
||||
* Add a Projection object to the list of supported projections that can be
|
||||
* looked up by their code.
|
||||
*
|
||||
* @param {import("./proj/Projection.js").default} projection Projection instance.
|
||||
* @param {Projection} projection Projection instance.
|
||||
* @api
|
||||
*/
|
||||
export function addProjection(projection) {
|
||||
@@ -139,7 +139,7 @@ export function addProjection(projection) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {Array<import("./proj/Projection.js").default>} projections Projections.
|
||||
* @param {Array<Projection>} projections Projections.
|
||||
*/
|
||||
export function addProjections(projections) {
|
||||
projections.forEach(addProjection);
|
||||
@@ -152,13 +152,13 @@ export function addProjections(projections) {
|
||||
* @param {ProjectionLike} projectionLike Either a code string which is
|
||||
* a combination of authority and identifier such as "EPSG:4326", or an
|
||||
* existing projection object, or undefined.
|
||||
* @return {import("./proj/Projection.js").default} Projection object, or null if not in list.
|
||||
* @return {Projection} Projection object, or null if not in list.
|
||||
* @api
|
||||
*/
|
||||
export function get(projectionLike) {
|
||||
return typeof projectionLike === 'string' ?
|
||||
projections.get(/** @type {string} */ (projectionLike)) :
|
||||
(/** @type {import("./proj/Projection.js").default} */ (projectionLike) || null);
|
||||
(/** @type {Projection} */ (projectionLike) || null);
|
||||
}
|
||||
|
||||
|
||||
@@ -177,7 +177,7 @@ export function get(projectionLike) {
|
||||
* @param {ProjectionLike} projection The projection.
|
||||
* @param {number} resolution Nominal resolution in projection units.
|
||||
* @param {import("./coordinate.js").Coordinate} point Point to find adjusted resolution at.
|
||||
* @param {import("./proj/Units.js").default=} opt_units Units to get the point resolution in.
|
||||
* @param {Units=} opt_units Units to get the point resolution in.
|
||||
* Default is the projection's units.
|
||||
* @return {number} Point resolution.
|
||||
* @api
|
||||
@@ -223,7 +223,7 @@ export function getPointResolution(projection, resolution, point, opt_units) {
|
||||
* Registers transformation functions that don't alter coordinates. Those allow
|
||||
* to transform between projections with equal meaning.
|
||||
*
|
||||
* @param {Array<import("./proj/Projection.js").default>} projections Projections.
|
||||
* @param {Array<Projection>} projections Projections.
|
||||
* @api
|
||||
*/
|
||||
export function addEquivalentProjections(projections) {
|
||||
@@ -242,9 +242,9 @@ export function addEquivalentProjections(projections) {
|
||||
* Registers transformation functions to convert coordinates in any projection
|
||||
* in projection1 to any projection in projection2.
|
||||
*
|
||||
* @param {Array<import("./proj/Projection.js").default>} projections1 Projections with equal
|
||||
* @param {Array<Projection>} projections1 Projections with equal
|
||||
* meaning.
|
||||
* @param {Array<import("./proj/Projection.js").default>} projections2 Projections with equal
|
||||
* @param {Array<Projection>} projections2 Projections with equal
|
||||
* meaning.
|
||||
* @param {TransformFunction} forwardTransform Transformation from any
|
||||
* projection in projection1 to any projection in projection2.
|
||||
@@ -271,9 +271,9 @@ export function clearAllProjections() {
|
||||
|
||||
|
||||
/**
|
||||
* @param {import("./proj/Projection.js").default|string|undefined} projection Projection.
|
||||
* @param {Projection|string|undefined} projection Projection.
|
||||
* @param {string} defaultCode Default code.
|
||||
* @return {import("./proj/Projection.js").default} Projection.
|
||||
* @return {Projection} Projection.
|
||||
*/
|
||||
export function createProjection(projection, defaultCode) {
|
||||
if (!projection) {
|
||||
@@ -282,7 +282,7 @@ export function createProjection(projection, defaultCode) {
|
||||
return get(projection);
|
||||
} else {
|
||||
return (
|
||||
/** @type {import("./proj/Projection.js").default} */ (projection)
|
||||
/** @type {Projection} */ (projection)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -387,8 +387,8 @@ export function toLonLat(coordinate, opt_projection) {
|
||||
* projection does represent the same geographic point as the same coordinate in
|
||||
* the other projection.
|
||||
*
|
||||
* @param {import("./proj/Projection.js").default} projection1 Projection 1.
|
||||
* @param {import("./proj/Projection.js").default} projection2 Projection 2.
|
||||
* @param {Projection} projection1 Projection 1.
|
||||
* @param {Projection} projection2 Projection 2.
|
||||
* @return {boolean} Equivalent.
|
||||
* @api
|
||||
*/
|
||||
@@ -410,8 +410,8 @@ export function equivalent(projection1, projection2) {
|
||||
* Searches in the list of transform functions for the function for converting
|
||||
* coordinates from the source projection to the destination projection.
|
||||
*
|
||||
* @param {import("./proj/Projection.js").default} sourceProjection Source Projection object.
|
||||
* @param {import("./proj/Projection.js").default} destinationProjection Destination Projection
|
||||
* @param {Projection} sourceProjection Source Projection object.
|
||||
* @param {Projection} destinationProjection Destination Projection
|
||||
* object.
|
||||
* @return {TransformFunction} Transform function.
|
||||
*/
|
||||
@@ -483,8 +483,8 @@ export function transformExtent(extent, source, destination) {
|
||||
* Transforms the given point to the destination projection.
|
||||
*
|
||||
* @param {import("./coordinate.js").Coordinate} point Point.
|
||||
* @param {import("./proj/Projection.js").default} sourceProjection Source projection.
|
||||
* @param {import("./proj/Projection.js").default} destinationProjection Destination projection.
|
||||
* @param {Projection} sourceProjection Source projection.
|
||||
* @param {Projection} destinationProjection Destination projection.
|
||||
* @return {import("./coordinate.js").Coordinate} Point.
|
||||
*/
|
||||
export function transformWithProjections(point, sourceProjection, destinationProjection) {
|
||||
|
||||
@@ -60,7 +60,7 @@ import CanvasImmediateRenderer from './render/canvas/Immediate.js';
|
||||
*
|
||||
* @param {CanvasRenderingContext2D} context Canvas context.
|
||||
* @param {ToContextOptions=} opt_options Options.
|
||||
* @return {import("./render/canvas/Immediate.js").default} Canvas Immediate.
|
||||
* @return {CanvasImmediateRenderer} Canvas Immediate.
|
||||
* @api
|
||||
*/
|
||||
export function toContext(context, opt_options) {
|
||||
|
||||
@@ -163,7 +163,7 @@ export const defaultLineWidth = 1;
|
||||
/**
|
||||
* The label cache for text rendering. To change the default cache size of 2048
|
||||
* entries, use {@link module:ol/structs/LRUCache#setSize}.
|
||||
* @type {import("../structs/LRUCache.js").default<HTMLCanvasElement>}
|
||||
* @type {LRUCache<HTMLCanvasElement>}
|
||||
* @api
|
||||
*/
|
||||
export const labelCache = new LRUCache();
|
||||
|
||||
@@ -589,7 +589,7 @@ class CanvasReplay extends VectorContext {
|
||||
let x, y;
|
||||
while (i < ii) {
|
||||
const instruction = instructions[i];
|
||||
const type = /** @type {import("./Instruction.js").default} */ (instruction[0]);
|
||||
const type = /** @type {CanvasInstruction} */ (instruction[0]);
|
||||
switch (type) {
|
||||
case CanvasInstruction.BEGIN_GEOMETRY:
|
||||
feature = /** @type {import("../../Feature.js").default|import("../Feature.js").default} */ (instruction[1]);
|
||||
@@ -903,7 +903,7 @@ class CanvasReplay extends VectorContext {
|
||||
let begin = -1;
|
||||
for (i = 0; i < n; ++i) {
|
||||
instruction = hitDetectionInstructions[i];
|
||||
type = /** @type {import("./Instruction.js").default} */ (instruction[0]);
|
||||
type = /** @type {CanvasInstruction} */ (instruction[0]);
|
||||
if (type == CanvasInstruction.END_GEOMETRY) {
|
||||
begin = i;
|
||||
} else if (type == CanvasInstruction.BEGIN_GEOMETRY) {
|
||||
|
||||
@@ -19,8 +19,8 @@ import {create as createTransform, compose as composeTransform} from '../../tran
|
||||
|
||||
|
||||
/**
|
||||
* @type {Object<import("../ReplayType.js").default,
|
||||
* function(new: import("./Replay.js").default, number, import("../../extent.js").Extent,
|
||||
* @type {Object<ReplayType,
|
||||
* function(new: CanvasReplay, number, import("../../extent.js").Extent,
|
||||
* number, number, boolean, Array<import("../canvas.js").DeclutterGroup>)>}
|
||||
*/
|
||||
const BATCH_CONSTRUCTORS = {
|
||||
@@ -104,7 +104,7 @@ class CanvasReplayGroup extends ReplayGroup {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {!Object<string, !Object<import("../ReplayType.js").default, import("./Replay.js").default>>}
|
||||
* @type {!Object<string, !Object<ReplayType, CanvasReplay>>}
|
||||
*/
|
||||
this.replaysByZIndex_ = {};
|
||||
|
||||
@@ -154,7 +154,7 @@ class CanvasReplayGroup extends ReplayGroup {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Array<import("../ReplayType.js").default>} replays Replays.
|
||||
* @param {Array<ReplayType>} replays Replays.
|
||||
* @return {boolean} Has replays of the provided types.
|
||||
*/
|
||||
hasReplays(replays) {
|
||||
@@ -335,7 +335,7 @@ class CanvasReplayGroup extends ReplayGroup {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {Object<string, Object<import("../ReplayType.js").default, import("./Replay.js").default>>} Replays.
|
||||
* @return {Object<string, Object<ReplayType, CanvasReplay>>} Replays.
|
||||
*/
|
||||
getReplays() {
|
||||
return this.replaysByZIndex_;
|
||||
@@ -354,7 +354,7 @@ class CanvasReplayGroup extends ReplayGroup {
|
||||
* @param {number} viewRotation View rotation.
|
||||
* @param {Object<string, boolean>} skippedFeaturesHash Ids of features to skip.
|
||||
* @param {boolean} snapToPixel Snap point symbols and test to integer pixel.
|
||||
* @param {Array<import("../ReplayType.js").default>=} opt_replayTypes Ordered replay types to replay.
|
||||
* @param {Array<ReplayType>=} opt_replayTypes Ordered replay types to replay.
|
||||
* Default is {@link module:ol/render/replay~ORDER}
|
||||
* @param {Object<string, import("../canvas.js").DeclutterGroup>=} opt_declutterReplays Declutter replays.
|
||||
*/
|
||||
|
||||
@@ -12,7 +12,7 @@ import TileGrid from './tilegrid/TileGrid.js';
|
||||
|
||||
/**
|
||||
* @param {import("./proj/Projection.js").default} projection Projection.
|
||||
* @return {!import("./tilegrid/TileGrid.js").default} Default tile grid for the
|
||||
* @return {!TileGrid} Default tile grid for the
|
||||
* passed projection.
|
||||
*/
|
||||
export function getForProjection(projection) {
|
||||
@@ -26,7 +26,7 @@ export function getForProjection(projection) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {import("./tilegrid/TileGrid.js").default} tileGrid Tile grid.
|
||||
* @param {TileGrid} tileGrid Tile grid.
|
||||
* @param {import("./tilecoord.js").TileCoord} tileCoord Tile coordinate.
|
||||
* @param {import("./proj/Projection.js").default} projection Projection.
|
||||
* @return {import("./tilecoord.js").TileCoord} Tile coordinate.
|
||||
@@ -52,8 +52,8 @@ export function wrapX(tileGrid, tileCoord, projection) {
|
||||
* DEFAULT_MAX_ZOOM).
|
||||
* @param {number|import("./size.js").Size=} opt_tileSize Tile size (default uses
|
||||
* DEFAULT_TILE_SIZE).
|
||||
* @param {import("./extent/Corner.js").default=} opt_corner Extent corner (default is `'top-left'`).
|
||||
* @return {!import("./tilegrid/TileGrid.js").default} TileGrid instance.
|
||||
* @param {Corner=} opt_corner Extent corner (default is `'top-left'`).
|
||||
* @return {!TileGrid} TileGrid instance.
|
||||
*/
|
||||
export function createForExtent(extent, opt_maxZoom, opt_tileSize, opt_corner) {
|
||||
const corner = opt_corner !== undefined ? opt_corner : Corner.TOP_LEFT;
|
||||
@@ -84,7 +84,7 @@ export function createForExtent(extent, opt_maxZoom, opt_tileSize, opt_corner) {
|
||||
/**
|
||||
* Creates a tile grid with a standard XYZ tiling scheme.
|
||||
* @param {XYZOptions=} opt_options Tile grid options.
|
||||
* @return {!import("./tilegrid/TileGrid.js").default} Tile grid instance.
|
||||
* @return {!TileGrid} Tile grid instance.
|
||||
* @api
|
||||
*/
|
||||
export function createXYZ(opt_options) {
|
||||
@@ -144,8 +144,8 @@ function resolutionsFromExtent(extent, opt_maxZoom, opt_tileSize) {
|
||||
* DEFAULT_MAX_ZOOM).
|
||||
* @param {number|import("./size.js").Size=} opt_tileSize Tile size (default uses
|
||||
* DEFAULT_TILE_SIZE).
|
||||
* @param {import("./extent/Corner.js").default=} opt_corner Extent corner (default is `'top-left'`).
|
||||
* @return {!import("./tilegrid/TileGrid.js").default} TileGrid instance.
|
||||
* @param {Corner=} opt_corner Extent corner (default is `'top-left'`).
|
||||
* @return {!TileGrid} TileGrid instance.
|
||||
*/
|
||||
export function createForProjection(projection, opt_maxZoom, opt_tileSize, opt_corner) {
|
||||
const extent = extentFromProjection(projection);
|
||||
|
||||
Reference in New Issue
Block a user