Use imports for enum types
This commit is contained in:
@@ -21,7 +21,7 @@ const Property = {
|
||||
*/
|
||||
export class CollectionEvent extends Event {
|
||||
/**
|
||||
* @param {CollectionEventType} type Type.
|
||||
* @param {import("./CollectionEventType.js").default} type Type.
|
||||
* @param {*=} opt_element Element.
|
||||
* @param {number=} opt_index The index of the added or removed element.
|
||||
*/
|
||||
|
||||
@@ -68,7 +68,7 @@ class ImageWrapper extends ImageBase {
|
||||
|
||||
/**
|
||||
* @protected
|
||||
* @type {ImageState}
|
||||
* @type {import("./ImageState.js").default}
|
||||
*/
|
||||
this.state = ImageState.IDLE;
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import {listenImage} from './Image.js';
|
||||
class ImageTile extends Tile {
|
||||
/**
|
||||
* @param {import("./tilecoord.js").TileCoord} tileCoord Tile coordinate.
|
||||
* @param {TileState} state State.
|
||||
* @param {import("./TileState.js").default} state State.
|
||||
* @param {string} src Image source URI.
|
||||
* @param {?string} crossOrigin Cross origin.
|
||||
* @param {import("./Tile.js").LoadFunction} tileLoadFunction Tile load function.
|
||||
|
||||
@@ -21,7 +21,7 @@ import {outerHeight, outerWidth, removeChildren, removeNode} from './dom.js';
|
||||
* shifts the overlay down.
|
||||
* @property {import("./coordinate.js").Coordinate} [position] The overlay position
|
||||
* in map projection.
|
||||
* @property {OverlayPositioning} [positioning='top-left'] Defines how
|
||||
* @property {import("./OverlayPositioning.js").default} [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'`,
|
||||
@@ -204,7 +204,7 @@ class Overlay extends BaseObject {
|
||||
|
||||
this.setPositioning(
|
||||
options.positioning !== undefined
|
||||
? /** @type {OverlayPositioning} */ (options.positioning)
|
||||
? /** @type {import("./OverlayPositioning.js").default} */ (options.positioning)
|
||||
: OverlayPositioning.TOP_LEFT
|
||||
);
|
||||
|
||||
@@ -270,13 +270,13 @@ class Overlay extends BaseObject {
|
||||
|
||||
/**
|
||||
* Get the current positioning of this overlay.
|
||||
* @return {OverlayPositioning} How the overlay is positioned
|
||||
* @return {import("./OverlayPositioning.js").default} How the overlay is positioned
|
||||
* relative to its point on the map.
|
||||
* @observable
|
||||
* @api
|
||||
*/
|
||||
getPositioning() {
|
||||
return /** @type {OverlayPositioning} */ (this.get(Property.POSITIONING));
|
||||
return /** @type {import("./OverlayPositioning.js").default} */ (this.get(Property.POSITIONING));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -481,7 +481,7 @@ class Overlay extends BaseObject {
|
||||
|
||||
/**
|
||||
* Set the positioning for this overlay.
|
||||
* @param {OverlayPositioning} positioning how the overlay is
|
||||
* @param {import("./OverlayPositioning.js").default} positioning how the overlay is
|
||||
* positioned relative to its point on the map.
|
||||
* @observable
|
||||
* @api
|
||||
|
||||
@@ -75,7 +75,7 @@ import {easeIn} from './easing.js';
|
||||
class Tile extends EventTarget {
|
||||
/**
|
||||
* @param {import("./tilecoord.js").TileCoord} tileCoord Tile coordinate.
|
||||
* @param {TileState} state State.
|
||||
* @param {import("./TileState.js").default} state State.
|
||||
* @param {Options=} opt_options Tile options.
|
||||
*/
|
||||
constructor(tileCoord, state, opt_options) {
|
||||
@@ -90,7 +90,7 @@ class Tile extends EventTarget {
|
||||
|
||||
/**
|
||||
* @protected
|
||||
* @type {TileState}
|
||||
* @type {import("./TileState.js").default}
|
||||
*/
|
||||
this.state = state;
|
||||
|
||||
@@ -227,7 +227,7 @@ class Tile extends EventTarget {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {TileState} State.
|
||||
* @return {import("./TileState.js").default} State.
|
||||
*/
|
||||
getState() {
|
||||
return this.state;
|
||||
@@ -238,7 +238,7 @@ class Tile extends EventTarget {
|
||||
* it is important to set the state correctly to {@link module:ol/TileState~ERROR}
|
||||
* when the tile cannot be loaded. Otherwise the tile cannot be removed from
|
||||
* the tile queue and will block other requests.
|
||||
* @param {TileState} state State.
|
||||
* @param {import("./TileState.js").default} state State.
|
||||
* @api
|
||||
*/
|
||||
setState(state) {
|
||||
|
||||
@@ -7,7 +7,7 @@ import TileState from './TileState.js';
|
||||
class VectorTile extends Tile {
|
||||
/**
|
||||
* @param {import("./tilecoord.js").TileCoord} tileCoord Tile coordinate.
|
||||
* @param {TileState} state State.
|
||||
* @param {import("./TileState.js").default} state State.
|
||||
* @param {string} src Data source url.
|
||||
* @param {import("./format/Feature.js").default} format Feature format.
|
||||
* @param {import("./Tile.js").LoadFunction} tileLoadFunction Tile load function.
|
||||
|
||||
@@ -1481,7 +1481,7 @@ class View extends BaseObject {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {ViewHint} hint Hint.
|
||||
* @param {import("./ViewHint.js").default} hint Hint.
|
||||
* @param {number} delta Delta.
|
||||
* @return {number} New value.
|
||||
*/
|
||||
|
||||
@@ -47,7 +47,7 @@ const DEFAULT_DPI = 25.4 / 0.28;
|
||||
* should be re-rendered. This is called in a `requestAnimationFrame` callback.
|
||||
* @property {HTMLElement|string} [target] Specify a target if you want the control
|
||||
* to be rendered outside of the map's viewport.
|
||||
* @property {Units|string} [units='metric'] Units.
|
||||
* @property {import("./ScaleLine.js").Units|string} [units='metric'] Units.
|
||||
* @property {boolean} [bar=false] Render scalebars instead of a line.
|
||||
* @property {number} [steps=4] Number of steps the scalebar should use. Use even numbers
|
||||
* for best results. Only applies when `bar` is `true`.
|
||||
@@ -165,7 +165,7 @@ class ScaleLine extends Control {
|
||||
|
||||
/**
|
||||
* Return the units to use in the scale line.
|
||||
* @return {Units} The units
|
||||
* @return {import("./ScaleLine.js").Units} The units
|
||||
* to use in the scale line.
|
||||
* @observable
|
||||
* @api
|
||||
@@ -183,7 +183,7 @@ class ScaleLine extends Control {
|
||||
|
||||
/**
|
||||
* Set the units to use in the scale line.
|
||||
* @param {Units} units The units to use in the scale line.
|
||||
* @param {import("./ScaleLine.js").Units} units The units to use in the scale line.
|
||||
* @observable
|
||||
* @api
|
||||
*/
|
||||
|
||||
@@ -160,7 +160,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 {Relationship} The relationship (bitwise compare with
|
||||
* @return {import("./extent/Relationship.js").default} The relationship (bitwise compare with
|
||||
* import("./extent/Relationship.js").Relationship).
|
||||
*/
|
||||
export function coordinateRelationship(extent, coordinate) {
|
||||
@@ -484,7 +484,7 @@ export function getCenter(extent) {
|
||||
/**
|
||||
* Get a corner coordinate of an extent.
|
||||
* @param {Extent} extent Extent.
|
||||
* @param {Corner} corner Corner.
|
||||
* @param {import("./extent/Corner.js").default} corner Corner.
|
||||
* @return {import("./coordinate.js").Coordinate} Corner coordinate.
|
||||
*/
|
||||
export function getCorner(extent, corner) {
|
||||
|
||||
@@ -558,7 +558,7 @@ function appendCoordinate(flatCoordinates, layoutOptions, node, values) {
|
||||
* @param {LayoutOptions} layoutOptions Layout options.
|
||||
* @param {Array<number>} flatCoordinates Flat coordinates.
|
||||
* @param {Array<number>=} ends Ends.
|
||||
* @return {GeometryLayout} Layout.
|
||||
* @return {import("../geom/GeometryLayout.js").default} Layout.
|
||||
*/
|
||||
function applyLayoutOptions(layoutOptions, flatCoordinates, ends) {
|
||||
let layout = GeometryLayout.XY;
|
||||
|
||||
@@ -57,10 +57,10 @@ import {transformGeometryWithOptions} from './Feature.js';
|
||||
/**
|
||||
* @typedef {Object} Vec2
|
||||
* @property {number} x
|
||||
* @property {IconAnchorUnits} xunits
|
||||
* @property {import("../style/IconAnchorUnits").default} xunits
|
||||
* @property {number} y
|
||||
* @property {IconAnchorUnits} yunits
|
||||
* @property {IconOrigin} origin
|
||||
* @property {import("../style/IconAnchorUnits").default} yunits
|
||||
* @property {import("../style/IconOrigin.js").default} origin
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -96,7 +96,7 @@ const SCHEMA_LOCATION =
|
||||
'https://developers.google.com/kml/schema/kml22gx.xsd';
|
||||
|
||||
/**
|
||||
* @type {Object<string, IconAnchorUnits>}
|
||||
* @type {Object<string, import("../style/IconAnchorUnits").default>}
|
||||
*/
|
||||
const ICON_ANCHOR_UNITS_MAP = {
|
||||
'fraction': IconAnchorUnits.FRACTION,
|
||||
@@ -212,12 +212,12 @@ export function getDefaultFillStyle() {
|
||||
let DEFAULT_IMAGE_STYLE_ANCHOR;
|
||||
|
||||
/**
|
||||
* @type {IconAnchorUnits}
|
||||
* @type {import("../style/IconAnchorUnits").default}
|
||||
*/
|
||||
let DEFAULT_IMAGE_STYLE_ANCHOR_X_UNITS;
|
||||
|
||||
/**
|
||||
* @type {IconAnchorUnits}
|
||||
* @type {import("../style/IconAnchorUnits").default}
|
||||
*/
|
||||
let DEFAULT_IMAGE_STYLE_ANCHOR_Y_UNITS;
|
||||
|
||||
|
||||
@@ -421,10 +421,10 @@ function readRawFeature(pbf, layer, i) {
|
||||
* @param {number} type The raw feature's geometry type
|
||||
* @param {number} numEnds Number of ends of the flat coordinates of the
|
||||
* geometry.
|
||||
* @return {GeometryType} The geometry type.
|
||||
* @return {import("../geom/GeometryType.js").default} The geometry type.
|
||||
*/
|
||||
function getGeometryType(type, numEnds) {
|
||||
/** @type {GeometryType} */
|
||||
/** @type {import("../geom/GeometryType.js").default} */
|
||||
let geometryType;
|
||||
if (type === 1) {
|
||||
geometryType =
|
||||
|
||||
@@ -55,7 +55,7 @@ class Polyline extends TextFeature {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {GeometryLayout}
|
||||
* @type {import("../geom/GeometryLayout").default}
|
||||
*/
|
||||
this.geometryLayout_ = options.geometryLayout
|
||||
? options.geometryLayout
|
||||
|
||||
@@ -16,7 +16,7 @@ import {transformGeometryWithOptions} from './Feature.js';
|
||||
|
||||
/**
|
||||
* Geometry constructors
|
||||
* @enum {function (new:import("../geom/Geometry.js").default, Array, GeometryLayout)}
|
||||
* @enum {function (new:import("../geom/Geometry.js").default, Array, import("../geom/GeometryLayout.js").default)}
|
||||
*/
|
||||
const GeometryConstructor = {
|
||||
'POINT': Point,
|
||||
@@ -241,7 +241,7 @@ class Parser {
|
||||
this.token_;
|
||||
|
||||
/**
|
||||
* @type {GeometryLayout}
|
||||
* @type {import("../geom/GeometryLayout.js").default}
|
||||
* @private
|
||||
*/
|
||||
this.layout_ = GeometryLayout.XY;
|
||||
@@ -290,7 +290,7 @@ class Parser {
|
||||
|
||||
/**
|
||||
* Try to parse the dimensional info.
|
||||
* @return {GeometryLayout} The layout.
|
||||
* @return {import("../geom/GeometryLayout.js").default} The layout.
|
||||
* @private
|
||||
*/
|
||||
parseGeometryLayout_() {
|
||||
|
||||
@@ -25,7 +25,7 @@ class LineString extends SimpleGeometry {
|
||||
/**
|
||||
* @param {Array<import("../coordinate.js").Coordinate>|Array<number>} coordinates Coordinates.
|
||||
* For internal use, flat coordinates in combination with `opt_layout` are also accepted.
|
||||
* @param {GeometryLayout=} opt_layout Layout.
|
||||
* @param {import("./GeometryLayout.js").default=} opt_layout Layout.
|
||||
*/
|
||||
constructor(coordinates, opt_layout) {
|
||||
super();
|
||||
@@ -287,7 +287,7 @@ class LineString extends SimpleGeometry {
|
||||
/**
|
||||
* Set the coordinates of the linestring.
|
||||
* @param {!Array<import("../coordinate.js").Coordinate>} coordinates Coordinates.
|
||||
* @param {GeometryLayout=} opt_layout Layout.
|
||||
* @param {import("./GeometryLayout.js").default=} opt_layout Layout.
|
||||
* @api
|
||||
*/
|
||||
setCoordinates(coordinates, opt_layout) {
|
||||
|
||||
@@ -22,7 +22,7 @@ class LinearRing extends SimpleGeometry {
|
||||
/**
|
||||
* @param {Array<import("../coordinate.js").Coordinate>|Array<number>} coordinates Coordinates.
|
||||
* For internal use, flat coordinates in combination with `opt_layout` are also accepted.
|
||||
* @param {GeometryLayout=} opt_layout Layout.
|
||||
* @param {import("./GeometryLayout.js").default=} opt_layout Layout.
|
||||
*/
|
||||
constructor(coordinates, opt_layout) {
|
||||
super();
|
||||
@@ -167,7 +167,7 @@ class LinearRing extends SimpleGeometry {
|
||||
/**
|
||||
* Set the coordinates of the linear ring.
|
||||
* @param {!Array<import("../coordinate.js").Coordinate>} coordinates Coordinates.
|
||||
* @param {GeometryLayout=} opt_layout Layout.
|
||||
* @param {import("./GeometryLayout.js").default=} opt_layout Layout.
|
||||
* @api
|
||||
*/
|
||||
setCoordinates(coordinates, opt_layout) {
|
||||
|
||||
@@ -28,7 +28,7 @@ class MultiLineString extends SimpleGeometry {
|
||||
* @param {Array<Array<import("../coordinate.js").Coordinate>|LineString>|Array<number>} coordinates
|
||||
* Coordinates or LineString geometries. (For internal use, flat coordinates in
|
||||
* combination with `opt_layout` and `opt_ends` are also accepted.)
|
||||
* @param {GeometryLayout=} opt_layout Layout.
|
||||
* @param {import("./GeometryLayout.js").default=} opt_layout Layout.
|
||||
* @param {Array<number>=} opt_ends Flat coordinate ends for internal use.
|
||||
*/
|
||||
constructor(coordinates, opt_layout, opt_ends) {
|
||||
|
||||
@@ -35,7 +35,7 @@ class MultiPolygon extends SimpleGeometry {
|
||||
/**
|
||||
* @param {Array<Array<Array<import("../coordinate.js").Coordinate>>|Polygon>|Array<number>} coordinates Coordinates.
|
||||
* For internal use, flat coordinates in combination with `opt_layout` and `opt_endss` are also accepted.
|
||||
* @param {GeometryLayout=} opt_layout Layout.
|
||||
* @param {import("./GeometryLayout.js").default=} opt_layout Layout.
|
||||
* @param {Array<Array<number>>=} opt_endss Array of ends for internal use with flat coordinates.
|
||||
*/
|
||||
constructor(coordinates, opt_layout, opt_endss) {
|
||||
@@ -446,7 +446,7 @@ class MultiPolygon extends SimpleGeometry {
|
||||
/**
|
||||
* Set the coordinates of the multipolygon.
|
||||
* @param {!Array<Array<Array<import("../coordinate.js").Coordinate>>>} coordinates Coordinates.
|
||||
* @param {GeometryLayout=} opt_layout Layout.
|
||||
* @param {import("./GeometryLayout.js").default=} opt_layout Layout.
|
||||
* @api
|
||||
*/
|
||||
setCoordinates(coordinates, opt_layout) {
|
||||
|
||||
@@ -35,7 +35,7 @@ class Polygon extends SimpleGeometry {
|
||||
* an array of vertices' coordinates where the first coordinate and the last are
|
||||
* equivalent. (For internal use, flat coordinates in combination with
|
||||
* `opt_layout` and `opt_ends` are also accepted.)
|
||||
* @param {GeometryLayout=} opt_layout Layout.
|
||||
* @param {import("./GeometryLayout.js").default=} opt_layout Layout.
|
||||
* @param {Array<number>=} opt_ends Ends (for internal use with flat coordinates).
|
||||
*/
|
||||
constructor(coordinates, opt_layout, opt_ends) {
|
||||
@@ -385,7 +385,7 @@ class Polygon extends SimpleGeometry {
|
||||
/**
|
||||
* Set the coordinates of the polygon.
|
||||
* @param {!Array<Array<import("../coordinate.js").Coordinate>>} coordinates Coordinates.
|
||||
* @param {GeometryLayout=} opt_layout Layout.
|
||||
* @param {import("./GeometryLayout.js").default=} opt_layout Layout.
|
||||
* @api
|
||||
*/
|
||||
setCoordinates(coordinates, opt_layout) {
|
||||
|
||||
@@ -21,7 +21,7 @@ class SimpleGeometry extends Geometry {
|
||||
|
||||
/**
|
||||
* @protected
|
||||
* @type {GeometryLayout}
|
||||
* @type {import("./GeometryLayout.js").default}
|
||||
*/
|
||||
this.layout = GeometryLayout.XY;
|
||||
|
||||
@@ -90,7 +90,7 @@ class SimpleGeometry extends Geometry {
|
||||
|
||||
/**
|
||||
* Return the {@link module:ol/geom/GeometryLayout layout} of the geometry.
|
||||
* @return {GeometryLayout} Layout.
|
||||
* @return {import("./GeometryLayout.js").default} Layout.
|
||||
* @api
|
||||
*/
|
||||
getLayout() {
|
||||
@@ -152,7 +152,7 @@ class SimpleGeometry extends Geometry {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {GeometryLayout} layout Layout.
|
||||
* @param {import("./GeometryLayout.js").default} layout Layout.
|
||||
* @param {Array<number>} flatCoordinates Flat coordinates.
|
||||
*/
|
||||
setFlatCoordinates(layout, flatCoordinates) {
|
||||
@@ -164,14 +164,14 @@ class SimpleGeometry extends Geometry {
|
||||
/**
|
||||
* @abstract
|
||||
* @param {!Array<*>} coordinates Coordinates.
|
||||
* @param {GeometryLayout=} opt_layout Layout.
|
||||
* @param {import("./GeometryLayout.js").default=} opt_layout Layout.
|
||||
*/
|
||||
setCoordinates(coordinates, opt_layout) {
|
||||
abstract();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {GeometryLayout|undefined} layout Layout.
|
||||
* @param {import("./GeometryLayout.js").default|undefined} layout Layout.
|
||||
* @param {Array<*>} coordinates Coordinates.
|
||||
* @param {number} nesting Nesting.
|
||||
* @protected
|
||||
@@ -300,7 +300,7 @@ class SimpleGeometry extends Geometry {
|
||||
|
||||
/**
|
||||
* @param {number} stride Stride.
|
||||
* @return {GeometryLayout} layout Layout.
|
||||
* @return {import("./GeometryLayout.js").default} layout Layout.
|
||||
*/
|
||||
function getLayoutForStride(stride) {
|
||||
let layout;
|
||||
@@ -311,11 +311,11 @@ function getLayoutForStride(stride) {
|
||||
} else if (stride == 4) {
|
||||
layout = GeometryLayout.XYZM;
|
||||
}
|
||||
return /** @type {GeometryLayout} */ (layout);
|
||||
return /** @type {import("./GeometryLayout.js").default} */ (layout);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {GeometryLayout} layout Layout.
|
||||
* @param {import("./GeometryLayout.js").default} layout Layout.
|
||||
* @return {number} Stride.
|
||||
*/
|
||||
export function getStrideForLayout(layout) {
|
||||
|
||||
@@ -34,7 +34,7 @@ import {squaredDistance as squaredCoordinateDistance} from '../coordinate.js';
|
||||
|
||||
/**
|
||||
* @typedef {Object} Options
|
||||
* @property {GeometryType} type Geometry type of
|
||||
* @property {import("../geom/GeometryType.js").default} type Geometry type of
|
||||
* the geometries being drawn with this instance.
|
||||
* @property {number} [clickTolerance=6] The maximum distance in pixels between
|
||||
* "down" and "up" for a "up" event to be considered a "click" event and
|
||||
@@ -244,10 +244,10 @@ class Draw extends PointerInteraction {
|
||||
|
||||
/**
|
||||
* Geometry type.
|
||||
* @type {GeometryType}
|
||||
* @type {import("../geom/GeometryType.js").default}
|
||||
* @private
|
||||
*/
|
||||
this.type_ = /** @type {GeometryType} */ (options.type);
|
||||
this.type_ = /** @type {import("../geom/GeometryType.js").default} */ (options.type);
|
||||
|
||||
/**
|
||||
* Drawing mode (derived from geometry type.
|
||||
@@ -1166,7 +1166,7 @@ export function createBox() {
|
||||
/**
|
||||
* Get the drawing mode. The mode for mult-part geometries is the same as for
|
||||
* their single-part cousins.
|
||||
* @param {GeometryType} type Geometry type.
|
||||
* @param {import("../geom/GeometryType.js").default} type Geometry type.
|
||||
* @return {Mode} Drawing mode.
|
||||
*/
|
||||
function getMode(type) {
|
||||
|
||||
@@ -46,7 +46,7 @@ import {listen, unlistenByKey} from '../events.js';
|
||||
* @typedef {Object} State
|
||||
* @property {import("./Layer.js").default} layer
|
||||
* @property {number} opacity Opacity, the value is rounded to two digits to appear after the decimal point.
|
||||
* @property {SourceState} sourceState
|
||||
* @property {import("../source/State.js").default} sourceState
|
||||
* @property {boolean} visible
|
||||
* @property {boolean} managed
|
||||
* @property {import("../extent.js").Extent} [extent]
|
||||
|
||||
@@ -104,7 +104,7 @@ class VectorTileLayer extends BaseVectorLayer {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {VectorTileRenderType}
|
||||
* @type {import("./VectorTileRenderType.js").default}
|
||||
*/
|
||||
this.renderMode_ = renderMode;
|
||||
|
||||
@@ -144,7 +144,7 @@ class VectorTileLayer extends BaseVectorLayer {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {VectorTileRenderType} The render mode.
|
||||
* @return {import("./VectorTileRenderType.js").default} The render mode.
|
||||
*/
|
||||
getRenderMode() {
|
||||
return this.renderMode_;
|
||||
|
||||
@@ -181,7 +181,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 {Units=} opt_units Units to get the point resolution in.
|
||||
* @param {import("./proj/Units.js").default=} opt_units Units to get the point resolution in.
|
||||
* Default is the projection's units.
|
||||
* @return {number} Point resolution.
|
||||
* @api
|
||||
|
||||
@@ -34,7 +34,7 @@ const tmpTransform = createTransform();
|
||||
*/
|
||||
class RenderFeature {
|
||||
/**
|
||||
* @param {GeometryType} type Geometry type.
|
||||
* @param {import("../geom/GeometryType.js").default} type Geometry type.
|
||||
* @param {Array<number>} flatCoordinates Flat coordinates. These always need
|
||||
* to be right-handed for polygons.
|
||||
* @param {Array<number>|Array<Array<number>>} ends Ends or Endss.
|
||||
@@ -56,7 +56,7 @@ class RenderFeature {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {GeometryType}
|
||||
* @type {import("../geom/GeometryType.js").default}
|
||||
*/
|
||||
this.type_ = type;
|
||||
|
||||
@@ -267,7 +267,7 @@ class RenderFeature {
|
||||
|
||||
/**
|
||||
* Get the type of this feature's geometry.
|
||||
* @return {GeometryType} Geometry type.
|
||||
* @return {import("../geom/GeometryType.js").default} Geometry type.
|
||||
* @api
|
||||
*/
|
||||
getType() {
|
||||
|
||||
@@ -370,7 +370,7 @@ class CanvasBuilder extends VectorContext {
|
||||
let begin = -1;
|
||||
for (i = 0; i < n; ++i) {
|
||||
instruction = hitDetectionInstructions[i];
|
||||
type = /** @type {CanvasInstruction} */ (instruction[0]);
|
||||
type = /** @type {import("./Instruction.js").default} */ (instruction[0]);
|
||||
if (type == CanvasInstruction.END_GEOMETRY) {
|
||||
begin = i;
|
||||
} else if (type == CanvasInstruction.BEGIN_GEOMETRY) {
|
||||
|
||||
@@ -669,7 +669,7 @@ class Executor {
|
||||
let x, y;
|
||||
while (i < ii) {
|
||||
const instruction = instructions[i];
|
||||
const type = /** @type {CanvasInstruction} */ (instruction[0]);
|
||||
const type = /** @type {import("./Instruction.js").default} */ (instruction[0]);
|
||||
switch (type) {
|
||||
case CanvasInstruction.BEGIN_GEOMETRY:
|
||||
feature = /** @type {import("../../Feature.js").FeatureLike} */ (instruction[1]);
|
||||
|
||||
@@ -16,7 +16,7 @@ import {transform2D} from '../../geom/flat/transform.js';
|
||||
|
||||
/**
|
||||
* @const
|
||||
* @type {Array<BuilderType>}
|
||||
* @type {Array<import("./BuilderType.js").default>}
|
||||
*/
|
||||
const ORDER = [
|
||||
BuilderType.POLYGON,
|
||||
@@ -36,7 +36,7 @@ class ExecutorGroup {
|
||||
* @param {number} resolution Resolution.
|
||||
* @param {number} pixelRatio Pixel ratio.
|
||||
* @param {boolean} overlaps The executor group can have overlapping geometries.
|
||||
* @param {!Object<string, !Object<BuilderType, import("./Builder.js").SerializableInstructions>>} allInstructions
|
||||
* @param {!Object<string, !Object<import("./BuilderType.js").default, import("./Builder.js").SerializableInstructions>>} allInstructions
|
||||
* The serializable instructions.
|
||||
* @param {number=} opt_renderBuffer Optional rendering buffer.
|
||||
*/
|
||||
@@ -80,7 +80,7 @@ class ExecutorGroup {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {!Object<string, !Object<BuilderType, import("./Executor").default>>}
|
||||
* @type {!Object<string, !Object<import("./BuilderType.js").default, import("./Executor").default>>}
|
||||
*/
|
||||
this.executorsByZIndex_ = {};
|
||||
|
||||
@@ -116,7 +116,7 @@ class ExecutorGroup {
|
||||
/**
|
||||
* Create executors and populate them using the provided instructions.
|
||||
* @private
|
||||
* @param {!Object<string, !Object<BuilderType, import("./Builder.js").SerializableInstructions>>} allInstructions The serializable instructions
|
||||
* @param {!Object<string, !Object<import("./BuilderType.js").default, import("./Builder.js").SerializableInstructions>>} allInstructions The serializable instructions
|
||||
*/
|
||||
createExecutors_(allInstructions) {
|
||||
for (const zIndex in allInstructions) {
|
||||
@@ -139,7 +139,7 @@ class ExecutorGroup {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Array<BuilderType>} executors Executors.
|
||||
* @param {Array<import("./BuilderType.js").default>} executors Executors.
|
||||
* @return {boolean} Has executors of the provided types.
|
||||
*/
|
||||
hasExecutors(executors) {
|
||||
@@ -313,7 +313,7 @@ class ExecutorGroup {
|
||||
* @param {import("../../transform.js").Transform} transform Transform.
|
||||
* @param {number} viewRotation View rotation.
|
||||
* @param {boolean} snapToPixel Snap point symbols and test to integer pixel.
|
||||
* @param {Array<BuilderType>=} opt_builderTypes Ordered replay types to replay.
|
||||
* @param {Array<import("./BuilderType.js").default>=} opt_builderTypes Ordered replay types to replay.
|
||||
* Default is {@link module:ol/render/replay~ORDER}
|
||||
* @param {Object<string, import("../canvas.js").DeclutterGroup>=} opt_declutterReplays Declutter replays.
|
||||
*/
|
||||
|
||||
@@ -41,7 +41,7 @@ import {toSize} from '../size.js';
|
||||
* @property {number} [transition]
|
||||
* @property {string} [url] Base URL of the IIIF Image service.
|
||||
* This should be the same as the IIIF Image ID.
|
||||
* @property {Versions} [version=Versions.VERSION2] Service's IIIF Image API version.
|
||||
* @property {import("../format/IIIFInfo.js").Versions} [version=Versions.VERSION2] Service's IIIF Image API version.
|
||||
* @property {number} [zDirection=0] Indicate which resolution should be used
|
||||
* by a renderer if the view resolution does not match any resolution of the tile source.
|
||||
* If 0, the nearest resolution will be used. If 1, the nearest lower resolution
|
||||
|
||||
@@ -29,7 +29,7 @@ import {get as getProjection} from '../proj.js';
|
||||
* @property {AttributionLike} [attributions]
|
||||
* @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.
|
||||
* @property {import("../proj.js").ProjectionLike} [projection] Projection. Default is the view projection.
|
||||
* @property {SourceState} [state='ready']
|
||||
* @property {import("./State.js").default} [state='ready']
|
||||
* @property {boolean} [wrapX=false]
|
||||
*/
|
||||
|
||||
@@ -80,7 +80,7 @@ class Source extends BaseObject {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {SourceState}
|
||||
* @type {import("./State.js").default}
|
||||
*/
|
||||
this.state_ =
|
||||
options.state !== undefined ? options.state : SourceState.READY;
|
||||
@@ -126,7 +126,7 @@ class Source extends BaseObject {
|
||||
|
||||
/**
|
||||
* Get the state of the source, see {@link module:ol/source/State~State} for possible states.
|
||||
* @return {SourceState} State.
|
||||
* @return {import("./State.js").default} State.
|
||||
* @api
|
||||
*/
|
||||
getState() {
|
||||
@@ -162,7 +162,7 @@ class Source extends BaseObject {
|
||||
|
||||
/**
|
||||
* Set the state of the source.
|
||||
* @param {SourceState} state State.
|
||||
* @param {import("./State.js").default} state State.
|
||||
* @protected
|
||||
*/
|
||||
setState(state) {
|
||||
|
||||
@@ -26,7 +26,7 @@ import {jsonp as requestJSONP} from '../net.js';
|
||||
export class CustomTile extends Tile {
|
||||
/**
|
||||
* @param {import("../tilecoord.js").TileCoord} tileCoord Tile coordinate.
|
||||
* @param {TileState} state State.
|
||||
* @param {import("../TileState.js").default} state State.
|
||||
* @param {string} src Image source URI.
|
||||
* @param {import("../extent.js").Extent} extent Extent of the tile.
|
||||
* @param {boolean} preemptive Load the tile when visible (before it's needed).
|
||||
|
||||
@@ -25,7 +25,7 @@ export class CustomTile extends ImageTile {
|
||||
/**
|
||||
* @param {import("../size.js").Size} tileSize Full tile size.
|
||||
* @param {import("../tilecoord.js").TileCoord} tileCoord Tile coordinate.
|
||||
* @param {TileState} state State.
|
||||
* @param {import("../TileState.js").default} state State.
|
||||
* @param {string} src Image source URI.
|
||||
* @param {?string} crossOrigin Cross origin.
|
||||
* @param {import("../Tile.js").LoadFunction} tileLoadFunction Tile load function.
|
||||
|
||||
@@ -57,7 +57,7 @@ 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 {Corner=} opt_corner Extent corner (default is `'top-left'`).
|
||||
* @param {import("./extent/Corner.js").default=} opt_corner Extent corner (default is `'top-left'`).
|
||||
* @return {!TileGrid} TileGrid instance.
|
||||
*/
|
||||
export function createForExtent(extent, opt_maxZoom, opt_tileSize, opt_corner) {
|
||||
@@ -153,7 +153,7 @@ function resolutionsFromExtent(
|
||||
* DEFAULT_MAX_ZOOM).
|
||||
* @param {number|import("./size.js").Size=} opt_tileSize Tile size (default uses
|
||||
* DEFAULT_TILE_SIZE).
|
||||
* @param {Corner=} opt_corner Extent corner (default is `'top-left'`).
|
||||
* @param {import("./extent/Corner.js").default=} opt_corner Extent corner (default is `'top-left'`).
|
||||
* @return {!TileGrid} TileGrid instance.
|
||||
*/
|
||||
export function createForProjection(
|
||||
|
||||
Reference in New Issue
Block a user