Replace google closure syntax = with brackets around name

This commit is contained in:
Simon Seyock
2021-02-03 14:06:02 +01:00
parent c15faa19fc
commit 8facb252f1
185 changed files with 569 additions and 569 deletions

View File

@@ -10,7 +10,7 @@ import {Control, defaults as defaultControls} from '../src/ol/control.js';
class RotateNorthControl extends Control { class RotateNorthControl extends Control {
/** /**
* @param {Object=} opt_options Control options. * @param {Object} [opt_options] Control options.
*/ */
constructor(opt_options) { constructor(opt_options) {
const options = opt_options || {}; const options = opt_options || {};

View File

@@ -22,8 +22,8 @@ const Property = {
export class CollectionEvent extends Event { export class CollectionEvent extends Event {
/** /**
* @param {import("./CollectionEventType.js").default} type Type. * @param {import("./CollectionEventType.js").default} type Type.
* @param {*=} opt_element Element. * @param {*} [opt_element] Element.
* @param {number=} opt_index The index of the added or removed element. * @param {number} [opt_index] The index of the added or removed element.
*/ */
constructor(type, opt_element, opt_index) { constructor(type, opt_element, opt_index) {
super(type); super(type);
@@ -65,8 +65,8 @@ export class CollectionEvent extends Event {
*/ */
class Collection extends BaseObject { class Collection extends BaseObject {
/** /**
* @param {Array<T>=} opt_array Array. * @param {Array<T>} [opt_array] Array.
* @param {Options=} opt_options Collection options. * @param {Options} [opt_options] Collection options.
*/ */
constructor(opt_array, opt_options) { constructor(opt_array, opt_options) {
super(); super();
@@ -277,7 +277,7 @@ class Collection extends BaseObject {
/** /**
* @private * @private
* @param {T} elem Element. * @param {T} elem Element.
* @param {number=} opt_except Optional index to ignore. * @param {number} [opt_except] Optional index to ignore.
*/ */
assertUnique_(elem, opt_except) { assertUnique_(elem, opt_except) {
for (let i = 0, ii = this.array_.length; i < ii; ++i) { for (let i = 0, ii = this.array_.length; i < ii; ++i) {

View File

@@ -61,7 +61,7 @@ import {listen, unlistenByKey} from './events.js';
*/ */
class Feature extends BaseObject { class Feature extends BaseObject {
/** /**
* @param {Geometry|Object<string, *>=} opt_geometryOrProperties * @param {Geometry|Object<string, *>} [opt_geometryOrProperties]
* You may pass a Geometry object directly, or an object literal containing * You may pass a Geometry object directly, or an object literal containing
* properties. If you pass an object literal, you may include a Geometry * properties. If you pass an object literal, you may include a Geometry
* associated with a `geometry` key. * associated with a `geometry` key.
@@ -240,7 +240,7 @@ class Feature extends BaseObject {
* single style object, an array of styles, or a function that takes a * single style object, an array of styles, or a function that takes a
* resolution and returns an array of styles. To unset the feature style, call * resolution and returns an array of styles. To unset the feature style, call
* `setStyle()` without arguments or a falsey value. * `setStyle()` without arguments or a falsey value.
* @param {import("./style/Style.js").StyleLike=} opt_style Style for this feature. * @param {import("./style/Style.js").StyleLike} [opt_style] Style for this feature.
* @api * @api
* @fires module:ol/events/Event~BaseEvent#event:change * @fires module:ol/events/Event~BaseEvent#event:change
*/ */

View File

@@ -86,7 +86,7 @@ class GeolocationError extends BaseEvent {
*/ */
class Geolocation extends BaseObject { class Geolocation extends BaseObject {
/** /**
* @param {Options=} opt_options Options. * @param {Options} [opt_options] Options.
*/ */
constructor(opt_options) { constructor(opt_options) {
super(); super();

View File

@@ -19,7 +19,7 @@ class ImageCanvas extends ImageBase {
* @param {number} resolution Resolution. * @param {number} resolution Resolution.
* @param {number} pixelRatio Pixel ratio. * @param {number} pixelRatio Pixel ratio.
* @param {HTMLCanvasElement} canvas Canvas. * @param {HTMLCanvasElement} canvas Canvas.
* @param {Loader=} opt_loader Optional loader function to * @param {Loader} [opt_loader] Optional loader function to
* support asynchronous canvas drawing. * support asynchronous canvas drawing.
*/ */
constructor(extent, resolution, pixelRatio, canvas, opt_loader) { constructor(extent, resolution, pixelRatio, canvas, opt_loader) {
@@ -58,7 +58,7 @@ class ImageCanvas extends ImageBase {
/** /**
* Handle async drawing complete. * Handle async drawing complete.
* @param {Error=} err Any error during drawing. * @param {Error} [err] Any error during drawing.
* @private * @private
*/ */
handleLoad_(err) { handleLoad_(err) {

View File

@@ -13,7 +13,7 @@ class ImageTile extends Tile {
* @param {string} src Image source URI. * @param {string} src Image source URI.
* @param {?string} crossOrigin Cross origin. * @param {?string} crossOrigin Cross origin.
* @param {import("./Tile.js").LoadFunction} tileLoadFunction Tile load function. * @param {import("./Tile.js").LoadFunction} tileLoadFunction Tile load function.
* @param {import("./Tile.js").Options=} opt_options Tile options. * @param {import("./Tile.js").Options} [opt_options] Tile options.
*/ */
constructor( constructor(
tileCoord, tileCoord,

View File

@@ -14,8 +14,8 @@ class MapBrowserEvent extends MapEvent {
* @param {string} type Event type. * @param {string} type Event type.
* @param {import("./PluggableMap.js").default} map Map. * @param {import("./PluggableMap.js").default} map Map.
* @param {EVENT} originalEvent Original event. * @param {EVENT} originalEvent Original event.
* @param {boolean=} opt_dragging Is the map currently being dragged? * @param {boolean} [opt_dragging] Is the map currently being dragged?
* @param {?import("./PluggableMap.js").FrameState=} opt_frameState Frame state. * @param {?import("./PluggableMap.js").FrameState} [opt_frameState] Frame state.
*/ */
constructor(type, map, originalEvent, opt_dragging, opt_frameState) { constructor(type, map, originalEvent, opt_dragging, opt_frameState) {
super(type, map, opt_frameState); super(type, map, opt_frameState);

View File

@@ -13,7 +13,7 @@ import {listen, unlistenByKey} from './events.js';
class MapBrowserEventHandler extends EventTarget { class MapBrowserEventHandler extends EventTarget {
/** /**
* @param {import("./PluggableMap.js").default} map The map with the viewport to listen to events on. * @param {import("./PluggableMap.js").default} map The map with the viewport to listen to events on.
* @param {number=} moveTolerance The minimal distance the pointer must travel to trigger a move. * @param {number} [moveTolerance] The minimal distance the pointer must travel to trigger a move.
*/ */
constructor(map, moveTolerance) { constructor(map, moveTolerance) {
super(map); super(map);

View File

@@ -12,7 +12,7 @@ class MapEvent extends Event {
/** /**
* @param {string} type Event type. * @param {string} type Event type.
* @param {import("./PluggableMap.js").default} map Map. * @param {import("./PluggableMap.js").default} map Map.
* @param {?import("./PluggableMap.js").FrameState=} opt_frameState Frame state. * @param {?import("./PluggableMap.js").FrameState} [opt_frameState] Frame state.
*/ */
constructor(type, map, opt_frameState) { constructor(type, map, opt_frameState) {
super(type); super(type);

View File

@@ -82,7 +82,7 @@ export class ObjectEvent extends Event {
*/ */
class BaseObject extends Observable { class BaseObject extends Observable {
/** /**
* @param {Object<string, *>=} opt_values An object with key-value pairs. * @param {Object<string, *>} [opt_values] An object with key-value pairs.
*/ */
constructor(opt_values) { constructor(opt_values) {
super(); super();
@@ -159,7 +159,7 @@ class BaseObject extends Observable {
* Sets a value. * Sets a value.
* @param {string} key Key name. * @param {string} key Key name.
* @param {*} value Value. * @param {*} value Value.
* @param {boolean=} opt_silent Update without triggering an event. * @param {boolean} [opt_silent] Update without triggering an event.
* @api * @api
*/ */
set(key, value, opt_silent) { set(key, value, opt_silent) {
@@ -179,7 +179,7 @@ class BaseObject extends Observable {
* Sets a collection of key-value pairs. Note that this changes any existing * Sets a collection of key-value pairs. Note that this changes any existing
* properties and adds new ones (it does not remove any existing properties). * properties and adds new ones (it does not remove any existing properties).
* @param {Object<string, *>} values Values. * @param {Object<string, *>} values Values.
* @param {boolean=} opt_silent Update without triggering an event. * @param {boolean} [opt_silent] Update without triggering an event.
* @api * @api
*/ */
setProperties(values, opt_silent) { setProperties(values, opt_silent) {
@@ -203,7 +203,7 @@ class BaseObject extends Observable {
/** /**
* Unsets a property. * Unsets a property.
* @param {string} key Key name. * @param {string} key Key name.
* @param {boolean=} opt_silent Unset without triggering an event. * @param {boolean} [opt_silent] Unset without triggering an event.
* @api * @api
*/ */
unset(key, opt_silent) { unset(key, opt_silent) {

View File

@@ -409,7 +409,7 @@ class Overlay extends BaseObject {
/** /**
* Pan the map so that the overlay is entirely visible in the current viewport * Pan the map so that the overlay is entirely visible in the current viewport
* (if necessary). * (if necessary).
* @param {PanIntoViewOptions=} opt_panIntoViewOptions Options for the pan action * @param {PanIntoViewOptions} [opt_panIntoViewOptions] Options for the pan action
* @api * @api
*/ */
panIntoView(opt_panIntoViewOptions) { panIntoView(opt_panIntoViewOptions) {

View File

@@ -545,7 +545,7 @@ class PluggableMap extends BaseObject {
* the {@link module:ol/layer/Layer layer} of the feature and will be null for * the {@link module:ol/layer/Layer layer} of the feature and will be null for
* unmanaged layers. To stop detection, callback functions can return a * unmanaged layers. To stop detection, callback functions can return a
* truthy value. * truthy value.
* @param {AtPixelOptions=} opt_options Optional options. * @param {AtPixelOptions} [opt_options] Optional options.
* @return {T|undefined} Callback result, i.e. the return value of last * @return {T|undefined} Callback result, i.e. the return value of last
* callback execution, or the first truthy callback return value. * callback execution, or the first truthy callback return value.
* @template S,T * @template S,T
@@ -577,7 +577,7 @@ class PluggableMap extends BaseObject {
/** /**
* Get all features that intersect a pixel on the viewport. * Get all features that intersect a pixel on the viewport.
* @param {import("./pixel.js").Pixel} pixel Pixel. * @param {import("./pixel.js").Pixel} pixel Pixel.
* @param {AtPixelOptions=} opt_options Optional options. * @param {AtPixelOptions} [opt_options] Optional options.
* @return {Array<import("./Feature.js").FeatureLike>} The detected features or * @return {Array<import("./Feature.js").FeatureLike>} The detected features or
* an empty array if none were found. * an empty array if none were found.
* @api * @api
@@ -609,7 +609,7 @@ class PluggableMap extends BaseObject {
* [R, G, B, A] pixel values (0 - 255) and will be `null` for layer types * [R, G, B, A] pixel values (0 - 255) and will be `null` for layer types
* that do not currently support this argument. To stop detection, callback * that do not currently support this argument. To stop detection, callback
* functions can return a truthy value. * functions can return a truthy value.
* @param {AtPixelOptions=} opt_options Configuration options. * @param {AtPixelOptions} [opt_options] Configuration options.
* @return {T|undefined} Callback result, i.e. the return value of last * @return {T|undefined} Callback result, i.e. the return value of last
* callback execution, or the first truthy callback return value. * callback execution, or the first truthy callback return value.
* @template S,T * @template S,T
@@ -636,7 +636,7 @@ class PluggableMap extends BaseObject {
* Detect if features intersect a pixel on the viewport. Layers included in the * Detect if features intersect a pixel on the viewport. Layers included in the
* detection can be configured through `opt_layerFilter`. * detection can be configured through `opt_layerFilter`.
* @param {import("./pixel.js").Pixel} pixel Pixel. * @param {import("./pixel.js").Pixel} pixel Pixel.
* @param {AtPixelOptions=} opt_options Optional options. * @param {AtPixelOptions} [opt_options] Optional options.
* @return {boolean} Is there a feature at the given pixel? * @return {boolean} Is there a feature at the given pixel?
* @api * @api
*/ */
@@ -968,7 +968,7 @@ class PluggableMap extends BaseObject {
/** /**
* @param {UIEvent} browserEvent Browser event. * @param {UIEvent} browserEvent Browser event.
* @param {string=} opt_type Type. * @param {string} [opt_type] Type.
*/ */
handleBrowserEvent(browserEvent, opt_type) { handleBrowserEvent(browserEvent, opt_type) {
const type = opt_type || browserEvent.type; const type = opt_type || browserEvent.type;

View File

@@ -76,7 +76,7 @@ class Tile extends EventTarget {
/** /**
* @param {import("./tilecoord.js").TileCoord} tileCoord Tile coordinate. * @param {import("./tilecoord.js").TileCoord} tileCoord Tile coordinate.
* @param {import("./TileState.js").default} state State. * @param {import("./TileState.js").default} state State.
* @param {Options=} opt_options Tile options. * @param {Options} [opt_options] Tile options.
*/ */
constructor(tileCoord, state, opt_options) { constructor(tileCoord, state, opt_options) {
super(); super();

View File

@@ -136,7 +136,7 @@ class TileRange {
* @param {number} maxX Maximum X. * @param {number} maxX Maximum X.
* @param {number} minY Minimum Y. * @param {number} minY Minimum Y.
* @param {number} maxY Maximum Y. * @param {number} maxY Maximum Y.
* @param {TileRange=} tileRange TileRange. * @param {TileRange} [tileRange] TileRange.
* @return {TileRange} Tile range. * @return {TileRange} Tile range.
*/ */
export function createOrUpdate(minX, maxX, minY, maxY, tileRange) { export function createOrUpdate(minX, maxX, minY, maxY, tileRange) {

View File

@@ -11,7 +11,7 @@ class VectorTile extends Tile {
* @param {string} src Data source url. * @param {string} src Data source url.
* @param {import("./format/Feature.js").default} format Feature format. * @param {import("./format/Feature.js").default} format Feature format.
* @param {import("./Tile.js").LoadFunction} tileLoadFunction Tile load function. * @param {import("./Tile.js").LoadFunction} tileLoadFunction Tile load function.
* @param {import("./Tile.js").Options=} opt_options Tile options. * @param {import("./Tile.js").Options} [opt_options] Tile options.
*/ */
constructor(tileCoord, state, src, format, tileLoadFunction, opt_options) { constructor(tileCoord, state, src, format, tileLoadFunction, opt_options) {
super(tileCoord, state, opt_options); super(tileCoord, state, opt_options);

View File

@@ -290,7 +290,7 @@ const DEFAULT_MIN_ZOOM = 0;
*/ */
class View extends BaseObject { class View extends BaseObject {
/** /**
* @param {ViewOptions=} opt_options View options. * @param {ViewOptions} [opt_options] View options.
*/ */
constructor(opt_options) { constructor(opt_options) {
super(); super();
@@ -838,7 +838,7 @@ class View extends BaseObject {
/** /**
* Returns the current viewport size. * Returns the current viewport size.
* @private * @private
* @param {number=} opt_rotation Take into account the rotation of the viewport when giving the size * @param {number} [opt_rotation] Take into account the rotation of the viewport when giving the size
* @return {import("./size.js").Size} Viewport size or `[100, 100]` when no viewport is found. * @return {import("./size.js").Size} Viewport size or `[100, 100]` when no viewport is found.
*/ */
getViewportSize_(opt_rotation) { getViewportSize_(opt_rotation) {
@@ -862,7 +862,7 @@ class View extends BaseObject {
* to avoid performance hit and layout reflow. * to avoid performance hit and layout reflow.
* This should be done on map size change. * This should be done on map size change.
* Note: the constraints are not resolved during an animation to avoid stopping it * Note: the constraints are not resolved during an animation to avoid stopping it
* @param {import("./size.js").Size=} opt_size Viewport size; if undefined, [100, 100] is assumed * @param {import("./size.js").Size} [opt_size] Viewport size; if undefined, [100, 100] is assumed
*/ */
setViewportSize(opt_size) { setViewportSize(opt_size) {
this.viewportSize_ = Array.isArray(opt_size) this.viewportSize_ = Array.isArray(opt_size)
@@ -912,7 +912,7 @@ class View extends BaseObject {
} }
/** /**
* @param {Array<number>=} opt_hints Destination array. * @param {Array<number>} [opt_hints] Destination array.
* @return {Array<number>} Hint. * @return {Array<number>} Hint.
*/ */
getHints(opt_hints) { getHints(opt_hints) {
@@ -930,7 +930,7 @@ class View extends BaseObject {
* The size is the pixel dimensions of the box into which the calculated extent * The size is the pixel dimensions of the box into which the calculated extent
* should fit. In most cases you want to get the extent of the entire map, * should fit. In most cases you want to get the extent of the entire map,
* that is `map.getSize()`. * that is `map.getSize()`.
* @param {import("./size.js").Size=} opt_size Box pixel size. If not provided, the size * @param {import("./size.js").Size} [opt_size] Box pixel size. If not provided, the size
* of the map that uses this view will be used. * of the map that uses this view will be used.
* @return {import("./extent.js").Extent} Extent. * @return {import("./extent.js").Extent} Extent.
* @api * @api
@@ -941,7 +941,7 @@ class View extends BaseObject {
} }
/** /**
* @param {import("./size.js").Size=} opt_size Box pixel size. If not provided, * @param {import("./size.js").Size} [opt_size] Box pixel size. If not provided,
* the map's last known viewport size will be used. * the map's last known viewport size will be used.
* @return {import("./extent.js").Extent} Extent. * @return {import("./extent.js").Extent} Extent.
*/ */
@@ -1056,7 +1056,7 @@ class View extends BaseObject {
/** /**
* Get the resolution for a provided extent (in map units) and size (in pixels). * Get the resolution for a provided extent (in map units) and size (in pixels).
* @param {import("./extent.js").Extent} extent Extent. * @param {import("./extent.js").Extent} extent Extent.
* @param {import("./size.js").Size=} opt_size Box pixel size. * @param {import("./size.js").Size} [opt_size] Box pixel size.
* @return {number} The resolution at which the provided extent will render at * @return {number} The resolution at which the provided extent will render at
* the given size. * the given size.
* @api * @api
@@ -1071,7 +1071,7 @@ class View extends BaseObject {
/** /**
* Get the resolution for a provided extent (in map units) and size (in pixels). * Get the resolution for a provided extent (in map units) and size (in pixels).
* @param {import("./extent.js").Extent} extent Extent. * @param {import("./extent.js").Extent} extent Extent.
* @param {import("./size.js").Size=} opt_size Box pixel size. * @param {import("./size.js").Size} [opt_size] Box pixel size.
* @return {number} The resolution at which the provided extent will render at * @return {number} The resolution at which the provided extent will render at
* the given size. * the given size.
*/ */
@@ -1085,7 +1085,7 @@ class View extends BaseObject {
/** /**
* Return a function that returns a value between 0 and 1 for a * Return a function that returns a value between 0 and 1 for a
* resolution. Exponential scaling is assumed. * resolution. Exponential scaling is assumed.
* @param {number=} opt_power Power. * @param {number} [opt_power] Power.
* @return {function(number): number} Resolution for value function. * @return {function(number): number} Resolution for value function.
*/ */
getResolutionForValueFunction(opt_power) { getResolutionForValueFunction(opt_power) {
@@ -1118,7 +1118,7 @@ class View extends BaseObject {
/** /**
* Return a function that returns a resolution for a value between * Return a function that returns a resolution for a value between
* 0 and 1. Exponential scaling is assumed. * 0 and 1. Exponential scaling is assumed.
* @param {number=} opt_power Power. * @param {number} [opt_power] Power.
* @return {function(number): number} Value for resolution function. * @return {function(number): number} Value for resolution function.
*/ */
getValueForResolutionFunction(opt_power) { getValueForResolutionFunction(opt_power) {
@@ -1141,7 +1141,7 @@ class View extends BaseObject {
/** /**
* Returns the size of the viewport minus padding. * Returns the size of the viewport minus padding.
* @private * @private
* @param {number=} opt_rotation Take into account the rotation of the viewport when giving the size * @param {number} [opt_rotation] Take into account the rotation of the viewport when giving the size
* @return {import("./size.js").Size} Viewport size reduced by the padding. * @return {import("./size.js").Size} Viewport size reduced by the padding.
*/ */
getViewportSizeMinusPadding_(opt_rotation) { getViewportSizeMinusPadding_(opt_rotation) {
@@ -1261,7 +1261,7 @@ class View extends BaseObject {
* Takes care of the map angle. * Takes care of the map angle.
* @param {import("./geom/SimpleGeometry.js").default|import("./extent.js").Extent} geometryOrExtent The geometry or * @param {import("./geom/SimpleGeometry.js").default|import("./extent.js").Extent} geometryOrExtent The geometry or
* extent to fit the view to. * extent to fit the view to.
* @param {FitOptions=} opt_options Options. * @param {FitOptions} [opt_options] Options.
* @api * @api
*/ */
fit(geometryOrExtent, opt_options) { fit(geometryOrExtent, opt_options) {
@@ -1300,7 +1300,7 @@ class View extends BaseObject {
/** /**
* @param {import("./geom/SimpleGeometry.js").default} geometry The geometry. * @param {import("./geom/SimpleGeometry.js").default} geometry The geometry.
* @param {FitOptions=} opt_options Options. * @param {FitOptions} [opt_options] Options.
*/ */
fitInternal(geometry, opt_options) { fitInternal(geometry, opt_options) {
const options = opt_options || {}; const options = opt_options || {};
@@ -1474,7 +1474,7 @@ class View extends BaseObject {
* Multiply the view resolution by a ratio, optionally using an anchor. Any resolution * Multiply the view resolution by a ratio, optionally using an anchor. Any resolution
* constraint will apply. * constraint will apply.
* @param {number} ratio The ratio to apply on the view resolution. * @param {number} ratio The ratio to apply on the view resolution.
* @param {import("./coordinate.js").Coordinate=} opt_anchor The origin of the transformation. * @param {import("./coordinate.js").Coordinate} [opt_anchor] The origin of the transformation.
* @api * @api
*/ */
adjustResolution(ratio, opt_anchor) { adjustResolution(ratio, opt_anchor) {
@@ -1487,7 +1487,7 @@ class View extends BaseObject {
* Multiply the view resolution by a ratio, optionally using an anchor. Any resolution * Multiply the view resolution by a ratio, optionally using an anchor. Any resolution
* constraint will apply. * constraint will apply.
* @param {number} ratio The ratio to apply on the view resolution. * @param {number} ratio The ratio to apply on the view resolution.
* @param {import("./coordinate.js").Coordinate=} opt_anchor The origin of the transformation. * @param {import("./coordinate.js").Coordinate} [opt_anchor] The origin of the transformation.
*/ */
adjustResolutionInternal(ratio, opt_anchor) { adjustResolutionInternal(ratio, opt_anchor) {
const isMoving = this.getAnimating() || this.getInteracting(); const isMoving = this.getAnimating() || this.getInteracting();
@@ -1511,7 +1511,7 @@ class View extends BaseObject {
* Adds a value to the view zoom level, optionally using an anchor. Any resolution * Adds a value to the view zoom level, optionally using an anchor. Any resolution
* constraint will apply. * constraint will apply.
* @param {number} delta Relative value to add to the zoom level. * @param {number} delta Relative value to add to the zoom level.
* @param {import("./coordinate.js").Coordinate=} opt_anchor The origin of the transformation. * @param {import("./coordinate.js").Coordinate} [opt_anchor] The origin of the transformation.
* @api * @api
*/ */
adjustZoom(delta, opt_anchor) { adjustZoom(delta, opt_anchor) {
@@ -1522,7 +1522,7 @@ class View extends BaseObject {
* Adds a value to the view rotation, optionally using an anchor. Any rotation * Adds a value to the view rotation, optionally using an anchor. Any rotation
* constraint will apply. * constraint will apply.
* @param {number} delta Relative value to add to the zoom rotation, in radians. * @param {number} delta Relative value to add to the zoom rotation, in radians.
* @param {import("./coordinate.js").Coordinate=} opt_anchor The rotation center. * @param {import("./coordinate.js").Coordinate} [opt_anchor] The rotation center.
* @api * @api
*/ */
adjustRotation(delta, opt_anchor) { adjustRotation(delta, opt_anchor) {
@@ -1534,7 +1534,7 @@ class View extends BaseObject {
/** /**
* @param {number} delta Relative value to add to the zoom rotation, in radians. * @param {number} delta Relative value to add to the zoom rotation, in radians.
* @param {import("./coordinate.js").Coordinate=} opt_anchor The rotation center. * @param {import("./coordinate.js").Coordinate} [opt_anchor] The rotation center.
*/ */
adjustRotationInternal(delta, opt_anchor) { adjustRotationInternal(delta, opt_anchor) {
const isMoving = this.getAnimating() || this.getInteracting(); const isMoving = this.getAnimating() || this.getInteracting();
@@ -1614,8 +1614,8 @@ class View extends BaseObject {
* Recompute rotation/resolution/center based on target values. * Recompute rotation/resolution/center based on target values.
* Note: we have to compute rotation first, then resolution and center considering that * Note: we have to compute rotation first, then resolution and center considering that
* parameters can influence one another in case a view extent constraint is present. * parameters can influence one another in case a view extent constraint is present.
* @param {boolean=} opt_doNotCancelAnims Do not cancel animations. * @param {boolean} [opt_doNotCancelAnims] Do not cancel animations.
* @param {boolean=} opt_forceMoving Apply constraints as if the view is moving. * @param {boolean} [opt_forceMoving] Apply constraints as if the view is moving.
* @private * @private
*/ */
applyTargetState_(opt_doNotCancelAnims, opt_forceMoving) { applyTargetState_(opt_doNotCancelAnims, opt_forceMoving) {
@@ -1671,9 +1671,9 @@ class View extends BaseObject {
* This is typically done on interaction end. * This is typically done on interaction end.
* Note: calling this with a duration of 0 will apply the constrained values straight away, * Note: calling this with a duration of 0 will apply the constrained values straight away,
* without animation. * without animation.
* @param {number=} opt_duration The animation duration in ms. * @param {number} [opt_duration] The animation duration in ms.
* @param {number=} opt_resolutionDirection Which direction to zoom. * @param {number} [opt_resolutionDirection] Which direction to zoom.
* @param {import("./coordinate.js").Coordinate=} opt_anchor The origin of the transformation. * @param {import("./coordinate.js").Coordinate} [opt_anchor] The origin of the transformation.
*/ */
resolveConstraints(opt_duration, opt_resolutionDirection, opt_anchor) { resolveConstraints(opt_duration, opt_resolutionDirection, opt_anchor) {
const duration = opt_duration !== undefined ? opt_duration : 200; const duration = opt_duration !== undefined ? opt_duration : 200;
@@ -1747,9 +1747,9 @@ class View extends BaseObject {
/** /**
* Notify the View that an interaction has ended. The view state will be resolved * Notify the View that an interaction has ended. The view state will be resolved
* to a stable one if needed (depending on its constraints). * to a stable one if needed (depending on its constraints).
* @param {number=} opt_duration Animation duration in ms. * @param {number} [opt_duration] Animation duration in ms.
* @param {number=} opt_resolutionDirection Which direction to zoom. * @param {number} [opt_resolutionDirection] Which direction to zoom.
* @param {import("./coordinate.js").Coordinate=} opt_anchor The origin of the transformation. * @param {import("./coordinate.js").Coordinate} [opt_anchor] The origin of the transformation.
* @api * @api
*/ */
endInteraction(opt_duration, opt_resolutionDirection, opt_anchor) { endInteraction(opt_duration, opt_resolutionDirection, opt_anchor) {
@@ -1761,9 +1761,9 @@ class View extends BaseObject {
/** /**
* Notify the View that an interaction has ended. The view state will be resolved * Notify the View that an interaction has ended. The view state will be resolved
* to a stable one if needed (depending on its constraints). * to a stable one if needed (depending on its constraints).
* @param {number=} opt_duration Animation duration in ms. * @param {number} [opt_duration] Animation duration in ms.
* @param {number=} opt_resolutionDirection Which direction to zoom. * @param {number} [opt_resolutionDirection] Which direction to zoom.
* @param {import("./coordinate.js").Coordinate=} opt_anchor The origin of the transformation. * @param {import("./coordinate.js").Coordinate} [opt_anchor] The origin of the transformation.
*/ */
endInteractionInternal(opt_duration, opt_resolutionDirection, opt_anchor) { endInteractionInternal(opt_duration, opt_resolutionDirection, opt_anchor) {
this.setHint(ViewHint.INTERACTING, -1); this.setHint(ViewHint.INTERACTING, -1);
@@ -1774,7 +1774,7 @@ class View extends BaseObject {
/** /**
* Get a valid position for the view center according to the current constraints. * Get a valid position for the view center according to the current constraints.
* @param {import("./coordinate.js").Coordinate|undefined} targetCenter Target center position. * @param {import("./coordinate.js").Coordinate|undefined} targetCenter Target center position.
* @param {number=} opt_targetResolution Target resolution. If not supplied, the current one will be used. * @param {number} [opt_targetResolution] Target resolution. If not supplied, the current one will be used.
* This is useful to guess a valid center position at a different zoom level. * This is useful to guess a valid center position at a different zoom level.
* @return {import("./coordinate.js").Coordinate|undefined} Valid center position. * @return {import("./coordinate.js").Coordinate|undefined} Valid center position.
*/ */
@@ -1790,7 +1790,7 @@ class View extends BaseObject {
/** /**
* Get a valid zoom level according to the current view constraints. * Get a valid zoom level according to the current view constraints.
* @param {number|undefined} targetZoom Target zoom. * @param {number|undefined} targetZoom Target zoom.
* @param {number=} [opt_direction=0] Indicate which resolution should be used * @param {number} [opt_direction=0] Indicate which resolution should be used
* by a renderer if the view resolution does not match any resolution of the tile source. * 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 * If 0, the nearest resolution will be used. If 1, the nearest lower resolution
* will be used. If -1, the nearest higher resolution will be used. * will be used. If -1, the nearest higher resolution will be used.
@@ -1806,7 +1806,7 @@ class View extends BaseObject {
/** /**
* Get a valid resolution according to the current view constraints. * Get a valid resolution according to the current view constraints.
* @param {number|undefined} targetResolution Target resolution. * @param {number|undefined} targetResolution Target resolution.
* @param {number=} [opt_direction=0] Indicate which resolution should be used * @param {number} [opt_direction=0] Indicate which resolution should be used
* by a renderer if the view resolution does not match any resolution of the tile source. * 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 * If 0, the nearest resolution will be used. If 1, the nearest lower resolution
* will be used. If -1, the nearest higher resolution will be used. * will be used. If -1, the nearest higher resolution will be used.

View File

@@ -8,7 +8,7 @@
* *
* @param {Array<*>} haystack Items to search through. * @param {Array<*>} haystack Items to search through.
* @param {*} needle The item to look for. * @param {*} needle The item to look for.
* @param {Function=} opt_comparator Comparator function. * @param {Function} [opt_comparator] Comparator function.
* @return {number} The index of the item if found, -1 if not. * @return {number} The index of the item if found, -1 if not.
*/ */
export function binarySearch(haystack, needle, opt_comparator) { export function binarySearch(haystack, needle, opt_comparator) {
@@ -222,8 +222,8 @@ export function findIndex(arr, func) {
/** /**
* @param {Array<*>} arr The array to test. * @param {Array<*>} arr The array to test.
* @param {Function=} opt_func Comparison function. * @param {Function} [opt_func] Comparison function.
* @param {boolean=} opt_strict Strictly sorted (default false). * @param {boolean} [opt_strict] Strictly sorted (default false).
* @return {boolean} Return index. * @return {boolean} Return index.
*/ */
export function isSorted(arr, opt_func, opt_strict) { export function isSorted(arr, opt_func, opt_strict) {

View File

@@ -20,8 +20,8 @@ export function createExtent(extent, onlyCenter, smooth) {
* @param {import("./coordinate.js").Coordinate|undefined} center Center. * @param {import("./coordinate.js").Coordinate|undefined} center Center.
* @param {number} resolution Resolution. * @param {number} resolution Resolution.
* @param {import("./size.js").Size} size Viewport size; unused if `onlyCenter` was specified. * @param {import("./size.js").Size} size Viewport size; unused if `onlyCenter` was specified.
* @param {boolean=} opt_isMoving True if an interaction or animation is in progress. * @param {boolean} [opt_isMoving] True if an interaction or animation is in progress.
* @param {Array<number>=} opt_centerShift Shift between map center and viewport center. * @param {Array<number>} [opt_centerShift] Shift between map center and viewport center.
* @return {import("./coordinate.js").Coordinate|undefined} Center. * @return {import("./coordinate.js").Coordinate|undefined} Center.
*/ */
function (center, resolution, size, opt_isMoving, opt_centerShift) { function (center, resolution, size, opt_isMoving, opt_centerShift) {
@@ -69,7 +69,7 @@ export function createExtent(extent, onlyCenter, smooth) {
} }
/** /**
* @param {import("./coordinate.js").Coordinate=} center Center. * @param {import("./coordinate.js").Coordinate} [center] Center.
* @return {import("./coordinate.js").Coordinate|undefined} Center. * @return {import("./coordinate.js").Coordinate|undefined} Center.
*/ */
export function none(center) { export function none(center) {

View File

@@ -41,7 +41,7 @@ export {default as ZoomToExtent} from './control/ZoomToExtent.js';
* * {@link module:ol/control/Rotate~Rotate} * * {@link module:ol/control/Rotate~Rotate}
* * {@link module:ol/control/Attribution~Attribution} * * {@link module:ol/control/Attribution~Attribution}
* *
* @param {DefaultsOptions=} opt_options * @param {DefaultsOptions} [opt_options]
* Defaults options. * Defaults options.
* @return {Collection<import("./control/Control.js").default>} * @return {Collection<import("./control/Control.js").default>}
* Controls. * Controls.

View File

@@ -46,7 +46,7 @@ import {removeChildren, replaceNode} from '../dom.js';
*/ */
class Attribution extends Control { class Attribution extends Control {
/** /**
* @param {Options=} opt_options Attribution options. * @param {Options} [opt_options] Attribution options.
*/ */
constructor(opt_options) { constructor(opt_options) {
const options = opt_options ? opt_options : {}; const options = opt_options ? opt_options : {};

View File

@@ -70,7 +70,7 @@ const FullScreenEventType = {
*/ */
class FullScreen extends Control { class FullScreen extends Control {
/** /**
* @param {Options=} opt_options Options. * @param {Options} [opt_options] Options.
*/ */
constructor(opt_options) { constructor(opt_options) {
const options = opt_options ? opt_options : {}; const options = opt_options ? opt_options : {};

View File

@@ -54,7 +54,7 @@ const COORDINATE_FORMAT = 'coordinateFormat';
*/ */
class MousePosition extends Control { class MousePosition extends Control {
/** /**
* @param {Options=} opt_options Mouse position options. * @param {Options} [opt_options] Mouse position options.
*/ */
constructor(opt_options) { constructor(opt_options) {
const options = opt_options ? opt_options : {}; const options = opt_options ? opt_options : {};

View File

@@ -74,7 +74,7 @@ class ControlledMap extends PluggableMap {
*/ */
class OverviewMap extends Control { class OverviewMap extends Control {
/** /**
* @param {Options=} opt_options OverviewMap options. * @param {Options} [opt_options] OverviewMap options.
*/ */
constructor(opt_options) { constructor(opt_options) {
const options = opt_options ? opt_options : {}; const options = opt_options ? opt_options : {};

View File

@@ -33,7 +33,7 @@ import {easeOut} from '../easing.js';
*/ */
class Rotate extends Control { class Rotate extends Control {
/** /**
* @param {Options=} opt_options Rotate options. * @param {Options} [opt_options] Rotate options.
*/ */
constructor(opt_options) { constructor(opt_options) {
const options = opt_options ? opt_options : {}; const options = opt_options ? opt_options : {};

View File

@@ -73,7 +73,7 @@ const DEFAULT_DPI = 25.4 / 0.28;
*/ */
class ScaleLine extends Control { class ScaleLine extends Control {
/** /**
* @param {Options=} opt_options Scale line options. * @param {Options} [opt_options] Scale line options.
*/ */
constructor(opt_options) { constructor(opt_options) {
const options = opt_options ? opt_options : {}; const options = opt_options ? opt_options : {};

View File

@@ -33,7 +33,7 @@ import {easeOut} from '../easing.js';
*/ */
class Zoom extends Control { class Zoom extends Control {
/** /**
* @param {Options=} opt_options Zoom options. * @param {Options} [opt_options] Zoom options.
*/ */
constructor(opt_options) { constructor(opt_options) {
const options = opt_options ? opt_options : {}; const options = opt_options ? opt_options : {};

View File

@@ -41,7 +41,7 @@ const Direction = {
*/ */
class ZoomSlider extends Control { class ZoomSlider extends Control {
/** /**
* @param {Options=} opt_options Zoom slider options. * @param {Options} [opt_options] Zoom slider options.
*/ */
constructor(opt_options) { constructor(opt_options) {
const options = opt_options ? opt_options : {}; const options = opt_options ? opt_options : {};

View File

@@ -27,7 +27,7 @@ import {fromExtent as polygonFromExtent} from '../geom/Polygon.js';
*/ */
class ZoomToExtent extends Control { class ZoomToExtent extends Control {
/** /**
* @param {Options=} opt_options Options. * @param {Options} [opt_options] Options.
*/ */
constructor(opt_options) { constructor(opt_options) {
const options = opt_options ? opt_options : {}; const options = opt_options ? opt_options : {};

View File

@@ -135,7 +135,7 @@ export function closestOnSegment(coordinate, segment) {
* var out = stringifyFunc(coord); * var out = stringifyFunc(coord);
* // out is now '7.85, 47.98' * // out is now '7.85, 47.98'
* *
* @param {number=} opt_fractionDigits The number of digits to include * @param {number} [opt_fractionDigits] The number of digits to include
* after the decimal point. Default is `0`. * after the decimal point. Default is `0`.
* @return {CoordinateFormat} Coordinate format. * @return {CoordinateFormat} Coordinate format.
* @api * @api
@@ -155,7 +155,7 @@ export function createStringXY(opt_fractionDigits) {
/** /**
* @param {string} hemispheres Hemispheres. * @param {string} hemispheres Hemispheres.
* @param {number} degrees Degrees. * @param {number} degrees Degrees.
* @param {number=} opt_fractionDigits The number of digits to include * @param {number} [opt_fractionDigits] The number of digits to include
* after the decimal point. Default is `0`. * after the decimal point. Default is `0`.
* @return {string} String. * @return {string} String.
*/ */
@@ -219,7 +219,7 @@ export function degreesToStringHDMS(hemispheres, degrees, opt_fractionDigits) {
* @param {Coordinate} coordinate Coordinate. * @param {Coordinate} coordinate Coordinate.
* @param {string} template A template string with `{x}` and `{y}` placeholders * @param {string} template A template string with `{x}` and `{y}` placeholders
* that will be replaced by first and second coordinate values. * that will be replaced by first and second coordinate values.
* @param {number=} opt_fractionDigits The number of digits to include * @param {number} [opt_fractionDigits] The number of digits to include
* after the decimal point. Default is `0`. * after the decimal point. Default is `0`.
* @return {string} Formatted coordinate. * @return {string} Formatted coordinate.
* @api * @api
@@ -354,7 +354,7 @@ export function squaredDistanceToSegment(coordinate, segment) {
* // out is now '47° 58 60.0″ N 7° 50 60.0″ E' * // out is now '47° 58 60.0″ N 7° 50 60.0″ E'
* *
* @param {Coordinate} coordinate Coordinate. * @param {Coordinate} coordinate Coordinate.
* @param {number=} opt_fractionDigits The number of digits to include * @param {number} [opt_fractionDigits] The number of digits to include
* after the decimal point. Default is `0`. * after the decimal point. Default is `0`.
* @return {string} Hemisphere, degrees, minutes and seconds. * @return {string} Hemisphere, degrees, minutes and seconds.
* @api * @api
@@ -391,7 +391,7 @@ export function toStringHDMS(coordinate, opt_fractionDigits) {
* // out is now '7.8, 48.0' * // out is now '7.8, 48.0'
* *
* @param {Coordinate} coordinate Coordinate. * @param {Coordinate} coordinate Coordinate.
* @param {number=} opt_fractionDigits The number of digits to include * @param {number} [opt_fractionDigits] The number of digits to include
* after the decimal point. Default is `0`. * after the decimal point. Default is `0`.
* @return {string} XY. * @return {string} XY.
* @api * @api
@@ -422,7 +422,7 @@ export function wrapX(coordinate, projection) {
/** /**
* @param {Coordinate} coordinate Coordinate. * @param {Coordinate} coordinate Coordinate.
* @param {import("./proj/Projection.js").default} projection Projection. * @param {import("./proj/Projection.js").default} projection Projection.
* @param {number=} opt_sourceExtentWidth Width of the source extent. * @param {number} [opt_sourceExtentWidth] Width of the source extent.
* @return {number} Offset in world widths. * @return {number} Offset in world widths.
*/ */
export function getWorldsAway(coordinate, projection, opt_sourceExtentWidth) { export function getWorldsAway(coordinate, projection, opt_sourceExtentWidth) {

View File

@@ -7,9 +7,9 @@ import {WORKER_OFFSCREEN_CANVAS} from './has.js';
//FIXME Move this function to the canvas module //FIXME Move this function to the canvas module
/** /**
* Create an html canvas element and returns its 2d context. * Create an html canvas element and returns its 2d context.
* @param {number=} opt_width Canvas width. * @param {number} [opt_width] Canvas width.
* @param {number=} opt_height Canvas height. * @param {number} [opt_height] Canvas height.
* @param {Array<HTMLCanvasElement>=} opt_canvasPool Canvas pool to take existing canvas from. * @param {Array<HTMLCanvasElement>} [opt_canvasPool] Canvas pool to take existing canvas from.
* @return {CanvasRenderingContext2D} The context. * @return {CanvasRenderingContext2D} The context.
*/ */
export function createCanvasContext2D(opt_width, opt_height, opt_canvasPool) { export function createCanvasContext2D(opt_width, opt_height, opt_canvasPool) {

View File

@@ -39,9 +39,9 @@ import {clear} from './obj.js';
* @param {import("./events/Target.js").EventTargetLike} target Event target. * @param {import("./events/Target.js").EventTargetLike} target Event target.
* @param {string} type Event type. * @param {string} type Event type.
* @param {ListenerFunction} listener Listener. * @param {ListenerFunction} listener Listener.
* @param {Object=} opt_this Object referenced by the `this` keyword in the * @param {Object} [opt_this] Object referenced by the `this` keyword in the
* listener. Default is the `target`. * listener. Default is the `target`.
* @param {boolean=} opt_once If true, add the listener as one-off listener. * @param {boolean} [opt_once] If true, add the listener as one-off listener.
* @return {EventsKey} Unique key for the listener. * @return {EventsKey} Unique key for the listener.
*/ */
export function listen(target, type, listener, opt_this, opt_once) { export function listen(target, type, listener, opt_this, opt_once) {
@@ -80,7 +80,7 @@ export function listen(target, type, listener, opt_this, opt_once) {
* @param {import("./events/Target.js").EventTargetLike} target Event target. * @param {import("./events/Target.js").EventTargetLike} target Event target.
* @param {string} type Event type. * @param {string} type Event type.
* @param {ListenerFunction} listener Listener. * @param {ListenerFunction} listener Listener.
* @param {Object=} opt_this Object referenced by the `this` keyword in the * @param {Object} [opt_this] Object referenced by the `this` keyword in the
* listener. Default is the `target`. * listener. Default is the `target`.
* @return {EventsKey} Key for unlistenByKey. * @return {EventsKey} Key for unlistenByKey.
*/ */

View File

@@ -27,7 +27,7 @@ import {clear} from '../obj.js';
*/ */
class Target extends Disposable { class Target extends Disposable {
/** /**
* @param {*=} opt_target Default event target for dispatched events. * @param {*} [opt_target] Default event target for dispatched events.
*/ */
constructor(opt_target) { constructor(opt_target) {
super(); super();
@@ -147,7 +147,7 @@ class Target extends Disposable {
} }
/** /**
* @param {string=} opt_type Type. If not provided, * @param {string} [opt_type] Type. If not provided,
* `true` will be returned if this event target has any listeners. * `true` will be returned if this event target has any listeners.
* @return {boolean} Has listeners. * @return {boolean} Has listeners.
*/ */

View File

@@ -29,7 +29,7 @@ export function boundingExtent(coordinates) {
/** /**
* @param {Array<number>} xs Xs. * @param {Array<number>} xs Xs.
* @param {Array<number>} ys Ys. * @param {Array<number>} ys Ys.
* @param {Extent=} opt_extent Destination extent. * @param {Extent} [opt_extent] Destination extent.
* @private * @private
* @return {Extent} Extent. * @return {Extent} Extent.
*/ */
@@ -45,7 +45,7 @@ function _boundingExtentXYs(xs, ys, opt_extent) {
* Return extent increased by the provided value. * Return extent increased by the provided value.
* @param {Extent} extent Extent. * @param {Extent} extent Extent.
* @param {number} value The amount by which the extent should be buffered. * @param {number} value The amount by which the extent should be buffered.
* @param {Extent=} opt_extent Extent. * @param {Extent} [opt_extent] Extent.
* @return {Extent} Extent. * @return {Extent} Extent.
* @api * @api
*/ */
@@ -70,7 +70,7 @@ export function buffer(extent, value, opt_extent) {
* Creates a clone of an extent. * Creates a clone of an extent.
* *
* @param {Extent} extent Extent to clone. * @param {Extent} extent Extent to clone.
* @param {Extent=} opt_extent Extent. * @param {Extent} [opt_extent] Extent.
* @return {Extent} The clone. * @return {Extent} The clone.
*/ */
export function clone(extent, opt_extent) { export function clone(extent, opt_extent) {
@@ -202,7 +202,7 @@ export function createEmpty() {
* @param {number} minY Minimum Y. * @param {number} minY Minimum Y.
* @param {number} maxX Maximum X. * @param {number} maxX Maximum X.
* @param {number} maxY Maximum Y. * @param {number} maxY Maximum Y.
* @param {Extent=} opt_extent Destination extent. * @param {Extent} [opt_extent] Destination extent.
* @return {Extent} Extent. * @return {Extent} Extent.
*/ */
export function createOrUpdate(minX, minY, maxX, maxY, opt_extent) { export function createOrUpdate(minX, minY, maxX, maxY, opt_extent) {
@@ -219,7 +219,7 @@ export function createOrUpdate(minX, minY, maxX, maxY, opt_extent) {
/** /**
* Create a new empty extent or make the provided one empty. * Create a new empty extent or make the provided one empty.
* @param {Extent=} opt_extent Extent. * @param {Extent} [opt_extent] Extent.
* @return {Extent} Extent. * @return {Extent} Extent.
*/ */
export function createOrUpdateEmpty(opt_extent) { export function createOrUpdateEmpty(opt_extent) {
@@ -228,7 +228,7 @@ export function createOrUpdateEmpty(opt_extent) {
/** /**
* @param {import("./coordinate.js").Coordinate} coordinate Coordinate. * @param {import("./coordinate.js").Coordinate} coordinate Coordinate.
* @param {Extent=} opt_extent Extent. * @param {Extent} [opt_extent] Extent.
* @return {Extent} Extent. * @return {Extent} Extent.
*/ */
export function createOrUpdateFromCoordinate(coordinate, opt_extent) { export function createOrUpdateFromCoordinate(coordinate, opt_extent) {
@@ -239,7 +239,7 @@ export function createOrUpdateFromCoordinate(coordinate, opt_extent) {
/** /**
* @param {Array<import("./coordinate.js").Coordinate>} coordinates Coordinates. * @param {Array<import("./coordinate.js").Coordinate>} coordinates Coordinates.
* @param {Extent=} opt_extent Extent. * @param {Extent} [opt_extent] Extent.
* @return {Extent} Extent. * @return {Extent} Extent.
*/ */
export function createOrUpdateFromCoordinates(coordinates, opt_extent) { export function createOrUpdateFromCoordinates(coordinates, opt_extent) {
@@ -252,7 +252,7 @@ export function createOrUpdateFromCoordinates(coordinates, opt_extent) {
* @param {number} offset Offset. * @param {number} offset Offset.
* @param {number} end End. * @param {number} end End.
* @param {number} stride Stride. * @param {number} stride Stride.
* @param {Extent=} opt_extent Extent. * @param {Extent} [opt_extent] Extent.
* @return {Extent} Extent. * @return {Extent} Extent.
*/ */
export function createOrUpdateFromFlatCoordinates( export function createOrUpdateFromFlatCoordinates(
@@ -268,7 +268,7 @@ export function createOrUpdateFromFlatCoordinates(
/** /**
* @param {Array<Array<import("./coordinate.js").Coordinate>>} rings Rings. * @param {Array<Array<import("./coordinate.js").Coordinate>>} rings Rings.
* @param {Extent=} opt_extent Extent. * @param {Extent} [opt_extent] Extent.
* @return {Extent} Extent. * @return {Extent} Extent.
*/ */
export function createOrUpdateFromRings(rings, opt_extent) { export function createOrUpdateFromRings(rings, opt_extent) {
@@ -521,7 +521,7 @@ export function getEnlargedArea(extent1, extent2) {
* @param {number} resolution Resolution. * @param {number} resolution Resolution.
* @param {number} rotation Rotation. * @param {number} rotation Rotation.
* @param {import("./size.js").Size} size Size. * @param {import("./size.js").Size} size Size.
* @param {Extent=} opt_extent Destination extent. * @param {Extent} [opt_extent] Destination extent.
* @return {Extent} Extent. * @return {Extent} Extent.
*/ */
export function getForViewAndSize( export function getForViewAndSize(
@@ -582,7 +582,7 @@ export function getIntersectionArea(extent1, extent2) {
* Get the intersection of two extents. * Get the intersection of two extents.
* @param {Extent} extent1 Extent 1. * @param {Extent} extent1 Extent 1.
* @param {Extent} extent2 Extent 2. * @param {Extent} extent2 Extent 2.
* @param {Extent=} opt_extent Optional extent to populate with intersection. * @param {Extent} [opt_extent] Optional extent to populate with intersection.
* @return {Extent} Intersecting extent. * @return {Extent} Intersecting extent.
* @api * @api
*/ */
@@ -691,7 +691,7 @@ export function isEmpty(extent) {
/** /**
* @param {Extent} extent Extent. * @param {Extent} extent Extent.
* @param {Extent=} opt_extent Extent. * @param {Extent} [opt_extent] Extent.
* @return {Extent} Extent. * @return {Extent} Extent.
*/ */
export function returnOrUpdate(extent, opt_extent) { export function returnOrUpdate(extent, opt_extent) {
@@ -788,8 +788,8 @@ export function intersectsSegment(extent, start, end) {
* @param {Extent} extent Extent. * @param {Extent} extent Extent.
* @param {import("./proj.js").TransformFunction} transformFn Transform function. * @param {import("./proj.js").TransformFunction} transformFn Transform function.
* Called with `[minX, minY, maxX, maxY]` extent coordinates. * Called with `[minX, minY, maxX, maxY]` extent coordinates.
* @param {Extent=} opt_extent Destination extent. * @param {Extent} [opt_extent] Destination extent.
* @param {number=} opt_stops Number of stops per side used for the transform. * @param {number} [opt_stops] Number of stops per side used for the transform.
* By default only the corners are used. * By default only the corners are used.
* @return {Extent} Extent. * @return {Extent} Extent.
* @api * @api

View File

@@ -136,9 +136,9 @@ export function xhr(url, format) {
* @param {import("./extent.js").Extent} extent Extent. * @param {import("./extent.js").Extent} extent Extent.
* @param {number} resolution Resolution. * @param {number} resolution Resolution.
* @param {import("./proj/Projection.js").default} projection Projection. * @param {import("./proj/Projection.js").default} projection Projection.
* @param {function(): void=} success Success * @param {function(): void} [success] Success
* Function called when loading succeeded. * Function called when loading succeeded.
* @param {function(): void=} failure Failure * @param {function(): void} [failure] Failure
* Function called when loading failed. * Function called when loading failed.
* @this {import("./source/Vector").default} * @this {import("./source/Vector").default}
*/ */

View File

@@ -78,7 +78,7 @@ GEOMETRY_WRITERS[GeometryType.MULTI_POLYGON] = writeMultiPolygonGeometry;
*/ */
class EsriJSON extends JSONFeature { class EsriJSON extends JSONFeature {
/** /**
* @param {Options=} opt_options Options. * @param {Options} [opt_options] Options.
*/ */
constructor(opt_options) { constructor(opt_options) {
const options = opt_options ? opt_options : {}; const options = opt_options ? opt_options : {};
@@ -95,8 +95,8 @@ class EsriJSON extends JSONFeature {
/** /**
* @param {Object} object Object. * @param {Object} object Object.
* @param {import("./Feature.js").ReadOptions=} opt_options Read options. * @param {import("./Feature.js").ReadOptions} [opt_options] Read options.
* @param {string=} opt_idField Name of the field where to get the id from. * @param {string} [opt_idField] Name of the field where to get the id from.
* @protected * @protected
* @return {import("../Feature.js").default} Feature. * @return {import("../Feature.js").default} Feature.
*/ */
@@ -120,7 +120,7 @@ class EsriJSON extends JSONFeature {
/** /**
* @param {Object} object Object. * @param {Object} object Object.
* @param {import("./Feature.js").ReadOptions=} opt_options Read options. * @param {import("./Feature.js").ReadOptions} [opt_options] Read options.
* @protected * @protected
* @return {Array<Feature>} Features. * @return {Array<Feature>} Features.
*/ */
@@ -148,7 +148,7 @@ class EsriJSON extends JSONFeature {
/** /**
* @param {EsriJSONGeometry} object Object. * @param {EsriJSONGeometry} object Object.
* @param {import("./Feature.js").ReadOptions=} opt_options Read options. * @param {import("./Feature.js").ReadOptions} [opt_options] Read options.
* @protected * @protected
* @return {import("../geom/Geometry.js").default} Geometry. * @return {import("../geom/Geometry.js").default} Geometry.
*/ */
@@ -180,7 +180,7 @@ class EsriJSON extends JSONFeature {
* Encode a geometry as a EsriJSON object. * Encode a geometry as a EsriJSON object.
* *
* @param {import("../geom/Geometry.js").default} geometry Geometry. * @param {import("../geom/Geometry.js").default} geometry Geometry.
* @param {import("./Feature.js").WriteOptions=} opt_options Write options. * @param {import("./Feature.js").WriteOptions} [opt_options] Write options.
* @return {EsriJSONGeometry} Object. * @return {EsriJSONGeometry} Object.
* @api * @api
*/ */
@@ -192,7 +192,7 @@ class EsriJSON extends JSONFeature {
* Encode a feature as a esriJSON Feature object. * Encode a feature as a esriJSON Feature object.
* *
* @param {import("../Feature.js").default} feature Feature. * @param {import("../Feature.js").default} feature Feature.
* @param {import("./Feature.js").WriteOptions=} opt_options Write options. * @param {import("./Feature.js").WriteOptions} [opt_options] Write options.
* @return {Object} Object. * @return {Object} Object.
* @api * @api
*/ */
@@ -231,7 +231,7 @@ class EsriJSON extends JSONFeature {
* Encode an array of features as a EsriJSON object. * Encode an array of features as a EsriJSON object.
* *
* @param {Array<import("../Feature.js").default>} features Features. * @param {Array<import("../Feature.js").default>} features Features.
* @param {import("./Feature.js").WriteOptions=} opt_options Write options. * @param {import("./Feature.js").WriteOptions} [opt_options] Write options.
* @return {EsriJSONFeatureSet} EsriJSON Object. * @return {EsriJSONFeatureSet} EsriJSON Object.
* @api * @api
*/ */
@@ -249,7 +249,7 @@ class EsriJSON extends JSONFeature {
/** /**
* @param {EsriJSONGeometry} object Object. * @param {EsriJSONGeometry} object Object.
* @param {import("./Feature.js").ReadOptions=} opt_options Read options. * @param {import("./Feature.js").ReadOptions} [opt_options] Read options.
* @return {import("../geom/Geometry.js").default} Geometry. * @return {import("../geom/Geometry.js").default} Geometry.
*/ */
function readGeometry(object, opt_options) { function readGeometry(object, opt_options) {
@@ -429,7 +429,7 @@ function readPolygonGeometry(object) {
/** /**
* @param {import("../geom/Point.js").default} geometry Geometry. * @param {import("../geom/Point.js").default} geometry Geometry.
* @param {import("./Feature.js").WriteOptions=} opt_options Write options. * @param {import("./Feature.js").WriteOptions} [opt_options] Write options.
* @return {EsriJSONPoint} EsriJSON geometry. * @return {EsriJSONPoint} EsriJSON geometry.
*/ */
function writePointGeometry(geometry, opt_options) { function writePointGeometry(geometry, opt_options) {
@@ -481,7 +481,7 @@ function getHasZM(geometry) {
/** /**
* @param {import("../geom/LineString.js").default} lineString Geometry. * @param {import("../geom/LineString.js").default} lineString Geometry.
* @param {import("./Feature.js").WriteOptions=} opt_options Write options. * @param {import("./Feature.js").WriteOptions} [opt_options] Write options.
* @return {EsriJSONPolyline} EsriJSON geometry. * @return {EsriJSONPolyline} EsriJSON geometry.
*/ */
function writeLineStringGeometry(lineString, opt_options) { function writeLineStringGeometry(lineString, opt_options) {
@@ -497,7 +497,7 @@ function writeLineStringGeometry(lineString, opt_options) {
/** /**
* @param {import("../geom/Polygon.js").default} polygon Geometry. * @param {import("../geom/Polygon.js").default} polygon Geometry.
* @param {import("./Feature.js").WriteOptions=} opt_options Write options. * @param {import("./Feature.js").WriteOptions} [opt_options] Write options.
* @return {EsriJSONPolygon} EsriJSON geometry. * @return {EsriJSONPolygon} EsriJSON geometry.
*/ */
function writePolygonGeometry(polygon, opt_options) { function writePolygonGeometry(polygon, opt_options) {
@@ -514,7 +514,7 @@ function writePolygonGeometry(polygon, opt_options) {
/** /**
* @param {import("../geom/MultiLineString.js").default} multiLineString Geometry. * @param {import("../geom/MultiLineString.js").default} multiLineString Geometry.
* @param {import("./Feature.js").WriteOptions=} opt_options Write options. * @param {import("./Feature.js").WriteOptions} [opt_options] Write options.
* @return {EsriJSONPolyline} EsriJSON geometry. * @return {EsriJSONPolyline} EsriJSON geometry.
*/ */
function writeMultiLineStringGeometry(multiLineString, opt_options) { function writeMultiLineStringGeometry(multiLineString, opt_options) {
@@ -528,7 +528,7 @@ function writeMultiLineStringGeometry(multiLineString, opt_options) {
/** /**
* @param {import("../geom/MultiPoint.js").default} multiPoint Geometry. * @param {import("../geom/MultiPoint.js").default} multiPoint Geometry.
* @param {import("./Feature.js").WriteOptions=} opt_options Write options. * @param {import("./Feature.js").WriteOptions} [opt_options] Write options.
* @return {EsriJSONMultipoint} EsriJSON geometry. * @return {EsriJSONMultipoint} EsriJSON geometry.
*/ */
function writeMultiPointGeometry(multiPoint, opt_options) { function writeMultiPointGeometry(multiPoint, opt_options) {
@@ -542,7 +542,7 @@ function writeMultiPointGeometry(multiPoint, opt_options) {
/** /**
* @param {import("../geom/MultiPolygon.js").default} geometry Geometry. * @param {import("../geom/MultiPolygon.js").default} geometry Geometry.
* @param {import("./Feature.js").WriteOptions=} opt_options Write options. * @param {import("./Feature.js").WriteOptions} [opt_options] Write options.
* @return {EsriJSONPolygon} EsriJSON geometry. * @return {EsriJSONPolygon} EsriJSON geometry.
*/ */
function writeMultiPolygonGeometry(geometry, opt_options) { function writeMultiPolygonGeometry(geometry, opt_options) {
@@ -563,7 +563,7 @@ function writeMultiPolygonGeometry(geometry, opt_options) {
/** /**
* @param {import("../geom/Geometry.js").default} geometry Geometry. * @param {import("../geom/Geometry.js").default} geometry Geometry.
* @param {import("./Feature.js").WriteOptions=} opt_options Write options. * @param {import("./Feature.js").WriteOptions} [opt_options] Write options.
* @return {EsriJSONGeometry} EsriJSON geometry. * @return {EsriJSONGeometry} EsriJSON geometry.
*/ */
function writeGeometry(geometry, opt_options) { function writeGeometry(geometry, opt_options) {

View File

@@ -81,7 +81,7 @@ class FeatureFormat {
/** /**
* Adds the data projection to the read options. * Adds the data projection to the read options.
* @param {Document|Element|Object|string} source Source. * @param {Document|Element|Object|string} source Source.
* @param {ReadOptions=} opt_options Options. * @param {ReadOptions} [opt_options] Options.
* @return {ReadOptions|undefined} Options. * @return {ReadOptions|undefined} Options.
* @protected * @protected
*/ */
@@ -139,7 +139,7 @@ class FeatureFormat {
* *
* @abstract * @abstract
* @param {Document|Element|Object|string} source Source. * @param {Document|Element|Object|string} source Source.
* @param {ReadOptions=} opt_options Read options. * @param {ReadOptions} [opt_options] Read options.
* @return {import("../Feature.js").FeatureLike} Feature. * @return {import("../Feature.js").FeatureLike} Feature.
*/ */
readFeature(source, opt_options) { readFeature(source, opt_options) {
@@ -151,7 +151,7 @@ class FeatureFormat {
* *
* @abstract * @abstract
* @param {Document|Element|ArrayBuffer|Object|string} source Source. * @param {Document|Element|ArrayBuffer|Object|string} source Source.
* @param {ReadOptions=} opt_options Read options. * @param {ReadOptions} [opt_options] Read options.
* @return {Array<import("../Feature.js").FeatureLike>} Features. * @return {Array<import("../Feature.js").FeatureLike>} Features.
*/ */
readFeatures(source, opt_options) { readFeatures(source, opt_options) {
@@ -163,7 +163,7 @@ class FeatureFormat {
* *
* @abstract * @abstract
* @param {Document|Element|Object|string} source Source. * @param {Document|Element|Object|string} source Source.
* @param {ReadOptions=} opt_options Read options. * @param {ReadOptions} [opt_options] Read options.
* @return {import("../geom/Geometry.js").default} Geometry. * @return {import("../geom/Geometry.js").default} Geometry.
*/ */
readGeometry(source, opt_options) { readGeometry(source, opt_options) {
@@ -186,7 +186,7 @@ class FeatureFormat {
* *
* @abstract * @abstract
* @param {import("../Feature.js").default} feature Feature. * @param {import("../Feature.js").default} feature Feature.
* @param {WriteOptions=} opt_options Write options. * @param {WriteOptions} [opt_options] Write options.
* @return {string} Result. * @return {string} Result.
*/ */
writeFeature(feature, opt_options) { writeFeature(feature, opt_options) {
@@ -198,7 +198,7 @@ class FeatureFormat {
* *
* @abstract * @abstract
* @param {Array<import("../Feature.js").default>} features Features. * @param {Array<import("../Feature.js").default>} features Features.
* @param {WriteOptions=} opt_options Write options. * @param {WriteOptions} [opt_options] Write options.
* @return {string} Result. * @return {string} Result.
*/ */
writeFeatures(features, opt_options) { writeFeatures(features, opt_options) {
@@ -210,7 +210,7 @@ class FeatureFormat {
* *
* @abstract * @abstract
* @param {import("../geom/Geometry.js").default} geometry Geometry. * @param {import("../geom/Geometry.js").default} geometry Geometry.
* @param {WriteOptions=} opt_options Write options. * @param {WriteOptions} [opt_options] Write options.
* @return {string} Result. * @return {string} Result.
*/ */
writeGeometry(geometry, opt_options) { writeGeometry(geometry, opt_options) {
@@ -223,7 +223,7 @@ export default FeatureFormat;
/** /**
* @param {import("../geom/Geometry.js").default} geometry Geometry. * @param {import("../geom/Geometry.js").default} geometry Geometry.
* @param {boolean} write Set to true for writing, false for reading. * @param {boolean} write Set to true for writing, false for reading.
* @param {(WriteOptions|ReadOptions)=} opt_options Options. * @param {WriteOptions|ReadOptions} [opt_options] Options.
* @return {import("../geom/Geometry.js").default} Transformed geometry. * @return {import("../geom/Geometry.js").default} Transformed geometry.
*/ */
export function transformGeometryWithOptions(geometry, write, opt_options) { export function transformGeometryWithOptions(geometry, write, opt_options) {
@@ -277,7 +277,7 @@ export function transformGeometryWithOptions(geometry, write, opt_options) {
/** /**
* @param {import("../extent.js").Extent} extent Extent. * @param {import("../extent.js").Extent} extent Extent.
* @param {ReadOptions=} opt_options Read options. * @param {ReadOptions} [opt_options] Read options.
* @return {import("../extent.js").Extent} Transformed extent. * @return {import("../extent.js").Extent} Transformed extent.
*/ */
export function transformExtentWithOptions(extent, opt_options) { export function transformExtentWithOptions(extent, opt_options) {

View File

@@ -9,7 +9,7 @@ import GML3 from './GML3.js';
* version 3.1.1. * version 3.1.1.
* Currently only supports GML 3.1.1 Simple Features profile. * Currently only supports GML 3.1.1 Simple Features profile.
* *
* @param {import("./GMLBase.js").Options=} opt_options * @param {import("./GMLBase.js").Options} [opt_options]
* Optional configuration object. * Optional configuration object.
* @api * @api
*/ */
@@ -20,7 +20,7 @@ const GML = GML3;
* *
* @function * @function
* @param {Array<import("../Feature.js").default>} features Features. * @param {Array<import("../Feature.js").default>} features Features.
* @param {import("./Feature.js").WriteOptions=} opt_options Options. * @param {import("./Feature.js").WriteOptions} [opt_options] Options.
* @return {string} Result. * @return {string} Result.
* @api * @api
*/ */
@@ -31,7 +31,7 @@ GML.prototype.writeFeatures;
* *
* @function * @function
* @param {Array<import("../Feature.js").default>} features Features. * @param {Array<import("../Feature.js").default>} features Features.
* @param {import("./Feature.js").WriteOptions=} opt_options Options. * @param {import("./Feature.js").WriteOptions} [opt_options] Options.
* @return {Node} Node. * @return {Node} Node.
* @api * @api
*/ */

View File

@@ -49,7 +49,7 @@ const MULTIGEOMETRY_TO_MEMBER_NODENAME = {
*/ */
class GML2 extends GMLBase { class GML2 extends GMLBase {
/** /**
* @param {import("./GMLBase.js").Options=} opt_options Optional configuration object. * @param {import("./GMLBase.js").Options} [opt_options] Optional configuration object.
*/ */
constructor(opt_options) { constructor(opt_options) {
const options = const options =
@@ -170,7 +170,7 @@ class GML2 extends GMLBase {
* @const * @const
* @param {*} value Value. * @param {*} value Value.
* @param {Array<*>} objectStack Object stack. * @param {Array<*>} objectStack Object stack.
* @param {string=} opt_nodeName Node name. * @param {string} [opt_nodeName] Node name.
* @return {Element|undefined} Node. * @return {Element|undefined} Node.
* @private * @private
*/ */
@@ -434,7 +434,7 @@ class GML2 extends GMLBase {
/** /**
* @param {*} value Value. * @param {*} value Value.
* @param {Array<*>} objectStack Object stack. * @param {Array<*>} objectStack Object stack.
* @param {string=} opt_nodeName Node name. * @param {string} [opt_nodeName] Node name.
* @return {Node} Node. * @return {Node} Node.
* @private * @private
*/ */
@@ -476,8 +476,8 @@ class GML2 extends GMLBase {
/** /**
* @param {Array<number>} point Point geometry. * @param {Array<number>} point Point geometry.
* @param {string=} opt_srsName Optional srsName * @param {string} [opt_srsName] Optional srsName
* @param {boolean=} opt_hasZ whether the geometry has a Z coordinate (is 3D) or not. * @param {boolean} [opt_hasZ] whether the geometry has a Z coordinate (is 3D) or not.
* @return {string} The coords string. * @return {string} The coords string.
* @private * @private
*/ */
@@ -636,7 +636,7 @@ class GML2 extends GMLBase {
* @const * @const
* @param {*} value Value. * @param {*} value Value.
* @param {Array<*>} objectStack Object stack. * @param {Array<*>} objectStack Object stack.
* @param {string=} opt_nodeName Node name. * @param {string} [opt_nodeName] Node name.
* @return {Node|undefined} Node. * @return {Node|undefined} Node.
* @private * @private
*/ */

View File

@@ -62,7 +62,7 @@ const MULTIGEOMETRY_TO_MEMBER_NODENAME = {
*/ */
class GML3 extends GMLBase { class GML3 extends GMLBase {
/** /**
* @param {import("./GMLBase.js").Options=} opt_options Optional configuration object. * @param {import("./GMLBase.js").Options} [opt_options] Optional configuration object.
*/ */
constructor(opt_options) { constructor(opt_options) {
const options = const options =
@@ -466,8 +466,8 @@ class GML3 extends GMLBase {
/** /**
* @param {Array<number>} point Point geometry. * @param {Array<number>} point Point geometry.
* @param {string=} opt_srsName Optional srsName * @param {string} [opt_srsName] Optional srsName
* @param {boolean=} opt_hasZ whether the geometry has a Z coordinate (is 3D) or not. * @param {boolean} [opt_hasZ] whether the geometry has a Z coordinate (is 3D) or not.
* @return {string} The coords string. * @return {string} The coords string.
* @private * @private
*/ */
@@ -573,7 +573,7 @@ class GML3 extends GMLBase {
/** /**
* @param {*} value Value. * @param {*} value Value.
* @param {Array<*>} objectStack Object stack. * @param {Array<*>} objectStack Object stack.
* @param {string=} opt_nodeName Node name. * @param {string} [opt_nodeName] Node name.
* @return {Node} Node. * @return {Node} Node.
* @private * @private
*/ */
@@ -920,7 +920,7 @@ class GML3 extends GMLBase {
* @const * @const
* @param {*} value Value. * @param {*} value Value.
* @param {Array<*>} objectStack Object stack. * @param {Array<*>} objectStack Object stack.
* @param {string=} opt_nodeName Node name. * @param {string} [opt_nodeName] Node name.
* @return {Node|undefined} Node. * @return {Node|undefined} Node.
* @private * @private
*/ */
@@ -936,7 +936,7 @@ class GML3 extends GMLBase {
* @const * @const
* @param {*} value Value. * @param {*} value Value.
* @param {Array<*>} objectStack Object stack. * @param {Array<*>} objectStack Object stack.
* @param {string=} opt_nodeName Node name. * @param {string} [opt_nodeName] Node name.
* @return {Element|undefined} Node. * @return {Element|undefined} Node.
* @private * @private
*/ */
@@ -968,7 +968,7 @@ class GML3 extends GMLBase {
* Encode a geometry in GML 3.1.1 Simple Features. * Encode a geometry in GML 3.1.1 Simple Features.
* *
* @param {import("../geom/Geometry.js").default} geometry Geometry. * @param {import("../geom/Geometry.js").default} geometry Geometry.
* @param {import("./Feature.js").WriteOptions=} opt_options Options. * @param {import("./Feature.js").WriteOptions} [opt_options] Options.
* @return {Node} Node. * @return {Node} Node.
* @api * @api
*/ */
@@ -995,7 +995,7 @@ class GML3 extends GMLBase {
* Encode an array of features in the GML 3.1.1 format as an XML node. * Encode an array of features in the GML 3.1.1 format as an XML node.
* *
* @param {Array<import("../Feature.js").default>} features Features. * @param {Array<import("../Feature.js").default>} features Features.
* @param {import("./Feature.js").WriteOptions=} opt_options Options. * @param {import("./Feature.js").WriteOptions} [opt_options] Options.
* @return {Element} Node. * @return {Element} Node.
* @api * @api
*/ */
@@ -1169,7 +1169,7 @@ GML3.prototype.SEGMENTS_PARSERS = {
* *
* @function * @function
* @param {Array<import("../Feature.js").default>} features Features. * @param {Array<import("../Feature.js").default>} features Features.
* @param {import("./Feature.js").WriteOptions=} opt_options Options. * @param {import("./Feature.js").WriteOptions} [opt_options] Options.
* @return {string} Result. * @return {string} Result.
* @api * @api
*/ */

View File

@@ -14,7 +14,7 @@ import {writeStringTextNode} from '../format/xsd.js';
*/ */
class GML32 extends GML3 { class GML32 extends GML3 {
/** /**
* @param {import("./GMLBase.js").Options=} opt_options Optional configuration object. * @param {import("./GMLBase.js").Options} [opt_options] Optional configuration object.
*/ */
constructor(opt_options) { constructor(opt_options) {
const options = /** @type {import("./GMLBase.js").Options} */ (opt_options const options = /** @type {import("./GMLBase.js").Options} */ (opt_options

View File

@@ -93,7 +93,7 @@ const ONLY_WHITESPACE_RE = /^[\s\xa0]*$/;
*/ */
class GMLBase extends XMLFeature { class GMLBase extends XMLFeature {
/** /**
* @param {Options=} opt_options Optional configuration object. * @param {Options} [opt_options] Optional configuration object.
*/ */
constructor(opt_options) { constructor(opt_options) {
super(); super();
@@ -532,7 +532,7 @@ class GMLBase extends XMLFeature {
/** /**
* @param {Element} node Node. * @param {Element} node Node.
* @param {import("./Feature.js").ReadOptions=} opt_options Options. * @param {import("./Feature.js").ReadOptions} [opt_options] Options.
* @protected * @protected
* @return {import("../geom/Geometry.js").default|import("../extent.js").Extent} Geometry. * @return {import("../geom/Geometry.js").default|import("../extent.js").Extent} Geometry.
*/ */
@@ -546,7 +546,7 @@ class GMLBase extends XMLFeature {
/** /**
* @param {Element} node Node. * @param {Element} node Node.
* @param {import("./Feature.js").ReadOptions=} opt_options Options. * @param {import("./Feature.js").ReadOptions} [opt_options] Options.
* @return {Array<import("../Feature.js").default>} Features. * @return {Array<import("../Feature.js").default>} Features.
*/ */
readFeaturesFromNode(node, opt_options) { readFeaturesFromNode(node, opt_options) {

View File

@@ -131,7 +131,7 @@ const GPX_SERIALIZERS = makeStructureNS(NAMESPACE_URIS, {
*/ */
class GPX extends XMLFeature { class GPX extends XMLFeature {
/** /**
* @param {Options=} opt_options Options. * @param {Options} [opt_options] Options.
*/ */
constructor(opt_options) { constructor(opt_options) {
super(); super();
@@ -170,7 +170,7 @@ class GPX extends XMLFeature {
/** /**
* @param {Element} node Node. * @param {Element} node Node.
* @param {import("./Feature.js").ReadOptions=} opt_options Options. * @param {import("./Feature.js").ReadOptions} [opt_options] Options.
* @return {import("../Feature.js").default} Feature. * @return {import("../Feature.js").default} Feature.
*/ */
readFeatureFromNode(node, opt_options) { readFeatureFromNode(node, opt_options) {
@@ -193,7 +193,7 @@ class GPX extends XMLFeature {
/** /**
* @param {Element} node Node. * @param {Element} node Node.
* @param {import("./Feature.js").ReadOptions=} opt_options Options. * @param {import("./Feature.js").ReadOptions} [opt_options] Options.
* @return {Array<import("../Feature.js").default>} Features. * @return {Array<import("../Feature.js").default>} Features.
*/ */
readFeaturesFromNode(node, opt_options) { readFeaturesFromNode(node, opt_options) {
@@ -221,7 +221,7 @@ class GPX extends XMLFeature {
* as tracks (`<trk>`). * as tracks (`<trk>`).
* *
* @param {Array<Feature>} features Features. * @param {Array<Feature>} features Features.
* @param {import("./Feature.js").WriteOptions=} opt_options Options. * @param {import("./Feature.js").WriteOptions} [opt_options] Options.
* @return {Node} Node. * @return {Node} Node.
* @api * @api
*/ */
@@ -508,7 +508,7 @@ const GEOMETRY_TYPE_TO_NODENAME = {
/** /**
* @param {*} value Value. * @param {*} value Value.
* @param {Array<*>} objectStack Object stack. * @param {Array<*>} objectStack Object stack.
* @param {string=} opt_nodeName Node name. * @param {string} [opt_nodeName] Node name.
* @return {Node|undefined} Node. * @return {Node|undefined} Node.
*/ */
function GPX_NODE_FACTORY(value, objectStack, opt_nodeName) { function GPX_NODE_FACTORY(value, objectStack, opt_nodeName) {
@@ -557,7 +557,7 @@ function appendCoordinate(flatCoordinates, layoutOptions, node, values) {
* *
* @param {LayoutOptions} layoutOptions Layout options. * @param {LayoutOptions} layoutOptions Layout options.
* @param {Array<number>} flatCoordinates Flat coordinates. * @param {Array<number>} flatCoordinates Flat coordinates.
* @param {Array<number>=} ends Ends. * @param {Array<number>} [ends] Ends.
* @return {import("../geom/GeometryLayout.js").default} Layout. * @return {import("../geom/GeometryLayout.js").default} Layout.
*/ */
function applyLayoutOptions(layoutOptions, flatCoordinates, ends) { function applyLayoutOptions(layoutOptions, flatCoordinates, ends) {

View File

@@ -51,7 +51,7 @@ import {transformGeometryWithOptions} from './Feature.js';
*/ */
class GeoJSON extends JSONFeature { class GeoJSON extends JSONFeature {
/** /**
* @param {Options=} opt_options Options. * @param {Options} [opt_options] Options.
*/ */
constructor(opt_options) { constructor(opt_options) {
const options = opt_options ? opt_options : {}; const options = opt_options ? opt_options : {};
@@ -86,7 +86,7 @@ class GeoJSON extends JSONFeature {
/** /**
* @param {Object} object Object. * @param {Object} object Object.
* @param {import("./Feature.js").ReadOptions=} opt_options Read options. * @param {import("./Feature.js").ReadOptions} [opt_options] Read options.
* @protected * @protected
* @return {import("../Feature.js").default} Feature. * @return {import("../Feature.js").default} Feature.
*/ */
@@ -129,7 +129,7 @@ class GeoJSON extends JSONFeature {
/** /**
* @param {Object} object Object. * @param {Object} object Object.
* @param {import("./Feature.js").ReadOptions=} opt_options Read options. * @param {import("./Feature.js").ReadOptions} [opt_options] Read options.
* @protected * @protected
* @return {Array<Feature>} Features. * @return {Array<Feature>} Features.
*/ */
@@ -154,7 +154,7 @@ class GeoJSON extends JSONFeature {
/** /**
* @param {GeoJSONGeometry} object Object. * @param {GeoJSONGeometry} object Object.
* @param {import("./Feature.js").ReadOptions=} opt_options Read options. * @param {import("./Feature.js").ReadOptions} [opt_options] Read options.
* @protected * @protected
* @return {import("../geom/Geometry.js").default} Geometry. * @return {import("../geom/Geometry.js").default} Geometry.
*/ */
@@ -188,7 +188,7 @@ class GeoJSON extends JSONFeature {
* Encode a feature as a GeoJSON Feature object. * Encode a feature as a GeoJSON Feature object.
* *
* @param {import("../Feature.js").default} feature Feature. * @param {import("../Feature.js").default} feature Feature.
* @param {import("./Feature.js").WriteOptions=} opt_options Write options. * @param {import("./Feature.js").WriteOptions} [opt_options] Write options.
* @return {GeoJSONFeature} Object. * @return {GeoJSONFeature} Object.
* @api * @api
*/ */
@@ -230,7 +230,7 @@ class GeoJSON extends JSONFeature {
* Encode an array of features as a GeoJSON object. * Encode an array of features as a GeoJSON object.
* *
* @param {Array<import("../Feature.js").default>} features Features. * @param {Array<import("../Feature.js").default>} features Features.
* @param {import("./Feature.js").WriteOptions=} opt_options Write options. * @param {import("./Feature.js").WriteOptions} [opt_options] Write options.
* @return {GeoJSONFeatureCollection} GeoJSON Object. * @return {GeoJSONFeatureCollection} GeoJSON Object.
* @api * @api
*/ */
@@ -250,7 +250,7 @@ class GeoJSON extends JSONFeature {
* Encode a geometry as a GeoJSON object. * Encode a geometry as a GeoJSON object.
* *
* @param {import("../geom/Geometry.js").default} geometry Geometry. * @param {import("../geom/Geometry.js").default} geometry Geometry.
* @param {import("./Feature.js").WriteOptions=} opt_options Write options. * @param {import("./Feature.js").WriteOptions} [opt_options] Write options.
* @return {GeoJSONGeometry|GeoJSONGeometryCollection} Object. * @return {GeoJSONGeometry|GeoJSONGeometryCollection} Object.
* @api * @api
*/ */
@@ -261,7 +261,7 @@ class GeoJSON extends JSONFeature {
/** /**
* @param {GeoJSONGeometry|GeoJSONGeometryCollection} object Object. * @param {GeoJSONGeometry|GeoJSONGeometryCollection} object Object.
* @param {import("./Feature.js").ReadOptions=} opt_options Read options. * @param {import("./Feature.js").ReadOptions} [opt_options] Read options.
* @return {import("../geom/Geometry.js").default} Geometry. * @return {import("../geom/Geometry.js").default} Geometry.
*/ */
function readGeometry(object, opt_options) { function readGeometry(object, opt_options) {
@@ -321,7 +321,7 @@ function readGeometry(object, opt_options) {
/** /**
* @param {GeoJSONGeometryCollection} object Object. * @param {GeoJSONGeometryCollection} object Object.
* @param {import("./Feature.js").ReadOptions=} opt_options Read options. * @param {import("./Feature.js").ReadOptions} [opt_options] Read options.
* @return {GeometryCollection} Geometry collection. * @return {GeometryCollection} Geometry collection.
*/ */
function readGeometryCollectionGeometry(object, opt_options) { function readGeometryCollectionGeometry(object, opt_options) {
@@ -387,7 +387,7 @@ function readPolygonGeometry(object) {
/** /**
* @param {import("../geom/Geometry.js").default} geometry Geometry. * @param {import("../geom/Geometry.js").default} geometry Geometry.
* @param {import("./Feature.js").WriteOptions=} opt_options Write options. * @param {import("./Feature.js").WriteOptions} [opt_options] Write options.
* @return {GeoJSONGeometry} GeoJSON geometry. * @return {GeoJSONGeometry} GeoJSON geometry.
*/ */
function writeGeometry(geometry, opt_options) { function writeGeometry(geometry, opt_options) {
@@ -462,7 +462,7 @@ function writeGeometry(geometry, opt_options) {
/** /**
* @param {GeometryCollection} geometry Geometry. * @param {GeometryCollection} geometry Geometry.
* @param {import("./Feature.js").WriteOptions=} opt_options Write options. * @param {import("./Feature.js").WriteOptions} [opt_options] Write options.
* @return {GeoJSONGeometryCollection} GeoJSON geometry collection. * @return {GeoJSONGeometryCollection} GeoJSON geometry collection.
*/ */
function writeGeometryCollectionGeometry(geometry, opt_options) { function writeGeometryCollectionGeometry(geometry, opt_options) {
@@ -479,7 +479,7 @@ function writeGeometryCollectionGeometry(geometry, opt_options) {
/** /**
* @param {LineString} geometry Geometry. * @param {LineString} geometry Geometry.
* @param {import("./Feature.js").WriteOptions=} opt_options Write options. * @param {import("./Feature.js").WriteOptions} [opt_options] Write options.
* @return {GeoJSONGeometry} GeoJSON geometry. * @return {GeoJSONGeometry} GeoJSON geometry.
*/ */
function writeLineStringGeometry(geometry, opt_options) { function writeLineStringGeometry(geometry, opt_options) {
@@ -491,7 +491,7 @@ function writeLineStringGeometry(geometry, opt_options) {
/** /**
* @param {MultiLineString} geometry Geometry. * @param {MultiLineString} geometry Geometry.
* @param {import("./Feature.js").WriteOptions=} opt_options Write options. * @param {import("./Feature.js").WriteOptions} [opt_options] Write options.
* @return {GeoJSONGeometry} GeoJSON geometry. * @return {GeoJSONGeometry} GeoJSON geometry.
*/ */
function writeMultiLineStringGeometry(geometry, opt_options) { function writeMultiLineStringGeometry(geometry, opt_options) {
@@ -503,7 +503,7 @@ function writeMultiLineStringGeometry(geometry, opt_options) {
/** /**
* @param {MultiPoint} geometry Geometry. * @param {MultiPoint} geometry Geometry.
* @param {import("./Feature.js").WriteOptions=} opt_options Write options. * @param {import("./Feature.js").WriteOptions} [opt_options] Write options.
* @return {GeoJSONGeometry} GeoJSON geometry. * @return {GeoJSONGeometry} GeoJSON geometry.
*/ */
function writeMultiPointGeometry(geometry, opt_options) { function writeMultiPointGeometry(geometry, opt_options) {
@@ -515,7 +515,7 @@ function writeMultiPointGeometry(geometry, opt_options) {
/** /**
* @param {MultiPolygon} geometry Geometry. * @param {MultiPolygon} geometry Geometry.
* @param {import("./Feature.js").WriteOptions=} opt_options Write options. * @param {import("./Feature.js").WriteOptions} [opt_options] Write options.
* @return {GeoJSONGeometry} GeoJSON geometry. * @return {GeoJSONGeometry} GeoJSON geometry.
*/ */
function writeMultiPolygonGeometry(geometry, opt_options) { function writeMultiPolygonGeometry(geometry, opt_options) {
@@ -531,7 +531,7 @@ function writeMultiPolygonGeometry(geometry, opt_options) {
/** /**
* @param {Point} geometry Geometry. * @param {Point} geometry Geometry.
* @param {import("./Feature.js").WriteOptions=} opt_options Write options. * @param {import("./Feature.js").WriteOptions} [opt_options] Write options.
* @return {GeoJSONGeometry} GeoJSON geometry. * @return {GeoJSONGeometry} GeoJSON geometry.
*/ */
function writePointGeometry(geometry, opt_options) { function writePointGeometry(geometry, opt_options) {
@@ -543,7 +543,7 @@ function writePointGeometry(geometry, opt_options) {
/** /**
* @param {Polygon} geometry Geometry. * @param {Polygon} geometry Geometry.
* @param {import("./Feature.js").WriteOptions=} opt_options Write options. * @param {import("./Feature.js").WriteOptions} [opt_options] Write options.
* @return {GeoJSONGeometry} GeoJSON geometry. * @return {GeoJSONGeometry} GeoJSON geometry.
*/ */
function writePolygonGeometry(geometry, opt_options) { function writePolygonGeometry(geometry, opt_options) {

View File

@@ -62,7 +62,7 @@ const NEWLINE_RE = /\r\n|\r|\n/;
*/ */
class IGC extends TextFeature { class IGC extends TextFeature {
/** /**
* @param {Options=} opt_options Options. * @param {Options} [opt_options] Options.
*/ */
constructor(opt_options) { constructor(opt_options) {
super(); super();
@@ -86,7 +86,7 @@ class IGC extends TextFeature {
/** /**
* @protected * @protected
* @param {string} text Text. * @param {string} text Text.
* @param {import("./Feature.js").ReadOptions=} opt_options Read options. * @param {import("./Feature.js").ReadOptions} [opt_options] Read options.
* @return {import("../Feature.js").default} Feature. * @return {import("../Feature.js").default} Feature.
*/ */
readFeatureFromText(text, opt_options) { readFeatureFromText(text, opt_options) {
@@ -166,7 +166,7 @@ class IGC extends TextFeature {
/** /**
* @param {string} text Text. * @param {string} text Text.
* @param {import("./Feature.js").ReadOptions=} opt_options Read options. * @param {import("./Feature.js").ReadOptions} [opt_options] Read options.
* @protected * @protected
* @return {Array<Feature>} Features. * @return {Array<Feature>} Features.
*/ */

View File

@@ -435,7 +435,7 @@ class IIIFInfo {
} }
/** /**
* @param {PreferredOptions=} opt_preferredOptions Optional options for preferred format and quality. * @param {PreferredOptions} [opt_preferredOptions] Optional options for preferred format and quality.
* @return {import("../source/IIIF.js").Options} IIIF tile source ready constructor options. * @return {import("../source/IIIF.js").Options} IIIF tile source ready constructor options.
* @api * @api
*/ */

View File

@@ -30,7 +30,7 @@ class JSONFeature extends FeatureFormat {
* read a feature collection. * read a feature collection.
* *
* @param {ArrayBuffer|Document|Element|Object|string} source Source. * @param {ArrayBuffer|Document|Element|Object|string} source Source.
* @param {import("./Feature.js").ReadOptions=} opt_options Read options. * @param {import("./Feature.js").ReadOptions} [opt_options] Read options.
* @return {import("../Feature.js").default} Feature. * @return {import("../Feature.js").default} Feature.
* @api * @api
*/ */
@@ -46,7 +46,7 @@ class JSONFeature extends FeatureFormat {
* collection. * collection.
* *
* @param {ArrayBuffer|Document|Element|Object|string} source Source. * @param {ArrayBuffer|Document|Element|Object|string} source Source.
* @param {import("./Feature.js").ReadOptions=} opt_options Read options. * @param {import("./Feature.js").ReadOptions} [opt_options] Read options.
* @return {Array<import("../Feature.js").default>} Features. * @return {Array<import("../Feature.js").default>} Features.
* @api * @api
*/ */
@@ -60,7 +60,7 @@ class JSONFeature extends FeatureFormat {
/** /**
* @abstract * @abstract
* @param {Object} object Object. * @param {Object} object Object.
* @param {import("./Feature.js").ReadOptions=} opt_options Read options. * @param {import("./Feature.js").ReadOptions} [opt_options] Read options.
* @protected * @protected
* @return {import("../Feature.js").default} Feature. * @return {import("../Feature.js").default} Feature.
*/ */
@@ -71,7 +71,7 @@ class JSONFeature extends FeatureFormat {
/** /**
* @abstract * @abstract
* @param {Object} object Object. * @param {Object} object Object.
* @param {import("./Feature.js").ReadOptions=} opt_options Read options. * @param {import("./Feature.js").ReadOptions} [opt_options] Read options.
* @protected * @protected
* @return {Array<import("../Feature.js").default>} Features. * @return {Array<import("../Feature.js").default>} Features.
*/ */
@@ -83,7 +83,7 @@ class JSONFeature extends FeatureFormat {
* Read a geometry. * Read a geometry.
* *
* @param {ArrayBuffer|Document|Element|Object|string} source Source. * @param {ArrayBuffer|Document|Element|Object|string} source Source.
* @param {import("./Feature.js").ReadOptions=} opt_options Read options. * @param {import("./Feature.js").ReadOptions} [opt_options] Read options.
* @return {import("../geom/Geometry.js").default} Geometry. * @return {import("../geom/Geometry.js").default} Geometry.
* @api * @api
*/ */
@@ -97,7 +97,7 @@ class JSONFeature extends FeatureFormat {
/** /**
* @abstract * @abstract
* @param {Object} object Object. * @param {Object} object Object.
* @param {import("./Feature.js").ReadOptions=} opt_options Read options. * @param {import("./Feature.js").ReadOptions} [opt_options] Read options.
* @protected * @protected
* @return {import("../geom/Geometry.js").default} Geometry. * @return {import("../geom/Geometry.js").default} Geometry.
*/ */
@@ -130,7 +130,7 @@ class JSONFeature extends FeatureFormat {
* Encode a feature as string. * Encode a feature as string.
* *
* @param {import("../Feature.js").default} feature Feature. * @param {import("../Feature.js").default} feature Feature.
* @param {import("./Feature.js").WriteOptions=} opt_options Write options. * @param {import("./Feature.js").WriteOptions} [opt_options] Write options.
* @return {string} Encoded feature. * @return {string} Encoded feature.
* @api * @api
*/ */
@@ -141,7 +141,7 @@ class JSONFeature extends FeatureFormat {
/** /**
* @abstract * @abstract
* @param {import("../Feature.js").default} feature Feature. * @param {import("../Feature.js").default} feature Feature.
* @param {import("./Feature.js").WriteOptions=} opt_options Write options. * @param {import("./Feature.js").WriteOptions} [opt_options] Write options.
* @return {Object} Object. * @return {Object} Object.
*/ */
writeFeatureObject(feature, opt_options) { writeFeatureObject(feature, opt_options) {
@@ -152,7 +152,7 @@ class JSONFeature extends FeatureFormat {
* Encode an array of features as string. * Encode an array of features as string.
* *
* @param {Array<import("../Feature.js").default>} features Features. * @param {Array<import("../Feature.js").default>} features Features.
* @param {import("./Feature.js").WriteOptions=} opt_options Write options. * @param {import("./Feature.js").WriteOptions} [opt_options] Write options.
* @return {string} Encoded features. * @return {string} Encoded features.
* @api * @api
*/ */
@@ -163,7 +163,7 @@ class JSONFeature extends FeatureFormat {
/** /**
* @abstract * @abstract
* @param {Array<import("../Feature.js").default>} features Features. * @param {Array<import("../Feature.js").default>} features Features.
* @param {import("./Feature.js").WriteOptions=} opt_options Write options. * @param {import("./Feature.js").WriteOptions} [opt_options] Write options.
* @return {Object} Object. * @return {Object} Object.
*/ */
writeFeaturesObject(features, opt_options) { writeFeaturesObject(features, opt_options) {
@@ -174,7 +174,7 @@ class JSONFeature extends FeatureFormat {
* Encode a geometry as string. * Encode a geometry as string.
* *
* @param {import("../geom/Geometry.js").default} geometry Geometry. * @param {import("../geom/Geometry.js").default} geometry Geometry.
* @param {import("./Feature.js").WriteOptions=} opt_options Write options. * @param {import("./Feature.js").WriteOptions} [opt_options] Write options.
* @return {string} Encoded geometry. * @return {string} Encoded geometry.
* @api * @api
*/ */
@@ -185,7 +185,7 @@ class JSONFeature extends FeatureFormat {
/** /**
* @abstract * @abstract
* @param {import("../geom/Geometry.js").default} geometry Geometry. * @param {import("../geom/Geometry.js").default} geometry Geometry.
* @param {import("./Feature.js").WriteOptions=} opt_options Write options. * @param {import("./Feature.js").WriteOptions} [opt_options] Write options.
* @return {Object} Object. * @return {Object} Object.
*/ */
writeGeometryObject(geometry, opt_options) { writeGeometryObject(geometry, opt_options) {

View File

@@ -427,7 +427,7 @@ function defaultIconUrlFunction(href) {
*/ */
class KML extends XMLFeature { class KML extends XMLFeature {
/** /**
* @param {Options=} opt_options Options. * @param {Options} [opt_options] Options.
*/ */
constructor(opt_options) { constructor(opt_options) {
super(); super();
@@ -624,7 +624,7 @@ class KML extends XMLFeature {
/** /**
* @param {Element} node Node. * @param {Element} node Node.
* @param {import("./Feature.js").ReadOptions=} opt_options Options. * @param {import("./Feature.js").ReadOptions} [opt_options] Options.
* @return {import("../Feature.js").default} Feature. * @return {import("../Feature.js").default} Feature.
*/ */
readFeatureFromNode(node, opt_options) { readFeatureFromNode(node, opt_options) {
@@ -644,7 +644,7 @@ class KML extends XMLFeature {
/** /**
* @protected * @protected
* @param {Element} node Node. * @param {Element} node Node.
* @param {import("./Feature.js").ReadOptions=} opt_options Options. * @param {import("./Feature.js").ReadOptions} [opt_options] Options.
* @return {Array<import("../Feature.js").default>} Features. * @return {Array<import("../Feature.js").default>} Features.
*/ */
readFeaturesFromNode(node, opt_options) { readFeaturesFromNode(node, opt_options) {
@@ -886,7 +886,7 @@ class KML extends XMLFeature {
* MultiPoints, MultiLineStrings, and MultiPolygons are output as MultiGeometries. * MultiPoints, MultiLineStrings, and MultiPolygons are output as MultiGeometries.
* *
* @param {Array<Feature>} features Features. * @param {Array<Feature>} features Features.
* @param {import("./Feature.js").WriteOptions=} opt_options Options. * @param {import("./Feature.js").WriteOptions} [opt_options] Options.
* @return {Node} Node. * @return {Node} Node.
* @api * @api
*/ */
@@ -2403,7 +2403,7 @@ const DOCUMENT_SERIALIZERS = makeStructureNS(NAMESPACE_URIS, {
* @const * @const
* @param {*} value Value. * @param {*} value Value.
* @param {Array<*>} objectStack Object stack. * @param {Array<*>} objectStack Object stack.
* @param {string=} opt_nodeName Node name. * @param {string} [opt_nodeName] Node name.
* @return {Node|undefined} Node. * @return {Node|undefined} Node.
*/ */
const DOCUMENT_NODE_FACTORY = function (value, objectStack, opt_nodeName) { const DOCUMENT_NODE_FACTORY = function (value, objectStack, opt_nodeName) {
@@ -2492,7 +2492,7 @@ const ICON_SERIALIZERS = makeStructureNS(
* @const * @const
* @param {*} value Value. * @param {*} value Value.
* @param {Array<*>} objectStack Object stack. * @param {Array<*>} objectStack Object stack.
* @param {string=} opt_nodeName Node name. * @param {string} [opt_nodeName] Node name.
* @return {Node|undefined} Node. * @return {Node|undefined} Node.
*/ */
const GX_NODE_FACTORY = function (value, objectStack, opt_nodeName) { const GX_NODE_FACTORY = function (value, objectStack, opt_nodeName) {
@@ -2731,7 +2731,7 @@ const GEOMETRY_TYPE_TO_NODENAME = {
* @const * @const
* @param {*} value Value. * @param {*} value Value.
* @param {Array<*>} objectStack Object stack. * @param {Array<*>} objectStack Object stack.
* @param {string=} opt_nodeName Node name. * @param {string} [opt_nodeName] Node name.
* @return {Node|undefined} Node. * @return {Node|undefined} Node.
*/ */
const GEOMETRY_NODE_FACTORY = function (value, objectStack, opt_nodeName) { const GEOMETRY_NODE_FACTORY = function (value, objectStack, opt_nodeName) {

View File

@@ -38,12 +38,12 @@ import {linearRingIsClockwise} from '../geom/flat/orient.js';
* @classdesc * @classdesc
* Feature format for reading data in the Mapbox MVT format. * Feature format for reading data in the Mapbox MVT format.
* *
* @param {Options=} opt_options Options. * @param {Options} [opt_options] Options.
* @api * @api
*/ */
class MVT extends FeatureFormat { class MVT extends FeatureFormat {
/** /**
* @param {Options=} opt_options Options. * @param {Options} [opt_options] Options.
*/ */
constructor(opt_options) { constructor(opt_options) {
super(); super();
@@ -260,7 +260,7 @@ class MVT extends FeatureFormat {
* Read all features. * Read all features.
* *
* @param {ArrayBuffer} source Source. * @param {ArrayBuffer} source Source.
* @param {import("./Feature.js").ReadOptions=} opt_options Read options. * @param {import("./Feature.js").ReadOptions} [opt_options] Read options.
* @return {Array<import("../Feature.js").FeatureLike>} Features. * @return {Array<import("../Feature.js").FeatureLike>} Features.
* @api * @api
*/ */

View File

@@ -60,7 +60,7 @@ class OSMXML extends XMLFeature {
/** /**
* @protected * @protected
* @param {Element} node Node. * @param {Element} node Node.
* @param {import("./Feature.js").ReadOptions=} opt_options Options. * @param {import("./Feature.js").ReadOptions} [opt_options] Options.
* @return {Array<import("../Feature.js").default>} Features. * @return {Array<import("../Feature.js").default>} Features.
*/ */
readFeaturesFromNode(node, opt_options) { readFeaturesFromNode(node, opt_options) {

View File

@@ -35,7 +35,7 @@ import {transformGeometryWithOptions} from './Feature.js';
*/ */
class Polyline extends TextFeature { class Polyline extends TextFeature {
/** /**
* @param {Options=} opt_options Optional configuration object. * @param {Options} [opt_options] Optional configuration object.
*/ */
constructor(opt_options) { constructor(opt_options) {
super(); super();
@@ -65,7 +65,7 @@ class Polyline extends TextFeature {
/** /**
* @protected * @protected
* @param {string} text Text. * @param {string} text Text.
* @param {import("./Feature.js").ReadOptions=} opt_options Read options. * @param {import("./Feature.js").ReadOptions} [opt_options] Read options.
* @return {import("../Feature.js").default} Feature. * @return {import("../Feature.js").default} Feature.
*/ */
readFeatureFromText(text, opt_options) { readFeatureFromText(text, opt_options) {
@@ -75,7 +75,7 @@ class Polyline extends TextFeature {
/** /**
* @param {string} text Text. * @param {string} text Text.
* @param {import("./Feature.js").ReadOptions=} opt_options Read options. * @param {import("./Feature.js").ReadOptions} [opt_options] Read options.
* @protected * @protected
* @return {Array<Feature>} Features. * @return {Array<Feature>} Features.
*/ */
@@ -86,7 +86,7 @@ class Polyline extends TextFeature {
/** /**
* @param {string} text Text. * @param {string} text Text.
* @param {import("./Feature.js").ReadOptions=} opt_options Read options. * @param {import("./Feature.js").ReadOptions} [opt_options] Read options.
* @protected * @protected
* @return {import("../geom/Geometry.js").default} Geometry. * @return {import("../geom/Geometry.js").default} Geometry.
*/ */
@@ -111,7 +111,7 @@ class Polyline extends TextFeature {
/** /**
* @param {import("../Feature.js").default} feature Features. * @param {import("../Feature.js").default} feature Features.
* @param {import("./Feature.js").WriteOptions=} opt_options Write options. * @param {import("./Feature.js").WriteOptions} [opt_options] Write options.
* @protected * @protected
* @return {string} Text. * @return {string} Text.
*/ */
@@ -127,7 +127,7 @@ class Polyline extends TextFeature {
/** /**
* @param {Array<import("../Feature.js").default>} features Features. * @param {Array<import("../Feature.js").default>} features Features.
* @param {import("./Feature.js").WriteOptions=} opt_options Write options. * @param {import("./Feature.js").WriteOptions} [opt_options] Write options.
* @protected * @protected
* @return {string} Text. * @return {string} Text.
*/ */
@@ -137,7 +137,7 @@ class Polyline extends TextFeature {
/** /**
* @param {LineString} geometry Geometry. * @param {LineString} geometry Geometry.
* @param {import("./Feature.js").WriteOptions=} opt_options Write options. * @param {import("./Feature.js").WriteOptions} [opt_options] Write options.
* @protected * @protected
* @return {string} Text. * @return {string} Text.
*/ */
@@ -163,7 +163,7 @@ class Polyline extends TextFeature {
* *
* @param {Array<number>} numbers A list of n-dimensional points. * @param {Array<number>} numbers A list of n-dimensional points.
* @param {number} stride The number of dimension of the points in the list. * @param {number} stride The number of dimension of the points in the list.
* @param {number=} opt_factor The factor by which the numbers will be * @param {number} [opt_factor] The factor by which the numbers will be
* multiplied. The remaining decimal places will get rounded away. * multiplied. The remaining decimal places will get rounded away.
* Default is `1e5`. * Default is `1e5`.
* @return {string} The encoded string. * @return {string} The encoded string.
@@ -197,7 +197,7 @@ export function encodeDeltas(numbers, stride, opt_factor) {
* @param {string} encoded An encoded string. * @param {string} encoded An encoded string.
* @param {number} stride The number of dimension of the points in the * @param {number} stride The number of dimension of the points in the
* encoded string. * encoded string.
* @param {number=} opt_factor The factor by which the resulting numbers will * @param {number} [opt_factor] The factor by which the resulting numbers will
* be divided. Default is `1e5`. * be divided. Default is `1e5`.
* @return {Array<number>} A list of n-dimensional points. * @return {Array<number>} A list of n-dimensional points.
* @api * @api
@@ -231,7 +231,7 @@ export function decodeDeltas(encoded, stride, opt_factor) {
* Attention: This function will modify the passed array! * Attention: This function will modify the passed array!
* *
* @param {Array<number>} numbers A list of floating point numbers. * @param {Array<number>} numbers A list of floating point numbers.
* @param {number=} opt_factor The factor by which the numbers will be * @param {number} [opt_factor] The factor by which the numbers will be
* multiplied. The remaining decimal places will get rounded away. * multiplied. The remaining decimal places will get rounded away.
* Default is `1e5`. * Default is `1e5`.
* @return {string} The encoded string. * @return {string} The encoded string.
@@ -250,7 +250,7 @@ export function encodeFloats(numbers, opt_factor) {
* Decode a list of floating point numbers from an encoded string * Decode a list of floating point numbers from an encoded string
* *
* @param {string} encoded An encoded string. * @param {string} encoded An encoded string.
* @param {number=} opt_factor The factor by which the result will be divided. * @param {number} [opt_factor] The factor by which the result will be divided.
* Default is `1e5`. * Default is `1e5`.
* @return {Array<number>} A list of floating point numbers. * @return {Array<number>} A list of floating point numbers.
* @api * @api

View File

@@ -29,7 +29,7 @@ class TextFeature extends FeatureFormat {
* Read the feature from the source. * Read the feature from the source.
* *
* @param {Document|Element|Object|string} source Source. * @param {Document|Element|Object|string} source Source.
* @param {import("./Feature.js").ReadOptions=} opt_options Read options. * @param {import("./Feature.js").ReadOptions} [opt_options] Read options.
* @return {import("../Feature.js").default} Feature. * @return {import("../Feature.js").default} Feature.
* @api * @api
*/ */
@@ -43,7 +43,7 @@ class TextFeature extends FeatureFormat {
/** /**
* @abstract * @abstract
* @param {string} text Text. * @param {string} text Text.
* @param {import("./Feature.js").ReadOptions=} opt_options Read options. * @param {import("./Feature.js").ReadOptions} [opt_options] Read options.
* @protected * @protected
* @return {import("../Feature.js").default} Feature. * @return {import("../Feature.js").default} Feature.
*/ */
@@ -55,7 +55,7 @@ class TextFeature extends FeatureFormat {
* Read the features from the source. * Read the features from the source.
* *
* @param {Document|Element|Object|string} source Source. * @param {Document|Element|Object|string} source Source.
* @param {import("./Feature.js").ReadOptions=} opt_options Read options. * @param {import("./Feature.js").ReadOptions} [opt_options] Read options.
* @return {Array<import("../Feature.js").default>} Features. * @return {Array<import("../Feature.js").default>} Features.
* @api * @api
*/ */
@@ -69,7 +69,7 @@ class TextFeature extends FeatureFormat {
/** /**
* @abstract * @abstract
* @param {string} text Text. * @param {string} text Text.
* @param {import("./Feature.js").ReadOptions=} opt_options Read options. * @param {import("./Feature.js").ReadOptions} [opt_options] Read options.
* @protected * @protected
* @return {Array<import("../Feature.js").default>} Features. * @return {Array<import("../Feature.js").default>} Features.
*/ */
@@ -81,7 +81,7 @@ class TextFeature extends FeatureFormat {
* Read the geometry from the source. * Read the geometry from the source.
* *
* @param {Document|Element|Object|string} source Source. * @param {Document|Element|Object|string} source Source.
* @param {import("./Feature.js").ReadOptions=} opt_options Read options. * @param {import("./Feature.js").ReadOptions} [opt_options] Read options.
* @return {import("../geom/Geometry.js").default} Geometry. * @return {import("../geom/Geometry.js").default} Geometry.
* @api * @api
*/ */
@@ -95,7 +95,7 @@ class TextFeature extends FeatureFormat {
/** /**
* @abstract * @abstract
* @param {string} text Text. * @param {string} text Text.
* @param {import("./Feature.js").ReadOptions=} opt_options Read options. * @param {import("./Feature.js").ReadOptions} [opt_options] Read options.
* @protected * @protected
* @return {import("../geom/Geometry.js").default} Geometry. * @return {import("../geom/Geometry.js").default} Geometry.
*/ */
@@ -127,7 +127,7 @@ class TextFeature extends FeatureFormat {
* Encode a feature as a string. * Encode a feature as a string.
* *
* @param {import("../Feature.js").default} feature Feature. * @param {import("../Feature.js").default} feature Feature.
* @param {import("./Feature.js").WriteOptions=} opt_options Write options. * @param {import("./Feature.js").WriteOptions} [opt_options] Write options.
* @return {string} Encoded feature. * @return {string} Encoded feature.
* @api * @api
*/ */
@@ -138,7 +138,7 @@ class TextFeature extends FeatureFormat {
/** /**
* @abstract * @abstract
* @param {import("../Feature.js").default} feature Features. * @param {import("../Feature.js").default} feature Features.
* @param {import("./Feature.js").WriteOptions=} opt_options Write options. * @param {import("./Feature.js").WriteOptions} [opt_options] Write options.
* @protected * @protected
* @return {string} Text. * @return {string} Text.
*/ */
@@ -150,7 +150,7 @@ class TextFeature extends FeatureFormat {
* Encode an array of features as string. * Encode an array of features as string.
* *
* @param {Array<import("../Feature.js").default>} features Features. * @param {Array<import("../Feature.js").default>} features Features.
* @param {import("./Feature.js").WriteOptions=} opt_options Write options. * @param {import("./Feature.js").WriteOptions} [opt_options] Write options.
* @return {string} Encoded features. * @return {string} Encoded features.
* @api * @api
*/ */
@@ -161,7 +161,7 @@ class TextFeature extends FeatureFormat {
/** /**
* @abstract * @abstract
* @param {Array<import("../Feature.js").default>} features Features. * @param {Array<import("../Feature.js").default>} features Features.
* @param {import("./Feature.js").WriteOptions=} opt_options Write options. * @param {import("./Feature.js").WriteOptions} [opt_options] Write options.
* @protected * @protected
* @return {string} Text. * @return {string} Text.
*/ */
@@ -173,7 +173,7 @@ class TextFeature extends FeatureFormat {
* Write a single geometry. * Write a single geometry.
* *
* @param {import("../geom/Geometry.js").default} geometry Geometry. * @param {import("../geom/Geometry.js").default} geometry Geometry.
* @param {import("./Feature.js").WriteOptions=} opt_options Write options. * @param {import("./Feature.js").WriteOptions} [opt_options] Write options.
* @return {string} Geometry. * @return {string} Geometry.
* @api * @api
*/ */
@@ -184,7 +184,7 @@ class TextFeature extends FeatureFormat {
/** /**
* @abstract * @abstract
* @param {import("../geom/Geometry.js").default} geometry Geometry. * @param {import("../geom/Geometry.js").default} geometry Geometry.
* @param {import("./Feature.js").WriteOptions=} opt_options Write options. * @param {import("./Feature.js").WriteOptions} [opt_options] Write options.
* @protected * @protected
* @return {string} Text. * @return {string} Text.
*/ */

View File

@@ -56,7 +56,7 @@ import {transformGeometryWithOptions} from './Feature.js';
*/ */
class TopoJSON extends JSONFeature { class TopoJSON extends JSONFeature {
/** /**
* @param {Options=} opt_options Options. * @param {Options} [opt_options] Options.
*/ */
constructor(opt_options) { constructor(opt_options) {
super(); super();
@@ -85,7 +85,7 @@ class TopoJSON extends JSONFeature {
/** /**
* @param {Object} object Object. * @param {Object} object Object.
* @param {import("./Feature.js").ReadOptions=} opt_options Read options. * @param {import("./Feature.js").ReadOptions} [opt_options] Read options.
* @protected * @protected
* @return {Array<Feature>} Features. * @return {Array<Feature>} Features.
*/ */
@@ -318,7 +318,7 @@ function readMultiPolygonGeometry(object, arcs) {
* @param {string|undefined} property Property to set the `GeometryCollection`'s parent * @param {string|undefined} property Property to set the `GeometryCollection`'s parent
* object to. * object to.
* @param {string} name Name of the `Topology`'s child object. * @param {string} name Name of the `Topology`'s child object.
* @param {import("./Feature.js").ReadOptions=} opt_options Read options. * @param {import("./Feature.js").ReadOptions} [opt_options] Read options.
* @return {Array<Feature>} Array of features. * @return {Array<Feature>} Array of features.
*/ */
function readFeaturesFromGeometryCollection( function readFeaturesFromGeometryCollection(
@@ -356,7 +356,7 @@ function readFeaturesFromGeometryCollection(
* @param {string|undefined} property Property to set the `GeometryCollection`'s parent * @param {string|undefined} property Property to set the `GeometryCollection`'s parent
* object to. * object to.
* @param {string} name Name of the `Topology`'s child object. * @param {string} name Name of the `Topology`'s child object.
* @param {import("./Feature.js").ReadOptions=} opt_options Read options. * @param {import("./Feature.js").ReadOptions} [opt_options] Read options.
* @return {Feature} Feature. * @return {Feature} Feature.
*/ */
function readFeatureFromGeometry( function readFeatureFromGeometry(

View File

@@ -266,7 +266,7 @@ const DEFAULT_VERSION = '1.1.0';
*/ */
class WFS extends XMLFeature { class WFS extends XMLFeature {
/** /**
* @param {Options=} opt_options Optional configuration object. * @param {Options} [opt_options] Optional configuration object.
*/ */
constructor(opt_options) { constructor(opt_options) {
super(); super();
@@ -325,7 +325,7 @@ class WFS extends XMLFeature {
/** /**
* @protected * @protected
* @param {Element} node Node. * @param {Element} node Node.
* @param {import("./Feature.js").ReadOptions=} opt_options Options. * @param {import("./Feature.js").ReadOptions} [opt_options] Options.
* @return {Array<import("../Feature.js").default>} Features. * @return {Array<import("../Feature.js").default>} Features.
*/ */
readFeaturesFromNode(node, opt_options) { readFeaturesFromNode(node, opt_options) {
@@ -563,9 +563,9 @@ class WFS extends XMLFeature {
* *
* @param {!string} geometryName Geometry name to use. * @param {!string} geometryName Geometry name to use.
* @param {!import("../extent.js").Extent} extent Extent. * @param {!import("../extent.js").Extent} extent Extent.
* @param {string=} opt_srsName SRS name. No srsName attribute will be * @param {string} [opt_srsName] SRS name. No srsName attribute will be
* set on geometries when this is not provided. * set on geometries when this is not provided.
* @param {import("./filter/Filter.js").default=} opt_filter Filter condition. * @param {import("./filter/Filter.js").default} [opt_filter] Filter condition.
* @return {import("./filter/Filter.js").default} The filter. * @return {import("./filter/Filter.js").default} The filter.
*/ */
combineBboxAndFilter(geometryName, extent, opt_srsName, opt_filter) { combineBboxAndFilter(geometryName, extent, opt_srsName, opt_filter) {

View File

@@ -117,7 +117,7 @@ class Lexer {
/** /**
* @param {string} c Character. * @param {string} c Character.
* @param {boolean=} opt_decimal Whether the string number * @param {boolean} [opt_decimal] Whether the string number
* contains a dot, i.e. is a decimal number. * contains a dot, i.e. is a decimal number.
* @return {boolean} Whether the character is numeric. * @return {boolean} Whether the character is numeric.
* @private * @private
@@ -604,7 +604,7 @@ class Parser {
*/ */
class WKT extends TextFeature { class WKT extends TextFeature {
/** /**
* @param {Options=} opt_options Options. * @param {Options} [opt_options] Options.
*/ */
constructor(opt_options) { constructor(opt_options) {
super(); super();
@@ -636,7 +636,7 @@ class WKT extends TextFeature {
/** /**
* @protected * @protected
* @param {string} text Text. * @param {string} text Text.
* @param {import("./Feature.js").ReadOptions=} opt_options Read options. * @param {import("./Feature.js").ReadOptions} [opt_options] Read options.
* @return {import("../Feature.js").default} Feature. * @return {import("../Feature.js").default} Feature.
*/ */
readFeatureFromText(text, opt_options) { readFeatureFromText(text, opt_options) {
@@ -651,7 +651,7 @@ class WKT extends TextFeature {
/** /**
* @param {string} text Text. * @param {string} text Text.
* @param {import("./Feature.js").ReadOptions=} opt_options Read options. * @param {import("./Feature.js").ReadOptions} [opt_options] Read options.
* @protected * @protected
* @return {Array<Feature>} Features. * @return {Array<Feature>} Features.
*/ */
@@ -677,7 +677,7 @@ class WKT extends TextFeature {
/** /**
* @param {string} text Text. * @param {string} text Text.
* @param {import("./Feature.js").ReadOptions=} opt_options Read options. * @param {import("./Feature.js").ReadOptions} [opt_options] Read options.
* @protected * @protected
* @return {import("../geom/Geometry.js").default} Geometry. * @return {import("../geom/Geometry.js").default} Geometry.
*/ */
@@ -692,7 +692,7 @@ class WKT extends TextFeature {
/** /**
* @param {import("../Feature.js").default} feature Features. * @param {import("../Feature.js").default} feature Features.
* @param {import("./Feature.js").WriteOptions=} opt_options Write options. * @param {import("./Feature.js").WriteOptions} [opt_options] Write options.
* @protected * @protected
* @return {string} Text. * @return {string} Text.
*/ */
@@ -706,7 +706,7 @@ class WKT extends TextFeature {
/** /**
* @param {Array<import("../Feature.js").default>} features Features. * @param {Array<import("../Feature.js").default>} features Features.
* @param {import("./Feature.js").WriteOptions=} opt_options Write options. * @param {import("./Feature.js").WriteOptions} [opt_options] Write options.
* @protected * @protected
* @return {string} Text. * @return {string} Text.
*/ */
@@ -724,7 +724,7 @@ class WKT extends TextFeature {
/** /**
* @param {import("../geom/Geometry.js").default} geometry Geometry. * @param {import("../geom/Geometry.js").default} geometry Geometry.
* @param {import("./Feature.js").WriteOptions=} opt_options Write options. * @param {import("./Feature.js").WriteOptions} [opt_options] Write options.
* @protected * @protected
* @return {string} Text. * @return {string} Text.
*/ */

View File

@@ -33,7 +33,7 @@ const layerIdentifier = '_layer';
*/ */
class WMSGetFeatureInfo extends XMLFeature { class WMSGetFeatureInfo extends XMLFeature {
/** /**
* @param {Options=} opt_options Options. * @param {Options} [opt_options] Options.
*/ */
constructor(opt_options) { constructor(opt_options) {
super(); super();
@@ -151,7 +151,7 @@ class WMSGetFeatureInfo extends XMLFeature {
/** /**
* @protected * @protected
* @param {Element} node Node. * @param {Element} node Node.
* @param {import("./Feature.js").ReadOptions=} opt_options Options. * @param {import("./Feature.js").ReadOptions} [opt_options] Options.
* @return {Array<import("../Feature.js").default>} Features. * @return {Array<import("../Feature.js").default>} Features.
*/ */
readFeaturesFromNode(node, opt_options) { readFeaturesFromNode(node, opt_options) {

View File

@@ -37,7 +37,7 @@ class XMLFeature extends FeatureFormat {
* Read a single feature. * Read a single feature.
* *
* @param {Document|Element|Object|string} source Source. * @param {Document|Element|Object|string} source Source.
* @param {import("./Feature.js").ReadOptions=} opt_options Read options. * @param {import("./Feature.js").ReadOptions} [opt_options] Read options.
* @return {import("../Feature.js").default} Feature. * @return {import("../Feature.js").default} Feature.
* @api * @api
*/ */
@@ -62,7 +62,7 @@ class XMLFeature extends FeatureFormat {
/** /**
* @param {Document} doc Document. * @param {Document} doc Document.
* @param {import("./Feature.js").ReadOptions=} opt_options Options. * @param {import("./Feature.js").ReadOptions} [opt_options] Options.
* @return {import("../Feature.js").default} Feature. * @return {import("../Feature.js").default} Feature.
*/ */
readFeatureFromDocument(doc, opt_options) { readFeatureFromDocument(doc, opt_options) {
@@ -76,7 +76,7 @@ class XMLFeature extends FeatureFormat {
/** /**
* @param {Element} node Node. * @param {Element} node Node.
* @param {import("./Feature.js").ReadOptions=} opt_options Options. * @param {import("./Feature.js").ReadOptions} [opt_options] Options.
* @return {import("../Feature.js").default} Feature. * @return {import("../Feature.js").default} Feature.
*/ */
readFeatureFromNode(node, opt_options) { readFeatureFromNode(node, opt_options) {
@@ -87,7 +87,7 @@ class XMLFeature extends FeatureFormat {
* Read all features from a feature collection. * Read all features from a feature collection.
* *
* @param {Document|Element|Object|string} source Source. * @param {Document|Element|Object|string} source Source.
* @param {import("./Feature.js").ReadOptions=} opt_options Options. * @param {import("./Feature.js").ReadOptions} [opt_options] Options.
* @return {Array<import("../Feature.js").default>} Features. * @return {Array<import("../Feature.js").default>} Features.
* @api * @api
*/ */
@@ -112,7 +112,7 @@ class XMLFeature extends FeatureFormat {
/** /**
* @param {Document} doc Document. * @param {Document} doc Document.
* @param {import("./Feature.js").ReadOptions=} opt_options Options. * @param {import("./Feature.js").ReadOptions} [opt_options] Options.
* @protected * @protected
* @return {Array<import("../Feature.js").default>} Features. * @return {Array<import("../Feature.js").default>} Features.
*/ */
@@ -133,7 +133,7 @@ class XMLFeature extends FeatureFormat {
/** /**
* @abstract * @abstract
* @param {Element} node Node. * @param {Element} node Node.
* @param {import("./Feature.js").ReadOptions=} opt_options Options. * @param {import("./Feature.js").ReadOptions} [opt_options] Options.
* @protected * @protected
* @return {Array<import("../Feature.js").default>} Features. * @return {Array<import("../Feature.js").default>} Features.
*/ */
@@ -145,7 +145,7 @@ class XMLFeature extends FeatureFormat {
* Read a single geometry from a source. * Read a single geometry from a source.
* *
* @param {Document|Element|Object|string} source Source. * @param {Document|Element|Object|string} source Source.
* @param {import("./Feature.js").ReadOptions=} opt_options Read options. * @param {import("./Feature.js").ReadOptions} [opt_options] Read options.
* @return {import("../geom/Geometry.js").default} Geometry. * @return {import("../geom/Geometry.js").default} Geometry.
*/ */
readGeometry(source, opt_options) { readGeometry(source, opt_options) {
@@ -169,7 +169,7 @@ class XMLFeature extends FeatureFormat {
/** /**
* @param {Document} doc Document. * @param {Document} doc Document.
* @param {import("./Feature.js").ReadOptions=} opt_options Options. * @param {import("./Feature.js").ReadOptions} [opt_options] Options.
* @protected * @protected
* @return {import("../geom/Geometry.js").default} Geometry. * @return {import("../geom/Geometry.js").default} Geometry.
*/ */
@@ -179,7 +179,7 @@ class XMLFeature extends FeatureFormat {
/** /**
* @param {Element} node Node. * @param {Element} node Node.
* @param {import("./Feature.js").ReadOptions=} opt_options Options. * @param {import("./Feature.js").ReadOptions} [opt_options] Options.
* @protected * @protected
* @return {import("../geom/Geometry.js").default} Geometry. * @return {import("../geom/Geometry.js").default} Geometry.
*/ */
@@ -229,7 +229,7 @@ class XMLFeature extends FeatureFormat {
* Encode a feature as string. * Encode a feature as string.
* *
* @param {import("../Feature.js").default} feature Feature. * @param {import("../Feature.js").default} feature Feature.
* @param {import("./Feature.js").WriteOptions=} opt_options Write options. * @param {import("./Feature.js").WriteOptions} [opt_options] Write options.
* @return {string} Encoded feature. * @return {string} Encoded feature.
*/ */
writeFeature(feature, opt_options) { writeFeature(feature, opt_options) {
@@ -239,7 +239,7 @@ class XMLFeature extends FeatureFormat {
/** /**
* @param {import("../Feature.js").default} feature Feature. * @param {import("../Feature.js").default} feature Feature.
* @param {import("./Feature.js").WriteOptions=} opt_options Options. * @param {import("./Feature.js").WriteOptions} [opt_options] Options.
* @protected * @protected
* @return {Node} Node. * @return {Node} Node.
*/ */
@@ -251,7 +251,7 @@ class XMLFeature extends FeatureFormat {
* Encode an array of features as string. * Encode an array of features as string.
* *
* @param {Array<import("../Feature.js").default>} features Features. * @param {Array<import("../Feature.js").default>} features Features.
* @param {import("./Feature.js").WriteOptions=} opt_options Write options. * @param {import("./Feature.js").WriteOptions} [opt_options] Write options.
* @return {string} Result. * @return {string} Result.
* @api * @api
*/ */
@@ -262,7 +262,7 @@ class XMLFeature extends FeatureFormat {
/** /**
* @param {Array<import("../Feature.js").default>} features Features. * @param {Array<import("../Feature.js").default>} features Features.
* @param {import("./Feature.js").WriteOptions=} opt_options Options. * @param {import("./Feature.js").WriteOptions} [opt_options] Options.
* @return {Node} Node. * @return {Node} Node.
*/ */
writeFeaturesNode(features, opt_options) { writeFeaturesNode(features, opt_options) {
@@ -273,7 +273,7 @@ class XMLFeature extends FeatureFormat {
* Encode a geometry as string. * Encode a geometry as string.
* *
* @param {import("../geom/Geometry.js").default} geometry Geometry. * @param {import("../geom/Geometry.js").default} geometry Geometry.
* @param {import("./Feature.js").WriteOptions=} opt_options Write options. * @param {import("./Feature.js").WriteOptions} [opt_options] Write options.
* @return {string} Encoded geometry. * @return {string} Encoded geometry.
*/ */
writeGeometry(geometry, opt_options) { writeGeometry(geometry, opt_options) {
@@ -283,7 +283,7 @@ class XMLFeature extends FeatureFormat {
/** /**
* @param {import("../geom/Geometry.js").default} geometry Geometry. * @param {import("../geom/Geometry.js").default} geometry Geometry.
* @param {import("./Feature.js").WriteOptions=} opt_options Options. * @param {import("./Feature.js").WriteOptions} [opt_options] Options.
* @return {Node} Node. * @return {Node} Node.
*/ */
writeGeometryNode(geometry, opt_options) { writeGeometryNode(geometry, opt_options) {

View File

@@ -63,7 +63,7 @@ export function not(condition) {
* *
* @param {!string} geometryName Geometry name to use. * @param {!string} geometryName Geometry name to use.
* @param {!import("../extent.js").Extent} extent Extent. * @param {!import("../extent.js").Extent} extent Extent.
* @param {string=} opt_srsName SRS name. No srsName attribute will be * @param {string} [opt_srsName] SRS name. No srsName attribute will be
* set on geometries when this is not provided. * set on geometries when this is not provided.
* @return {!Bbox} `<BBOX>` operator. * @return {!Bbox} `<BBOX>` operator.
* @api * @api
@@ -78,7 +78,7 @@ export function bbox(geometryName, extent, opt_srsName) {
* *
* @param {!string} geometryName Geometry name to use. * @param {!string} geometryName Geometry name to use.
* @param {!import("../geom/Geometry.js").default} geometry Geometry. * @param {!import("../geom/Geometry.js").default} geometry Geometry.
* @param {string=} opt_srsName SRS name. No srsName attribute will be * @param {string} [opt_srsName] SRS name. No srsName attribute will be
* set on geometries when this is not provided. * set on geometries when this is not provided.
* @return {!Contains} `<Contains>` operator. * @return {!Contains} `<Contains>` operator.
* @api * @api
@@ -93,7 +93,7 @@ export function contains(geometryName, geometry, opt_srsName) {
* *
* @param {!string} geometryName Geometry name to use. * @param {!string} geometryName Geometry name to use.
* @param {!import("../geom/Geometry.js").default} geometry Geometry. * @param {!import("../geom/Geometry.js").default} geometry Geometry.
* @param {string=} opt_srsName SRS name. No srsName attribute will be * @param {string} [opt_srsName] SRS name. No srsName attribute will be
* set on geometries when this is not provided. * set on geometries when this is not provided.
* @return {!Intersects} `<Intersects>` operator. * @return {!Intersects} `<Intersects>` operator.
* @api * @api
@@ -108,7 +108,7 @@ export function intersects(geometryName, geometry, opt_srsName) {
* *
* @param {!string} geometryName Geometry name to use. * @param {!string} geometryName Geometry name to use.
* @param {!import("../geom/Geometry.js").default} geometry Geometry. * @param {!import("../geom/Geometry.js").default} geometry Geometry.
* @param {string=} opt_srsName SRS name. No srsName attribute will be * @param {string} [opt_srsName] SRS name. No srsName attribute will be
* set on geometries when this is not provided. * set on geometries when this is not provided.
* @return {!Disjoint} `<Disjoint>` operator. * @return {!Disjoint} `<Disjoint>` operator.
* @api * @api
@@ -123,7 +123,7 @@ export function disjoint(geometryName, geometry, opt_srsName) {
* *
* @param {!string} geometryName Geometry name to use. * @param {!string} geometryName Geometry name to use.
* @param {!import("../geom/Geometry.js").default} geometry Geometry. * @param {!import("../geom/Geometry.js").default} geometry Geometry.
* @param {string=} opt_srsName SRS name. No srsName attribute will be * @param {string} [opt_srsName] SRS name. No srsName attribute will be
* set on geometries when this is not provided. * set on geometries when this is not provided.
* @return {!Within} `<Within>` operator. * @return {!Within} `<Within>` operator.
* @api * @api
@@ -140,7 +140,7 @@ export function within(geometryName, geometry, opt_srsName) {
* @param {!import("../geom/Geometry.js").default} geometry Geometry. * @param {!import("../geom/Geometry.js").default} geometry Geometry.
* @param {!number} distance Distance. * @param {!number} distance Distance.
* @param {!string} unit Unit. * @param {!string} unit Unit.
* @param {string=} opt_srsName SRS name. No srsName attribute will be * @param {string} [opt_srsName] SRS name. No srsName attribute will be
* set on geometries when this is not provided. * set on geometries when this is not provided.
* @return {!DWithin} `<DWithin>` operator. * @return {!DWithin} `<DWithin>` operator.
* @api * @api
@@ -154,7 +154,7 @@ export function dwithin(geometryName, geometry, distance, unit, opt_srsName) {
* *
* @param {!string} propertyName Name of the context property to compare. * @param {!string} propertyName Name of the context property to compare.
* @param {!(string|number)} expression The value to compare. * @param {!(string|number)} expression The value to compare.
* @param {boolean=} opt_matchCase Case-sensitive? * @param {boolean} [opt_matchCase] Case-sensitive?
* @return {!EqualTo} `<PropertyIsEqualTo>` operator. * @return {!EqualTo} `<PropertyIsEqualTo>` operator.
* @api * @api
*/ */
@@ -167,7 +167,7 @@ export function equalTo(propertyName, expression, opt_matchCase) {
* *
* @param {!string} propertyName Name of the context property to compare. * @param {!string} propertyName Name of the context property to compare.
* @param {!(string|number)} expression The value to compare. * @param {!(string|number)} expression The value to compare.
* @param {boolean=} opt_matchCase Case-sensitive? * @param {boolean} [opt_matchCase] Case-sensitive?
* @return {!NotEqualTo} `<PropertyIsNotEqualTo>` operator. * @return {!NotEqualTo} `<PropertyIsNotEqualTo>` operator.
* @api * @api
*/ */
@@ -255,13 +255,13 @@ export function between(propertyName, lowerBoundary, upperBoundary) {
* *
* @param {!string} propertyName Name of the context property to compare. * @param {!string} propertyName Name of the context property to compare.
* @param {!string} pattern Text pattern. * @param {!string} pattern Text pattern.
* @param {string=} opt_wildCard Pattern character which matches any sequence of * @param {string} [opt_wildCard] Pattern character which matches any sequence of
* zero or more string characters. Default is '*'. * zero or more string characters. Default is '*'.
* @param {string=} opt_singleChar pattern character which matches any single * @param {string} [opt_singleChar] pattern character which matches any single
* string character. Default is '.'. * string character. Default is '.'.
* @param {string=} opt_escapeChar Escape character which can be used to escape * @param {string} [opt_escapeChar] Escape character which can be used to escape
* the pattern characters. Default is '!'. * the pattern characters. Default is '!'.
* @param {boolean=} opt_matchCase Case-sensitive? * @param {boolean} [opt_matchCase] Case-sensitive?
* @return {!IsLike} `<PropertyIsLike>` operator. * @return {!IsLike} `<PropertyIsLike>` operator.
* @api * @api
*/ */

View File

@@ -14,7 +14,7 @@ class Bbox extends Filter {
/** /**
* @param {!string} geometryName Geometry name to use. * @param {!string} geometryName Geometry name to use.
* @param {!import("../../extent.js").Extent} extent Extent. * @param {!import("../../extent.js").Extent} extent Extent.
* @param {string=} opt_srsName SRS name. No srsName attribute will be set * @param {string} [opt_srsName] SRS name. No srsName attribute will be set
* on geometries when this is not provided. * on geometries when this is not provided.
*/ */
constructor(geometryName, extent, opt_srsName) { constructor(geometryName, extent, opt_srsName) {

View File

@@ -15,7 +15,7 @@ class ComparisonBinary extends Comparison {
* @param {!string} tagName The XML tag name for this filter. * @param {!string} tagName The XML tag name for this filter.
* @param {!string} propertyName Name of the context property to compare. * @param {!string} propertyName Name of the context property to compare.
* @param {!(string|number)} expression The value to compare. * @param {!(string|number)} expression The value to compare.
* @param {boolean=} opt_matchCase Case-sensitive? * @param {boolean} [opt_matchCase] Case-sensitive?
*/ */
constructor(tagName, propertyName, expression, opt_matchCase) { constructor(tagName, propertyName, expression, opt_matchCase) {
super(tagName, propertyName); super(tagName, propertyName);

View File

@@ -13,7 +13,7 @@ class Contains extends Spatial {
/** /**
* @param {!string} geometryName Geometry name to use. * @param {!string} geometryName Geometry name to use.
* @param {!import("../../geom/Geometry.js").default} geometry Geometry. * @param {!import("../../geom/Geometry.js").default} geometry Geometry.
* @param {string=} opt_srsName SRS name. No srsName attribute will be * @param {string} [opt_srsName] SRS name. No srsName attribute will be
* set on geometries when this is not provided. * set on geometries when this is not provided.
*/ */
constructor(geometryName, geometry, opt_srsName) { constructor(geometryName, geometry, opt_srsName) {

View File

@@ -15,7 +15,7 @@ class DWithin extends Spatial {
* @param {!import("../../geom/Geometry.js").default} geometry Geometry. * @param {!import("../../geom/Geometry.js").default} geometry Geometry.
* @param {!number} distance Distance. * @param {!number} distance Distance.
* @param {!string} unit Unit. * @param {!string} unit Unit.
* @param {string=} opt_srsName SRS name. No srsName attribute will be * @param {string} [opt_srsName] SRS name. No srsName attribute will be
* set on geometries when this is not provided. * set on geometries when this is not provided.
*/ */
constructor(geometryName, geometry, distance, unit, opt_srsName) { constructor(geometryName, geometry, distance, unit, opt_srsName) {

View File

@@ -13,7 +13,7 @@ class Disjoint extends Spatial {
/** /**
* @param {!string} geometryName Geometry name to use. * @param {!string} geometryName Geometry name to use.
* @param {!import("../../geom/Geometry.js").default} geometry Geometry. * @param {!import("../../geom/Geometry.js").default} geometry Geometry.
* @param {string=} opt_srsName SRS name. No srsName attribute will be * @param {string} [opt_srsName] SRS name. No srsName attribute will be
* set on geometries when this is not provided. * set on geometries when this is not provided.
*/ */
constructor(geometryName, geometry, opt_srsName) { constructor(geometryName, geometry, opt_srsName) {

View File

@@ -12,7 +12,7 @@ class EqualTo extends ComparisonBinary {
/** /**
* @param {!string} propertyName Name of the context property to compare. * @param {!string} propertyName Name of the context property to compare.
* @param {!(string|number)} expression The value to compare. * @param {!(string|number)} expression The value to compare.
* @param {boolean=} opt_matchCase Case-sensitive? * @param {boolean} [opt_matchCase] Case-sensitive?
*/ */
constructor(propertyName, expression, opt_matchCase) { constructor(propertyName, expression, opt_matchCase) {
super('PropertyIsEqualTo', propertyName, expression, opt_matchCase); super('PropertyIsEqualTo', propertyName, expression, opt_matchCase);

View File

@@ -13,7 +13,7 @@ class Intersects extends Spatial {
/** /**
* @param {!string} geometryName Geometry name to use. * @param {!string} geometryName Geometry name to use.
* @param {!import("../../geom/Geometry.js").default} geometry Geometry. * @param {!import("../../geom/Geometry.js").default} geometry Geometry.
* @param {string=} opt_srsName SRS name. No srsName attribute will be * @param {string} [opt_srsName] SRS name. No srsName attribute will be
* set on geometries when this is not provided. * set on geometries when this is not provided.
*/ */
constructor(geometryName, geometry, opt_srsName) { constructor(geometryName, geometry, opt_srsName) {

View File

@@ -13,13 +13,13 @@ class IsLike extends Comparison {
* [constructor description] * [constructor description]
* @param {!string} propertyName Name of the context property to compare. * @param {!string} propertyName Name of the context property to compare.
* @param {!string} pattern Text pattern. * @param {!string} pattern Text pattern.
* @param {string=} opt_wildCard Pattern character which matches any sequence of * @param {string} [opt_wildCard] Pattern character which matches any sequence of
* zero or more string characters. Default is '*'. * zero or more string characters. Default is '*'.
* @param {string=} opt_singleChar pattern character which matches any single * @param {string} [opt_singleChar] pattern character which matches any single
* string character. Default is '.'. * string character. Default is '.'.
* @param {string=} opt_escapeChar Escape character which can be used to escape * @param {string} [opt_escapeChar] Escape character which can be used to escape
* the pattern characters. Default is '!'. * the pattern characters. Default is '!'.
* @param {boolean=} opt_matchCase Case-sensitive? * @param {boolean} [opt_matchCase] Case-sensitive?
*/ */
constructor( constructor(
propertyName, propertyName,

View File

@@ -12,7 +12,7 @@ class NotEqualTo extends ComparisonBinary {
/** /**
* @param {!string} propertyName Name of the context property to compare. * @param {!string} propertyName Name of the context property to compare.
* @param {!(string|number)} expression The value to compare. * @param {!(string|number)} expression The value to compare.
* @param {boolean=} opt_matchCase Case-sensitive? * @param {boolean} [opt_matchCase] Case-sensitive?
*/ */
constructor(propertyName, expression, opt_matchCase) { constructor(propertyName, expression, opt_matchCase) {
super('PropertyIsNotEqualTo', propertyName, expression, opt_matchCase); super('PropertyIsNotEqualTo', propertyName, expression, opt_matchCase);

View File

@@ -16,7 +16,7 @@ class Spatial extends Filter {
* @param {!string} tagName The XML tag name for this filter. * @param {!string} tagName The XML tag name for this filter.
* @param {!string} geometryName Geometry name to use. * @param {!string} geometryName Geometry name to use.
* @param {!import("../../geom/Geometry.js").default} geometry Geometry. * @param {!import("../../geom/Geometry.js").default} geometry Geometry.
* @param {string=} opt_srsName SRS name. No srsName attribute will be * @param {string} [opt_srsName] SRS name. No srsName attribute will be
* set on geometries when this is not provided. * set on geometries when this is not provided.
*/ */
constructor(tagName, geometryName, geometry, opt_srsName) { constructor(tagName, geometryName, geometry, opt_srsName) {

View File

@@ -13,7 +13,7 @@ class Within extends Spatial {
/** /**
* @param {!string} geometryName Geometry name to use. * @param {!string} geometryName Geometry name to use.
* @param {!import("../../geom/Geometry.js").default} geometry Geometry. * @param {!import("../../geom/Geometry.js").default} geometry Geometry.
* @param {string=} opt_srsName SRS name. No srsName attribute will be * @param {string} [opt_srsName] SRS name. No srsName attribute will be
* set on geometries when this is not provided. * set on geometries when this is not provided.
*/ */
constructor(geometryName, geometry, opt_srsName) { constructor(geometryName, geometry, opt_srsName) {

View File

@@ -18,8 +18,8 @@ class Circle extends SimpleGeometry {
* @param {!import("../coordinate.js").Coordinate} center Center. * @param {!import("../coordinate.js").Coordinate} center Center.
* For internal use, flat coordinates in combination with `opt_layout` and no * For internal use, flat coordinates in combination with `opt_layout` and no
* `opt_radius` are also accepted. * `opt_radius` are also accepted.
* @param {number=} opt_radius Radius. * @param {number} [opt_radius] Radius.
* @param {import("./GeometryLayout.js").default=} opt_layout Layout. * @param {import("./GeometryLayout.js").default} [opt_layout] Layout.
*/ */
constructor(center, opt_radius, opt_layout) { constructor(center, opt_radius, opt_layout) {
super(); super();
@@ -189,7 +189,7 @@ class Circle extends SimpleGeometry {
* number) of the circle. * number) of the circle.
* @param {!import("../coordinate.js").Coordinate} center Center. * @param {!import("../coordinate.js").Coordinate} center Center.
* @param {number} radius Radius. * @param {number} radius Radius.
* @param {import("./GeometryLayout.js").default=} opt_layout Layout. * @param {import("./GeometryLayout.js").default} [opt_layout] Layout.
* @api * @api
*/ */
setCenterAndRadius(center, radius, opt_layout) { setCenterAndRadius(center, radius, opt_layout) {

View File

@@ -135,7 +135,7 @@ class Geometry extends BaseObject {
* Return the closest point of the geometry to the passed point as * Return the closest point of the geometry to the passed point as
* {@link module:ol/coordinate~Coordinate coordinate}. * {@link module:ol/coordinate~Coordinate coordinate}.
* @param {import("../coordinate.js").Coordinate} point Point. * @param {import("../coordinate.js").Coordinate} point Point.
* @param {import("../coordinate.js").Coordinate=} opt_closestPoint Closest point. * @param {import("../coordinate.js").Coordinate} [opt_closestPoint] Closest point.
* @return {import("../coordinate.js").Coordinate} Closest point. * @return {import("../coordinate.js").Coordinate} Closest point.
* @api * @api
*/ */
@@ -168,7 +168,7 @@ class Geometry extends BaseObject {
/** /**
* Get the extent of the geometry. * Get the extent of the geometry.
* @param {import("../extent.js").Extent=} opt_extent Extent. * @param {import("../extent.js").Extent} [opt_extent] Extent.
* @return {import("../extent.js").Extent} extent Extent. * @return {import("../extent.js").Extent} extent Extent.
* @api * @api
*/ */
@@ -200,8 +200,8 @@ class Geometry extends BaseObject {
* coordinates in place. * coordinates in place.
* @abstract * @abstract
* @param {number} sx The scaling factor in the x-direction. * @param {number} sx The scaling factor in the x-direction.
* @param {number=} opt_sy The scaling factor in the y-direction (defaults to sx). * @param {number} [opt_sy] The scaling factor in the y-direction (defaults to sx).
* @param {import("../coordinate.js").Coordinate=} opt_anchor The scale origin (defaults to the center * @param {import("../coordinate.js").Coordinate} [opt_anchor] The scale origin (defaults to the center
* of the geometry extent). * of the geometry extent).
* @api * @api
*/ */

View File

@@ -20,7 +20,7 @@ import {listen, unlistenByKey} from '../events.js';
*/ */
class GeometryCollection extends Geometry { class GeometryCollection extends Geometry {
/** /**
* @param {Array<Geometry>=} opt_geometries Geometries. * @param {Array<Geometry>} [opt_geometries] Geometries.
*/ */
constructor(opt_geometries) { constructor(opt_geometries) {
super(); super();
@@ -255,8 +255,8 @@ class GeometryCollection extends Geometry {
* coordinates in place. * coordinates in place.
* @abstract * @abstract
* @param {number} sx The scaling factor in the x-direction. * @param {number} sx The scaling factor in the x-direction.
* @param {number=} opt_sy The scaling factor in the y-direction (defaults to sx). * @param {number} [opt_sy] The scaling factor in the y-direction (defaults to sx).
* @param {import("../coordinate.js").Coordinate=} opt_anchor The scale origin (defaults to the center * @param {import("../coordinate.js").Coordinate} [opt_anchor] The scale origin (defaults to the center
* of the geometry extent). * of the geometry extent).
* @api * @api
*/ */

View File

@@ -25,7 +25,7 @@ class LineString extends SimpleGeometry {
/** /**
* @param {Array<import("../coordinate.js").Coordinate>|Array<number>} coordinates Coordinates. * @param {Array<import("../coordinate.js").Coordinate>|Array<number>} coordinates Coordinates.
* For internal use, flat coordinates in combination with `opt_layout` are also accepted. * For internal use, flat coordinates in combination with `opt_layout` are also accepted.
* @param {import("./GeometryLayout.js").default=} opt_layout Layout. * @param {import("./GeometryLayout.js").default} [opt_layout] Layout.
*/ */
constructor(coordinates, opt_layout) { constructor(coordinates, opt_layout) {
super(); super();
@@ -163,7 +163,7 @@ class LineString extends SimpleGeometry {
* return the last coordinate. * return the last coordinate.
* *
* @param {number} m M. * @param {number} m M.
* @param {boolean=} opt_extrapolate Extrapolate. Default is `false`. * @param {boolean} [opt_extrapolate] Extrapolate. Default is `false`.
* @return {import("../coordinate.js").Coordinate} Coordinate. * @return {import("../coordinate.js").Coordinate} Coordinate.
* @api * @api
*/ */
@@ -204,7 +204,7 @@ class LineString extends SimpleGeometry {
* The `fraction` is a number between 0 and 1, where 0 is the start of the * The `fraction` is a number between 0 and 1, where 0 is the start of the
* linestring and 1 is the end. * linestring and 1 is the end.
* @param {number} fraction Fraction. * @param {number} fraction Fraction.
* @param {import("../coordinate.js").Coordinate=} opt_dest Optional coordinate whose values will * @param {import("../coordinate.js").Coordinate} [opt_dest] Optional coordinate whose values will
* be modified. If not provided, a new coordinate will be returned. * be modified. If not provided, a new coordinate will be returned.
* @return {import("../coordinate.js").Coordinate} Coordinate of the interpolated point. * @return {import("../coordinate.js").Coordinate} Coordinate of the interpolated point.
* @api * @api
@@ -293,7 +293,7 @@ class LineString extends SimpleGeometry {
/** /**
* Set the coordinates of the linestring. * Set the coordinates of the linestring.
* @param {!Array<import("../coordinate.js").Coordinate>} coordinates Coordinates. * @param {!Array<import("../coordinate.js").Coordinate>} coordinates Coordinates.
* @param {import("./GeometryLayout.js").default=} opt_layout Layout. * @param {import("./GeometryLayout.js").default} [opt_layout] Layout.
* @api * @api
*/ */
setCoordinates(coordinates, opt_layout) { setCoordinates(coordinates, opt_layout) {

View File

@@ -22,7 +22,7 @@ class LinearRing extends SimpleGeometry {
/** /**
* @param {Array<import("../coordinate.js").Coordinate>|Array<number>} coordinates Coordinates. * @param {Array<import("../coordinate.js").Coordinate>|Array<number>} coordinates Coordinates.
* For internal use, flat coordinates in combination with `opt_layout` are also accepted. * For internal use, flat coordinates in combination with `opt_layout` are also accepted.
* @param {import("./GeometryLayout.js").default=} opt_layout Layout. * @param {import("./GeometryLayout.js").default} [opt_layout] Layout.
*/ */
constructor(coordinates, opt_layout) { constructor(coordinates, opt_layout) {
super(); super();
@@ -167,7 +167,7 @@ class LinearRing extends SimpleGeometry {
/** /**
* Set the coordinates of the linear ring. * Set the coordinates of the linear ring.
* @param {!Array<import("../coordinate.js").Coordinate>} coordinates Coordinates. * @param {!Array<import("../coordinate.js").Coordinate>} coordinates Coordinates.
* @param {import("./GeometryLayout.js").default=} opt_layout Layout. * @param {import("./GeometryLayout.js").default} [opt_layout] Layout.
* @api * @api
*/ */
setCoordinates(coordinates, opt_layout) { setCoordinates(coordinates, opt_layout) {

View File

@@ -28,8 +28,8 @@ class MultiLineString extends SimpleGeometry {
* @param {Array<Array<import("../coordinate.js").Coordinate>|LineString>|Array<number>} coordinates * @param {Array<Array<import("../coordinate.js").Coordinate>|LineString>|Array<number>} coordinates
* Coordinates or LineString geometries. (For internal use, flat coordinates in * Coordinates or LineString geometries. (For internal use, flat coordinates in
* combination with `opt_layout` and `opt_ends` are also accepted.) * combination with `opt_layout` and `opt_ends` are also accepted.)
* @param {import("./GeometryLayout.js").default=} opt_layout Layout. * @param {import("./GeometryLayout.js").default} [opt_layout] Layout.
* @param {Array<number>=} opt_ends Flat coordinate ends for internal use. * @param {Array<number>} [opt_ends] Flat coordinate ends for internal use.
*/ */
constructor(coordinates, opt_layout, opt_ends) { constructor(coordinates, opt_layout, opt_ends) {
super(); super();
@@ -165,8 +165,8 @@ class MultiLineString extends SimpleGeometry {
* LineStrings. * LineStrings.
* *
* @param {number} m M. * @param {number} m M.
* @param {boolean=} opt_extrapolate Extrapolate. Default is `false`. * @param {boolean} [opt_extrapolate] Extrapolate. Default is `false`.
* @param {boolean=} opt_interpolate Interpolate. Default is `false`. * @param {boolean} [opt_interpolate] Interpolate. Default is `false`.
* @return {import("../coordinate.js").Coordinate} Coordinate. * @return {import("../coordinate.js").Coordinate} Coordinate.
* @api * @api
*/ */
@@ -332,7 +332,7 @@ class MultiLineString extends SimpleGeometry {
/** /**
* Set the coordinates of the multilinestring. * Set the coordinates of the multilinestring.
* @param {!Array<Array<import("../coordinate.js").Coordinate>>} coordinates Coordinates. * @param {!Array<Array<import("../coordinate.js").Coordinate>>} coordinates Coordinates.
* @param {GeometryLayout=} opt_layout Layout. * @param {GeometryLayout} [opt_layout] Layout.
* @api * @api
*/ */
setCoordinates(coordinates, opt_layout) { setCoordinates(coordinates, opt_layout) {

View File

@@ -20,7 +20,7 @@ class MultiPoint extends SimpleGeometry {
/** /**
* @param {Array<import("../coordinate.js").Coordinate>|Array<number>} coordinates Coordinates. * @param {Array<import("../coordinate.js").Coordinate>|Array<number>} coordinates Coordinates.
* For internal use, flat coordinates in combination with `opt_layout` are also accepted. * For internal use, flat coordinates in combination with `opt_layout` are also accepted.
* @param {import("./GeometryLayout.js").default=} opt_layout Layout. * @param {import("./GeometryLayout.js").default} [opt_layout] Layout.
*/ */
constructor(coordinates, opt_layout) { constructor(coordinates, opt_layout) {
super(); super();
@@ -181,7 +181,7 @@ class MultiPoint extends SimpleGeometry {
/** /**
* Set the coordinates of the multipoint. * Set the coordinates of the multipoint.
* @param {!Array<import("../coordinate.js").Coordinate>} coordinates Coordinates. * @param {!Array<import("../coordinate.js").Coordinate>} coordinates Coordinates.
* @param {import("./GeometryLayout.js").default=} opt_layout Layout. * @param {import("./GeometryLayout.js").default} [opt_layout] Layout.
* @api * @api
*/ */
setCoordinates(coordinates, opt_layout) { setCoordinates(coordinates, opt_layout) {

View File

@@ -35,8 +35,8 @@ class MultiPolygon extends SimpleGeometry {
/** /**
* @param {Array<Array<Array<import("../coordinate.js").Coordinate>>|Polygon>|Array<number>} coordinates Coordinates. * @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. * For internal use, flat coordinates in combination with `opt_layout` and `opt_endss` are also accepted.
* @param {import("./GeometryLayout.js").default=} 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. * @param {Array<Array<number>>} [opt_endss] Array of ends for internal use with flat coordinates.
*/ */
constructor(coordinates, opt_layout, opt_endss) { constructor(coordinates, opt_layout, opt_endss) {
super(); super();
@@ -236,7 +236,7 @@ class MultiPolygon extends SimpleGeometry {
* Get the coordinate array for this geometry. This array has the structure * Get the coordinate array for this geometry. This array has the structure
* of a GeoJSON coordinate array for multi-polygons. * of a GeoJSON coordinate array for multi-polygons.
* *
* @param {boolean=} opt_right Orient coordinates according to the right-hand * @param {boolean} [opt_right] Orient coordinates according to the right-hand
* rule (counter-clockwise for exterior and clockwise for interior rings). * rule (counter-clockwise for exterior and clockwise for interior rings).
* If `false`, coordinates will be oriented according to the left-hand rule * If `false`, coordinates will be oriented according to the left-hand rule
* (clockwise for exterior and counter-clockwise for interior rings). * (clockwise for exterior and counter-clockwise for interior rings).
@@ -449,7 +449,7 @@ class MultiPolygon extends SimpleGeometry {
/** /**
* Set the coordinates of the multipolygon. * Set the coordinates of the multipolygon.
* @param {!Array<Array<Array<import("../coordinate.js").Coordinate>>>} coordinates Coordinates. * @param {!Array<Array<Array<import("../coordinate.js").Coordinate>>>} coordinates Coordinates.
* @param {import("./GeometryLayout.js").default=} opt_layout Layout. * @param {import("./GeometryLayout.js").default} [opt_layout] Layout.
* @api * @api
*/ */
setCoordinates(coordinates, opt_layout) { setCoordinates(coordinates, opt_layout) {

View File

@@ -16,7 +16,7 @@ import {squaredDistance as squaredDx} from '../math.js';
class Point extends SimpleGeometry { class Point extends SimpleGeometry {
/** /**
* @param {import("../coordinate.js").Coordinate} coordinates Coordinates. * @param {import("../coordinate.js").Coordinate} coordinates Coordinates.
* @param {import("./GeometryLayout.js").default=} opt_layout Layout. * @param {import("./GeometryLayout.js").default} [opt_layout] Layout.
*/ */
constructor(coordinates, opt_layout) { constructor(coordinates, opt_layout) {
super(); super();
@@ -100,7 +100,7 @@ class Point extends SimpleGeometry {
/** /**
* @param {!Array<*>} coordinates Coordinates. * @param {!Array<*>} coordinates Coordinates.
* @param {import("./GeometryLayout.js").default=} opt_layout Layout. * @param {import("./GeometryLayout.js").default} [opt_layout] Layout.
* @api * @api
*/ */
setCoordinates(coordinates, opt_layout) { setCoordinates(coordinates, opt_layout) {

View File

@@ -35,8 +35,8 @@ class Polygon extends SimpleGeometry {
* an array of vertices' coordinates where the first coordinate and the last are * an array of vertices' coordinates where the first coordinate and the last are
* equivalent. (For internal use, flat coordinates in combination with * equivalent. (For internal use, flat coordinates in combination with
* `opt_layout` and `opt_ends` are also accepted.) * `opt_layout` and `opt_ends` are also accepted.)
* @param {import("./GeometryLayout.js").default=} opt_layout Layout. * @param {import("./GeometryLayout.js").default} [opt_layout] Layout.
* @param {Array<number>=} opt_ends Ends (for internal use with flat coordinates). * @param {Array<number>} [opt_ends] Ends (for internal use with flat coordinates).
*/ */
constructor(coordinates, opt_layout, opt_ends) { constructor(coordinates, opt_layout, opt_ends) {
super(); super();
@@ -198,7 +198,7 @@ class Polygon extends SimpleGeometry {
* Get the coordinate array for this geometry. This array has the structure * Get the coordinate array for this geometry. This array has the structure
* of a GeoJSON coordinate array for polygons. * of a GeoJSON coordinate array for polygons.
* *
* @param {boolean=} opt_right Orient coordinates according to the right-hand * @param {boolean} [opt_right] Orient coordinates according to the right-hand
* rule (counter-clockwise for exterior and clockwise for interior rings). * rule (counter-clockwise for exterior and clockwise for interior rings).
* If `false`, coordinates will be oriented according to the left-hand rule * If `false`, coordinates will be oriented according to the left-hand rule
* (clockwise for exterior and counter-clockwise for interior rings). * (clockwise for exterior and counter-clockwise for interior rings).
@@ -387,7 +387,7 @@ class Polygon extends SimpleGeometry {
/** /**
* Set the coordinates of the polygon. * Set the coordinates of the polygon.
* @param {!Array<Array<import("../coordinate.js").Coordinate>>} coordinates Coordinates. * @param {!Array<Array<import("../coordinate.js").Coordinate>>} coordinates Coordinates.
* @param {import("./GeometryLayout.js").default=} opt_layout Layout. * @param {import("./GeometryLayout.js").default} [opt_layout] Layout.
* @api * @api
*/ */
setCoordinates(coordinates, opt_layout) { setCoordinates(coordinates, opt_layout) {
@@ -414,9 +414,9 @@ export default Polygon;
* @param {import("../coordinate.js").Coordinate} center Center (`[lon, lat]` in degrees). * @param {import("../coordinate.js").Coordinate} center Center (`[lon, lat]` in degrees).
* @param {number} radius The great-circle distance from the center to * @param {number} radius The great-circle distance from the center to
* the polygon vertices in meters. * the polygon vertices in meters.
* @param {number=} opt_n Optional number of vertices for the resulting * @param {number} [opt_n] Optional number of vertices for the resulting
* polygon. Default is `32`. * polygon. Default is `32`.
* @param {number=} opt_sphereRadius Optional radius for the sphere (defaults to * @param {number} [opt_sphereRadius] Optional radius for the sphere (defaults to
* the Earth's mean radius using the WGS84 ellipsoid). * the Earth's mean radius using the WGS84 ellipsoid).
* @return {Polygon} The "circular" polygon. * @return {Polygon} The "circular" polygon.
* @api * @api
@@ -468,8 +468,8 @@ export function fromExtent(extent) {
/** /**
* Create a regular polygon from a circle. * Create a regular polygon from a circle.
* @param {import("./Circle.js").default} circle Circle geometry. * @param {import("./Circle.js").default} circle Circle geometry.
* @param {number=} opt_sides Number of sides of the polygon. Default is 32. * @param {number} [opt_sides] Number of sides of the polygon. Default is 32.
* @param {number=} opt_angle Start angle for the first vertex of the polygon in * @param {number} [opt_angle] Start angle for the first vertex of the polygon in
* counter-clockwise radians. 0 means East. Default is 0. * counter-clockwise radians. 0 means East. Default is 0.
* @return {Polygon} Polygon geometry. * @return {Polygon} Polygon geometry.
* @api * @api
@@ -499,7 +499,7 @@ export function fromCircle(circle, opt_sides, opt_angle) {
* @param {Polygon} polygon Polygon geometry. * @param {Polygon} polygon Polygon geometry.
* @param {import("../coordinate.js").Coordinate} center Center of the regular polygon. * @param {import("../coordinate.js").Coordinate} center Center of the regular polygon.
* @param {number} radius Radius of the regular polygon. * @param {number} radius Radius of the regular polygon.
* @param {number=} opt_angle Start angle for the first vertex of the polygon in * @param {number} [opt_angle] Start angle for the first vertex of the polygon in
* counter-clockwise radians. 0 means East. Default is 0. * counter-clockwise radians. 0 means East. Default is 0.
*/ */
export function makeRegular(polygon, center, radius, opt_angle) { export function makeRegular(polygon, center, radius, opt_angle) {

View File

@@ -164,7 +164,7 @@ class SimpleGeometry extends Geometry {
/** /**
* @abstract * @abstract
* @param {!Array<*>} coordinates Coordinates. * @param {!Array<*>} coordinates Coordinates.
* @param {import("./GeometryLayout.js").default=} opt_layout Layout. * @param {import("./GeometryLayout.js").default} [opt_layout] Layout.
*/ */
setCoordinates(coordinates, opt_layout) { setCoordinates(coordinates, opt_layout) {
abstract(); abstract();
@@ -242,8 +242,8 @@ class SimpleGeometry extends Geometry {
* Scale the geometry (with an optional origin). This modifies the geometry * Scale the geometry (with an optional origin). This modifies the geometry
* coordinates in place. * coordinates in place.
* @param {number} sx The scaling factor in the x-direction. * @param {number} sx The scaling factor in the x-direction.
* @param {number=} opt_sy The scaling factor in the y-direction (defaults to sx). * @param {number} [opt_sy] The scaling factor in the y-direction (defaults to sx).
* @param {import("../coordinate.js").Coordinate=} opt_anchor The scale origin (defaults to the center * @param {import("../coordinate.js").Coordinate} [opt_anchor] The scale origin (defaults to the center
* of the geometry extent). * of the geometry extent).
* @api * @api
*/ */
@@ -333,7 +333,7 @@ export function getStrideForLayout(layout) {
/** /**
* @param {SimpleGeometry} simpleGeometry Simple geometry. * @param {SimpleGeometry} simpleGeometry Simple geometry.
* @param {import("../transform.js").Transform} transform Transform. * @param {import("../transform.js").Transform} transform Transform.
* @param {Array<number>=} opt_dest Destination. * @param {Array<number>} [opt_dest] Destination.
* @return {Array<number>} Transformed flat coordinates. * @return {Array<number>} Transformed flat coordinates.
*/ */
export function transformGeom2D(simpleGeometry, transform, opt_dest) { export function transformGeom2D(simpleGeometry, transform, opt_dest) {

View File

@@ -138,7 +138,7 @@ export function multiArrayMaxSquaredDelta(
* @param {number} y Y. * @param {number} y Y.
* @param {Array<number>} closestPoint Closest point. * @param {Array<number>} closestPoint Closest point.
* @param {number} minSquaredDistance Minimum squared distance. * @param {number} minSquaredDistance Minimum squared distance.
* @param {Array<number>=} opt_tmpPoint Temporary point object. * @param {Array<number>} [opt_tmpPoint] Temporary point object.
* @return {number} Minimum squared distance. * @return {number} Minimum squared distance.
*/ */
export function assignClosestPoint( export function assignClosestPoint(
@@ -251,7 +251,7 @@ export function assignClosestPoint(
* @param {number} y Y. * @param {number} y Y.
* @param {Array<number>} closestPoint Closest point. * @param {Array<number>} closestPoint Closest point.
* @param {number} minSquaredDistance Minimum squared distance. * @param {number} minSquaredDistance Minimum squared distance.
* @param {Array<number>=} opt_tmpPoint Temporary point object. * @param {Array<number>} [opt_tmpPoint] Temporary point object.
* @return {number} Minimum squared distance. * @return {number} Minimum squared distance.
*/ */
export function assignClosestArrayPoint( export function assignClosestArrayPoint(
@@ -299,7 +299,7 @@ export function assignClosestArrayPoint(
* @param {number} y Y. * @param {number} y Y.
* @param {Array<number>} closestPoint Closest point. * @param {Array<number>} closestPoint Closest point.
* @param {number} minSquaredDistance Minimum squared distance. * @param {number} minSquaredDistance Minimum squared distance.
* @param {Array<number>=} opt_tmpPoint Temporary point object. * @param {Array<number>} [opt_tmpPoint] Temporary point object.
* @return {number} Minimum squared distance. * @return {number} Minimum squared distance.
*/ */
export function assignClosestMultiArrayPoint( export function assignClosestMultiArrayPoint(

View File

@@ -43,7 +43,7 @@ export function deflateCoordinates(
* @param {number} offset Offset. * @param {number} offset Offset.
* @param {Array<Array<import("../../coordinate.js").Coordinate>>} coordinatess Coordinatess. * @param {Array<Array<import("../../coordinate.js").Coordinate>>} coordinatess Coordinatess.
* @param {number} stride Stride. * @param {number} stride Stride.
* @param {Array<number>=} opt_ends Ends. * @param {Array<number>} [opt_ends] Ends.
* @return {Array<number>} Ends. * @return {Array<number>} Ends.
*/ */
export function deflateCoordinatesArray( export function deflateCoordinatesArray(
@@ -74,7 +74,7 @@ export function deflateCoordinatesArray(
* @param {number} offset Offset. * @param {number} offset Offset.
* @param {Array<Array<Array<import("../../coordinate.js").Coordinate>>>} coordinatesss Coordinatesss. * @param {Array<Array<Array<import("../../coordinate.js").Coordinate>>>} coordinatesss Coordinatesss.
* @param {number} stride Stride. * @param {number} stride Stride.
* @param {Array<Array<number>>=} opt_endss Endss. * @param {Array<Array<number>>} [opt_endss] Endss.
* @return {Array<Array<number>>} Endss. * @return {Array<Array<number>>} Endss.
*/ */
export function deflateMultiCoordinatesArray( export function deflateMultiCoordinatesArray(

View File

@@ -7,8 +7,8 @@
* @param {number} offset Offset. * @param {number} offset Offset.
* @param {number} end End. * @param {number} end End.
* @param {number} stride Stride. * @param {number} stride Stride.
* @param {Array<number>=} opt_dest Destination. * @param {Array<number>} [opt_dest] Destination.
* @param {number=} opt_destOffset Destination offset. * @param {number} [opt_destOffset] Destination offset.
* @return {Array<number>} Flat coordinates. * @return {Array<number>} Flat coordinates.
*/ */
export function flipXY( export function flipXY(

View File

@@ -7,7 +7,7 @@
* @param {number} offset Offset. * @param {number} offset Offset.
* @param {number} end End. * @param {number} end End.
* @param {number} stride Stride. * @param {number} stride Stride.
* @param {Array<import("../../coordinate.js").Coordinate>=} opt_coordinates Coordinates. * @param {Array<import("../../coordinate.js").Coordinate>} [opt_coordinates] Coordinates.
* @return {Array<import("../../coordinate.js").Coordinate>} Coordinates. * @return {Array<import("../../coordinate.js").Coordinate>} Coordinates.
*/ */
export function inflateCoordinates( export function inflateCoordinates(
@@ -31,7 +31,7 @@ export function inflateCoordinates(
* @param {number} offset Offset. * @param {number} offset Offset.
* @param {Array<number>} ends Ends. * @param {Array<number>} ends Ends.
* @param {number} stride Stride. * @param {number} stride Stride.
* @param {Array<Array<import("../../coordinate.js").Coordinate>>=} opt_coordinatess Coordinatess. * @param {Array<Array<import("../../coordinate.js").Coordinate>>} [opt_coordinatess] Coordinatess.
* @return {Array<Array<import("../../coordinate.js").Coordinate>>} Coordinatess. * @return {Array<Array<import("../../coordinate.js").Coordinate>>} Coordinatess.
*/ */
export function inflateCoordinatesArray( export function inflateCoordinatesArray(
@@ -63,7 +63,7 @@ export function inflateCoordinatesArray(
* @param {number} offset Offset. * @param {number} offset Offset.
* @param {Array<Array<number>>} endss Endss. * @param {Array<Array<number>>} endss Endss.
* @param {number} stride Stride. * @param {number} stride Stride.
* @param {Array<Array<Array<import("../../coordinate.js").Coordinate>>>=} opt_coordinatesss * @param {Array<Array<Array<import("../../coordinate.js").Coordinate>>>} [opt_coordinatesss]
* Coordinatesss. * Coordinatesss.
* @return {Array<Array<Array<import("../../coordinate.js").Coordinate>>>} Coordinatesss. * @return {Array<Array<Array<import("../../coordinate.js").Coordinate>>>} Coordinatesss.
*/ */

View File

@@ -13,7 +13,7 @@ import {numberSafeCompareFunction} from '../../array.js';
* @param {number} stride Stride. * @param {number} stride Stride.
* @param {Array<number>} flatCenters Flat centers. * @param {Array<number>} flatCenters Flat centers.
* @param {number} flatCentersOffset Flat center offset. * @param {number} flatCentersOffset Flat center offset.
* @param {Array<number>=} opt_dest Destination. * @param {Array<number>} [opt_dest] Destination.
* @return {Array<number>} Destination point as XYM coordinate, where M is the * @return {Array<number>} Destination point as XYM coordinate, where M is the
* length of the horizontal intersection that the point belongs to. * length of the horizontal intersection that the point belongs to.
*/ */

View File

@@ -10,8 +10,8 @@ import {lerp} from '../../math.js';
* @param {number} end End. * @param {number} end End.
* @param {number} stride Stride. * @param {number} stride Stride.
* @param {number} fraction Fraction. * @param {number} fraction Fraction.
* @param {Array<number>=} opt_dest Destination. * @param {Array<number>} [opt_dest] Destination.
* @param {number=} opt_dimension Destination dimension (default is `2`) * @param {number} [opt_dimension] Destination dimension (default is `2`)
* @return {Array<number>} Destination. * @return {Array<number>} Destination.
*/ */
export function interpolatePoint( export function interpolatePoint(

View File

@@ -38,7 +38,7 @@ export function linearRingIsClockwise(flatCoordinates, offset, end, stride) {
* @param {number} offset Offset. * @param {number} offset Offset.
* @param {Array<number>} ends Array of end indexes. * @param {Array<number>} ends Array of end indexes.
* @param {number} stride Stride. * @param {number} stride Stride.
* @param {boolean=} opt_right Test for right-hand orientation * @param {boolean} [opt_right] Test for right-hand orientation
* (counter-clockwise exterior ring and clockwise interior rings). * (counter-clockwise exterior ring and clockwise interior rings).
* @return {boolean} Rings are correctly oriented. * @return {boolean} Rings are correctly oriented.
*/ */
@@ -81,7 +81,7 @@ export function linearRingsAreOriented(
* @param {number} offset Offset. * @param {number} offset Offset.
* @param {Array<Array<number>>} endss Array of array of end indexes. * @param {Array<Array<number>>} endss Array of array of end indexes.
* @param {number} stride Stride. * @param {number} stride Stride.
* @param {boolean=} opt_right Test for right-hand orientation * @param {boolean} [opt_right] Test for right-hand orientation
* (counter-clockwise exterior ring and clockwise interior rings). * (counter-clockwise exterior ring and clockwise interior rings).
* @return {boolean} Rings are correctly oriented. * @return {boolean} Rings are correctly oriented.
*/ */
@@ -116,7 +116,7 @@ export function linearRingssAreOriented(
* @param {number} offset Offset. * @param {number} offset Offset.
* @param {Array<number>} ends Ends. * @param {Array<number>} ends Ends.
* @param {number} stride Stride. * @param {number} stride Stride.
* @param {boolean=} opt_right Follow the right-hand rule for orientation. * @param {boolean} [opt_right] Follow the right-hand rule for orientation.
* @return {number} End. * @return {number} End.
*/ */
export function orientLinearRings( export function orientLinearRings(
@@ -157,7 +157,7 @@ export function orientLinearRings(
* @param {number} offset Offset. * @param {number} offset Offset.
* @param {Array<Array<number>>} endss Array of array of end indexes. * @param {Array<Array<number>>} endss Array of array of end indexes.
* @param {number} stride Stride. * @param {number} stride Stride.
* @param {boolean=} opt_right Follow the right-hand rule for orientation. * @param {boolean} [opt_right] Follow the right-hand rule for orientation.
* @return {number} End. * @return {number} End.
*/ */
export function orientLinearRingsArray( export function orientLinearRingsArray(

View File

@@ -36,7 +36,7 @@ import {squaredDistance, squaredSegmentDistance} from '../../math.js';
* @param {number} stride Stride. * @param {number} stride Stride.
* @param {number} squaredTolerance Squared tolerance. * @param {number} squaredTolerance Squared tolerance.
* @param {boolean} highQuality Highest quality. * @param {boolean} highQuality Highest quality.
* @param {Array<number>=} opt_simplifiedFlatCoordinates Simplified flat * @param {Array<number>} [opt_simplifiedFlatCoordinates] Simplified flat
* coordinates. * coordinates.
* @return {Array<number>} Simplified line string. * @return {Array<number>} Simplified line string.
*/ */

View File

@@ -8,7 +8,7 @@
* @param {number} end End. * @param {number} end End.
* @param {number} stride Stride. * @param {number} stride Stride.
* @param {import("../../transform.js").Transform} transform Transform. * @param {import("../../transform.js").Transform} transform Transform.
* @param {Array<number>=} opt_dest Destination. * @param {Array<number>} [opt_dest] Destination.
* @return {Array<number>} Transformed coordinates. * @return {Array<number>} Transformed coordinates.
*/ */
export function transform2D( export function transform2D(
@@ -40,7 +40,7 @@ export function transform2D(
* @param {number} stride Stride. * @param {number} stride Stride.
* @param {number} angle Angle. * @param {number} angle Angle.
* @param {Array<number>} anchor Rotation anchor point. * @param {Array<number>} anchor Rotation anchor point.
* @param {Array<number>=} opt_dest Destination. * @param {Array<number>} [opt_dest] Destination.
* @return {Array<number>} Transformed coordinates. * @return {Array<number>} Transformed coordinates.
*/ */
export function rotate( export function rotate(
@@ -82,7 +82,7 @@ export function rotate(
* @param {number} sx Scale factor in the x-direction. * @param {number} sx Scale factor in the x-direction.
* @param {number} sy Scale factor in the y-direction. * @param {number} sy Scale factor in the y-direction.
* @param {Array<number>} anchor Scale anchor point. * @param {Array<number>} anchor Scale anchor point.
* @param {Array<number>=} opt_dest Destination. * @param {Array<number>} [opt_dest] Destination.
* @return {Array<number>} Transformed coordinates. * @return {Array<number>} Transformed coordinates.
*/ */
export function scale( export function scale(
@@ -121,7 +121,7 @@ export function scale(
* @param {number} stride Stride. * @param {number} stride Stride.
* @param {number} deltaX Delta X. * @param {number} deltaX Delta X.
* @param {number} deltaY Delta Y. * @param {number} deltaY Delta Y.
* @param {Array<number>=} opt_dest Destination. * @param {Array<number>} [opt_dest] Destination.
* @return {Array<number>} Transformed coordinates. * @return {Array<number>} Transformed coordinates.
*/ */
export function translate( export function translate(

View File

@@ -75,7 +75,7 @@ export {default as Translate} from './interaction/Translate.js';
* * {@link module:ol/interaction/MouseWheelZoom~MouseWheelZoom} * * {@link module:ol/interaction/MouseWheelZoom~MouseWheelZoom}
* * {@link module:ol/interaction/DragZoom~DragZoom} * * {@link module:ol/interaction/DragZoom~DragZoom}
* *
* @param {DefaultsOptions=} opt_options Defaults options. * @param {DefaultsOptions} [opt_options] Defaults options.
* @return {import("./Collection.js").default<import("./interaction/Interaction.js").default>} * @return {import("./Collection.js").default<import("./interaction/Interaction.js").default>}
* A collection of interactions to be used with the {@link module:ol/Map~Map} * A collection of interactions to be used with the {@link module:ol/Map~Map}
* constructor's `interactions` option. * constructor's `interactions` option.

View File

@@ -17,7 +17,7 @@ import MapBrowserEventType from '../MapBrowserEventType.js';
*/ */
class DoubleClickZoom extends Interaction { class DoubleClickZoom extends Interaction {
/** /**
* @param {Options=} opt_options Options. * @param {Options} [opt_options] Options.
*/ */
constructor(opt_options) { constructor(opt_options) {
super(); super();

View File

@@ -45,8 +45,8 @@ export class DragAndDropEvent extends Event {
/** /**
* @param {DragAndDropEventType} type Type. * @param {DragAndDropEventType} type Type.
* @param {File} file File. * @param {File} file File.
* @param {Array<import("../Feature.js").default>=} opt_features Features. * @param {Array<import("../Feature.js").default>} [opt_features] Features.
* @param {import("../proj/Projection.js").default=} opt_projection Projection. * @param {import("../proj/Projection.js").default} [opt_projection] Projection.
*/ */
constructor(type, file, opt_features, opt_projection) { constructor(type, file, opt_features, opt_projection) {
super(type); super(type);
@@ -88,7 +88,7 @@ export class DragAndDropEvent extends Event {
*/ */
class DragAndDrop extends Interaction { class DragAndDrop extends Interaction {
/** /**
* @param {Options=} opt_options Options. * @param {Options} [opt_options] Options.
*/ */
constructor(opt_options) { constructor(opt_options) {
const options = opt_options ? opt_options : {}; const options = opt_options ? opt_options : {};

View File

@@ -107,7 +107,7 @@ export class DragBoxEvent extends Event {
*/ */
class DragBox extends PointerInteraction { class DragBox extends PointerInteraction {
/** /**
* @param {Options=} opt_options Options. * @param {Options} [opt_options] Options.
*/ */
constructor(opt_options) { constructor(opt_options) {
super(); super();

View File

@@ -34,7 +34,7 @@ import {
*/ */
class DragPan extends PointerInteraction { class DragPan extends PointerInteraction {
/** /**
* @param {Options=} opt_options Options. * @param {Options} [opt_options] Options.
*/ */
constructor(opt_options) { constructor(opt_options) {
super({ super({

View File

@@ -30,7 +30,7 @@ import {disable} from '../rotationconstraint.js';
*/ */
class DragRotate extends PointerInteraction { class DragRotate extends PointerInteraction {
/** /**
* @param {Options=} opt_options Options. * @param {Options} [opt_options] Options.
*/ */
constructor(opt_options) { constructor(opt_options) {
const options = opt_options ? opt_options : {}; const options = opt_options ? opt_options : {};

View File

@@ -26,7 +26,7 @@ import {mouseOnly, shiftKeyOnly} from '../events/condition.js';
*/ */
class DragRotateAndZoom extends PointerInteraction { class DragRotateAndZoom extends PointerInteraction {
/** /**
* @param {Options=} opt_options Options. * @param {Options} [opt_options] Options.
*/ */
constructor(opt_options) { constructor(opt_options) {
const options = opt_options ? opt_options : {}; const options = opt_options ? opt_options : {};

View File

@@ -38,7 +38,7 @@ import {shiftKeyOnly} from '../events/condition.js';
*/ */
class DragZoom extends DragBox { class DragZoom extends DragBox {
/** /**
* @param {Options=} opt_options Options. * @param {Options} [opt_options] Options.
*/ */
constructor(opt_options) { constructor(opt_options) {
const options = opt_options ? opt_options : {}; const options = opt_options ? opt_options : {};

View File

@@ -1140,9 +1140,9 @@ function getDefaultStyleFunction() {
* Create a `geometryFunction` for `type: 'Circle'` that will create a regular * Create a `geometryFunction` for `type: 'Circle'` that will create a regular
* polygon with a user specified number of sides and start angle instead of a * polygon with a user specified number of sides and start angle instead of a
* `import("../geom/Circle.js").Circle` geometry. * `import("../geom/Circle.js").Circle` geometry.
* @param {number=} opt_sides Number of sides of the regular polygon. * @param {number} [opt_sides] Number of sides of the regular polygon.
* Default is 32. * Default is 32.
* @param {number=} opt_angle Angle of the first point in counter-clockwise * @param {number} [opt_angle] Angle of the first point in counter-clockwise
* radians. 0 means East. * radians. 0 means East.
* Default is the angle defined by the heading from the center of the * Default is the angle defined by the heading from the center of the
* regular polygon to the current pointer position. * regular polygon to the current pointer position.

View File

@@ -85,7 +85,7 @@ export class ExtentEvent extends Event {
*/ */
class Extent extends PointerInteraction { class Extent extends PointerInteraction {
/** /**
* @param {Options=} opt_options Options. * @param {Options} [opt_options] Options.
*/ */
constructor(opt_options) { constructor(opt_options) {
const options = opt_options || {}; const options = opt_options || {};

View File

@@ -31,7 +31,7 @@ import {easeOut, linear} from '../easing.js';
*/ */
class Interaction extends BaseObject { class Interaction extends BaseObject {
/** /**
* @param {InteractionOptions=} opt_options Options. * @param {InteractionOptions} [opt_options] Options.
*/ */
constructor(opt_options) { constructor(opt_options) {
super(); super();
@@ -102,7 +102,7 @@ class Interaction extends BaseObject {
/** /**
* @param {import("../View.js").default} view View. * @param {import("../View.js").default} view View.
* @param {import("../coordinate.js").Coordinate} delta Delta. * @param {import("../coordinate.js").Coordinate} delta Delta.
* @param {number=} opt_duration Duration. * @param {number} [opt_duration] Duration.
*/ */
export function pan(view, delta, opt_duration) { export function pan(view, delta, opt_duration) {
const currentCenter = view.getCenterInternal(); const currentCenter = view.getCenterInternal();
@@ -119,8 +119,8 @@ export function pan(view, delta, opt_duration) {
/** /**
* @param {import("../View.js").default} view View. * @param {import("../View.js").default} view View.
* @param {number} delta Delta from previous zoom level. * @param {number} delta Delta from previous zoom level.
* @param {import("../coordinate.js").Coordinate=} opt_anchor Anchor coordinate in the user projection. * @param {import("../coordinate.js").Coordinate} [opt_anchor] Anchor coordinate in the user projection.
* @param {number=} opt_duration Duration. * @param {number} [opt_duration] Duration.
*/ */
export function zoomByDelta(view, delta, opt_anchor, opt_duration) { export function zoomByDelta(view, delta, opt_anchor, opt_duration) {
const currentZoom = view.getZoom(); const currentZoom = view.getZoom();

View File

@@ -34,7 +34,7 @@ import {rotate as rotateCoordinate} from '../coordinate.js';
*/ */
class KeyboardPan extends Interaction { class KeyboardPan extends Interaction {
/** /**
* @param {Options=} opt_options Options. * @param {Options} [opt_options] Options.
*/ */
constructor(opt_options) { constructor(opt_options) {
super(); super();

Some files were not shown because too many files have changed in this diff Show More