diff --git a/src/ol/Disposable.js b/src/ol/Disposable.js index 3cdf80c89c..10fb1ab91c 100644 --- a/src/ol/Disposable.js +++ b/src/ol/Disposable.js @@ -4,6 +4,7 @@ import {UNDEFINED} from './functions.js'; /** + * @classdesc * Objects that need to clean up after themselves. */ class Disposable { diff --git a/src/ol/Feature.js b/src/ol/Feature.js index 838e8dcaa8..deca8a3921 100644 --- a/src/ol/Feature.js +++ b/src/ol/Feature.js @@ -53,7 +53,6 @@ import Style from './style/Style.js'; * @api */ class Feature extends BaseObject { - /** * @param {module:ol/geom/Geometry|Object.=} opt_geometryOrProperties * You may pass a Geometry object directly, or an object literal containing diff --git a/src/ol/format/filter/Contains.js b/src/ol/format/filter/Contains.js index 4bea87e530..dee9b3e989 100644 --- a/src/ol/format/filter/Contains.js +++ b/src/ol/format/filter/Contains.js @@ -7,6 +7,7 @@ import Spatial from '../filter/Spatial.js'; * @classdesc * Represents a `` operator to test whether a geometry-valued property * contains a given geometry. + * @api */ class Contains extends Spatial { @@ -15,7 +16,6 @@ class Contains extends Spatial { * @param {!module:ol/geom/Geometry} geometry Geometry. * @param {string=} opt_srsName SRS name. No srsName attribute will be * set on geometries when this is not provided. - * @api */ constructor(geometryName, geometry, opt_srsName) { diff --git a/src/ol/format/filter/During.js b/src/ol/format/filter/During.js index 45f4ade49d..a1989a5bc9 100644 --- a/src/ol/format/filter/During.js +++ b/src/ol/format/filter/During.js @@ -6,6 +6,7 @@ import Comparison from '../filter/Comparison.js'; /** * @classdesc * Represents a `` comparison operator. + * @api */ class During extends Comparison { @@ -13,7 +14,6 @@ class During extends Comparison { * @param {!string} propertyName Name of the context property to compare. * @param {!string} begin The begin date in ISO-8601 format. * @param {!string} end The end date in ISO-8601 format. - * @api */ constructor(propertyName, begin, end) { super('During', propertyName); diff --git a/src/ol/format/filter/EqualTo.js b/src/ol/format/filter/EqualTo.js index 253a5add6c..c192906ded 100644 --- a/src/ol/format/filter/EqualTo.js +++ b/src/ol/format/filter/EqualTo.js @@ -6,6 +6,7 @@ import ComparisonBinary from '../filter/ComparisonBinary.js'; /** * @classdesc * Represents a `` comparison operator. + * @api */ class EqualTo extends ComparisonBinary { @@ -13,7 +14,6 @@ class EqualTo extends ComparisonBinary { * @param {!string} propertyName Name of the context property to compare. * @param {!(string|number)} expression The value to compare. * @param {boolean=} opt_matchCase Case-sensitive? - * @api */ constructor(propertyName, expression, opt_matchCase) { super('PropertyIsEqualTo', propertyName, expression, opt_matchCase); diff --git a/src/ol/format/filter/GreaterThan.js b/src/ol/format/filter/GreaterThan.js index e2ab526557..ec8eb2da62 100644 --- a/src/ol/format/filter/GreaterThan.js +++ b/src/ol/format/filter/GreaterThan.js @@ -6,13 +6,13 @@ import ComparisonBinary from '../filter/ComparisonBinary.js'; /** * @classdesc * Represents a `` comparison operator. + * @api */ class GreaterThan extends ComparisonBinary { /** * @param {!string} propertyName Name of the context property to compare. * @param {!number} expression The value to compare. - * @api */ constructor(propertyName, expression) { super('PropertyIsGreaterThan', propertyName, expression); diff --git a/src/ol/format/filter/GreaterThanOrEqualTo.js b/src/ol/format/filter/GreaterThanOrEqualTo.js index dac7068184..8af0ec7a87 100644 --- a/src/ol/format/filter/GreaterThanOrEqualTo.js +++ b/src/ol/format/filter/GreaterThanOrEqualTo.js @@ -6,13 +6,13 @@ import ComparisonBinary from '../filter/ComparisonBinary.js'; /** * @classdesc * Represents a `` comparison operator. + * @api */ class GreaterThanOrEqualTo extends ComparisonBinary { /** * @param {!string} propertyName Name of the context property to compare. * @param {!number} expression The value to compare. - * @api */ constructor(propertyName, expression) { super('PropertyIsGreaterThanOrEqualTo', propertyName, expression); diff --git a/src/ol/format/filter/Intersects.js b/src/ol/format/filter/Intersects.js index 94f0117bb5..cfdcd7ee4e 100644 --- a/src/ol/format/filter/Intersects.js +++ b/src/ol/format/filter/Intersects.js @@ -7,6 +7,7 @@ import Spatial from '../filter/Spatial.js'; * @classdesc * Represents a `` operator to test whether a geometry-valued property * intersects a given geometry. + * @api */ class Intersects extends Spatial { diff --git a/src/ol/format/filter/IsBetween.js b/src/ol/format/filter/IsBetween.js index 899836fc62..f5f097d310 100644 --- a/src/ol/format/filter/IsBetween.js +++ b/src/ol/format/filter/IsBetween.js @@ -6,6 +6,7 @@ import Comparison from '../filter/Comparison.js'; /** * @classdesc * Represents a `` comparison operator. + * @api */ class IsBetween extends Comparison { @@ -13,7 +14,6 @@ class IsBetween extends Comparison { * @param {!string} propertyName Name of the context property to compare. * @param {!number} lowerBoundary The lower bound of the range. * @param {!number} upperBoundary The upper bound of the range. - * @api */ constructor(propertyName, lowerBoundary, upperBoundary) { super('PropertyIsBetween', propertyName); diff --git a/src/ol/format/filter/IsLike.js b/src/ol/format/filter/IsLike.js index c663446016..eb73ba9812 100644 --- a/src/ol/format/filter/IsLike.js +++ b/src/ol/format/filter/IsLike.js @@ -6,6 +6,7 @@ import Comparison from '../filter/Comparison.js'; /** * @classdesc * Represents a `` comparison operator. + * @api */ class IsLike extends Comparison { @@ -20,7 +21,6 @@ class IsLike extends Comparison { * @param {string=} opt_escapeChar Escape character which can be used to escape * the pattern characters. Default is '!'. * @param {boolean=} opt_matchCase Case-sensitive? - * @api */ constructor(propertyName, pattern, opt_wildCard, opt_singleChar, opt_escapeChar, opt_matchCase) { super('PropertyIsLike', propertyName); diff --git a/src/ol/format/filter/IsNull.js b/src/ol/format/filter/IsNull.js index 17fa0fa901..bc22613952 100644 --- a/src/ol/format/filter/IsNull.js +++ b/src/ol/format/filter/IsNull.js @@ -6,12 +6,12 @@ import Comparison from '../filter/Comparison.js'; /** * @classdesc * Represents a `` comparison operator. + * @api */ class IsNull extends Comparison { /** * @param {!string} propertyName Name of the context property to compare. - * @api */ constructor(propertyName) { super('PropertyIsNull', propertyName); diff --git a/src/ol/format/filter/LessThan.js b/src/ol/format/filter/LessThan.js index 82917eb2d0..fd66b4b1f9 100644 --- a/src/ol/format/filter/LessThan.js +++ b/src/ol/format/filter/LessThan.js @@ -6,13 +6,13 @@ import ComparisonBinary from '../filter/ComparisonBinary.js'; /** * @classdesc * Represents a `` comparison operator. + * @api */ class LessThan extends ComparisonBinary { /** * @param {!string} propertyName Name of the context property to compare. * @param {!number} expression The value to compare. - * @api */ constructor(propertyName, expression) { super('PropertyIsLessThan', propertyName, expression); diff --git a/src/ol/format/filter/LessThanOrEqualTo.js b/src/ol/format/filter/LessThanOrEqualTo.js index 46c4f09a11..7129f1db9d 100644 --- a/src/ol/format/filter/LessThanOrEqualTo.js +++ b/src/ol/format/filter/LessThanOrEqualTo.js @@ -6,13 +6,13 @@ import ComparisonBinary from '../filter/ComparisonBinary.js'; /** * @classdesc * Represents a `` comparison operator. + * @api */ class LessThanOrEqualTo extends ComparisonBinary { /** * @param {!string} propertyName Name of the context property to compare. * @param {!number} expression The value to compare. - * @api */ constructor(propertyName, expression) { super('PropertyIsLessThanOrEqualTo', propertyName, expression); diff --git a/src/ol/format/filter/Not.js b/src/ol/format/filter/Not.js index c5cb77782c..a72ceea0a8 100644 --- a/src/ol/format/filter/Not.js +++ b/src/ol/format/filter/Not.js @@ -6,12 +6,12 @@ import Filter from '../filter/Filter.js'; /** * @classdesc * Represents a logical `` operator for a filter condition. + * @api */ class Not extends Filter { /** * @param {!module:ol/format/filter/Filter} condition Filter condition. - * @api */ constructor(condition) { diff --git a/src/ol/format/filter/NotEqualTo.js b/src/ol/format/filter/NotEqualTo.js index d66ca80ad3..2f0f082629 100644 --- a/src/ol/format/filter/NotEqualTo.js +++ b/src/ol/format/filter/NotEqualTo.js @@ -6,6 +6,7 @@ import ComparisonBinary from '../filter/ComparisonBinary.js'; /** * @classdesc * Represents a `` comparison operator. + * @api */ class NotEqualTo extends ComparisonBinary { @@ -13,7 +14,6 @@ class NotEqualTo extends ComparisonBinary { * @param {!string} propertyName Name of the context property to compare. * @param {!(string|number)} expression The value to compare. * @param {boolean=} opt_matchCase Case-sensitive? - * @api */ constructor(propertyName, expression, opt_matchCase) { super('PropertyIsNotEqualTo', propertyName, expression, opt_matchCase); diff --git a/src/ol/format/filter/Or.js b/src/ol/format/filter/Or.js index 6f2543d2aa..83f3d2e5ee 100644 --- a/src/ol/format/filter/Or.js +++ b/src/ol/format/filter/Or.js @@ -6,12 +6,12 @@ import LogicalNary from '../filter/LogicalNary.js'; /** * @classdesc * Represents a logical `` operator between two ore more filter conditions. + * @api */ class Or extends LogicalNary { /** * @param {...module:ol/format/filter/Filter} conditions Conditions. - * @api */ constructor(conditions) { const params = ['Or'].concat(Array.prototype.slice.call(arguments)); diff --git a/src/ol/format/filter/Within.js b/src/ol/format/filter/Within.js index e158555309..5e88593b89 100644 --- a/src/ol/format/filter/Within.js +++ b/src/ol/format/filter/Within.js @@ -7,6 +7,7 @@ import Spatial from '../filter/Spatial.js'; * @classdesc * Represents a `` operator to test whether a geometry-valued property * is within a given geometry. + * @api */ class Within extends Spatial { @@ -15,7 +16,6 @@ class Within extends Spatial { * @param {!module:ol/geom/Geometry} geometry Geometry. * @param {string=} opt_srsName SRS name. No srsName attribute will be * set on geometries when this is not provided. - * @api */ constructor(geometryName, geometry, opt_srsName) { super('Within', geometryName, geometry, opt_srsName); diff --git a/src/ol/interaction/DoubleClickZoom.js b/src/ol/interaction/DoubleClickZoom.js index 04f1fd5a16..4a8fae0927 100644 --- a/src/ol/interaction/DoubleClickZoom.js +++ b/src/ol/interaction/DoubleClickZoom.js @@ -15,12 +15,12 @@ import Interaction, {zoomByDelta} from '../interaction/Interaction.js'; /** * @classdesc * Allows the user to zoom by double-clicking on the map. + * @api */ class DoubleClickZoom extends Interaction { /** * @param {module:ol/interaction/DoubleClickZoom~Options=} opt_options Options. - * @api */ constructor(opt_options) { super({ diff --git a/src/ol/interaction/DragAndDrop.js b/src/ol/interaction/DragAndDrop.js index 186d1798c9..ede4e3167c 100644 --- a/src/ol/interaction/DragAndDrop.js +++ b/src/ol/interaction/DragAndDrop.js @@ -83,13 +83,13 @@ class DragAndDropEvent extends Event { /** * @classdesc * Handles input of vector data by drag and drop. + * @api * * @fires module:ol/interaction/DragAndDrop~DragAndDropEvent */ class DragAndDrop extends Interaction { /** * @param {module:ol/interaction/DragAndDrop~Options=} opt_options Options. - * @api */ constructor(opt_options) { diff --git a/src/ol/interaction/DragBox.js b/src/ol/interaction/DragBox.js index a72c6a3f04..d7a26642d8 100644 --- a/src/ol/interaction/DragBox.js +++ b/src/ol/interaction/DragBox.js @@ -107,11 +107,11 @@ class DragBoxEvent extends Event { * This interaction is only supported for mouse devices. * * @fires module:ol/interaction/DragBox~DragBoxEvent + * @api */ class DragBox extends PointerInteraction { /** * @param {module:ol/interaction/DragBox~Options=} opt_options Options. - * @api */ constructor(opt_options) { diff --git a/src/ol/interaction/DragPan.js b/src/ol/interaction/DragPan.js index c9d385f92a..e5bd071d7a 100644 --- a/src/ol/interaction/DragPan.js +++ b/src/ol/interaction/DragPan.js @@ -21,11 +21,11 @@ import PointerInteraction, {centroid as centroidFromPointers} from '../interacti /** * @classdesc * Allows the user to pan the map by dragging the map. + * @api */ class DragPan extends PointerInteraction { /** * @param {module:ol/interaction/DragPan~Options=} opt_options Options. - * @api */ constructor(opt_options) { diff --git a/src/ol/interaction/DragRotate.js b/src/ol/interaction/DragRotate.js index bfa82a3189..4560953402 100644 --- a/src/ol/interaction/DragRotate.js +++ b/src/ol/interaction/DragRotate.js @@ -26,12 +26,12 @@ import PointerInteraction from '../interaction/Pointer.js'; * it to when the alt and shift keys are held down. * * This interaction is only supported for mouse devices. + * @api */ class DragRotate extends PointerInteraction { /** * @param {module:ol/interaction/DragRotate~Options=} opt_options Options. - * @api */ constructor(opt_options) { diff --git a/src/ol/interaction/DragRotateAndZoom.js b/src/ol/interaction/DragRotateAndZoom.js index b751a871cf..fbf6f97e96 100644 --- a/src/ol/interaction/DragRotateAndZoom.js +++ b/src/ol/interaction/DragRotateAndZoom.js @@ -27,12 +27,12 @@ import PointerInteraction from '../interaction/Pointer.js'; * This interaction is only supported for mouse devices. * * And this interaction is not included in the default interactions. + * @api */ class DragRotateAndZoom extends PointerInteraction { /** * @param {module:ol/interaction/DragRotateAndZoom~Options=} opt_options Options. - * @api */ constructor(opt_options) { diff --git a/src/ol/interaction/DragZoom.js b/src/ol/interaction/DragZoom.js index a8dc5c28fa..1e84314889 100644 --- a/src/ol/interaction/DragZoom.js +++ b/src/ol/interaction/DragZoom.js @@ -28,11 +28,11 @@ import DragBox from '../interaction/DragBox.js'; * * To change the style of the box, use CSS and the `.ol-dragzoom` selector, or * your custom one configured with `className`. + * @api */ class DragZoom extends DragBox { /** * @param {module:ol/interaction/DragZoom~Options=} opt_options Options. - * @api */ constructor(opt_options) { const options = opt_options ? opt_options : {}; diff --git a/src/ol/interaction/Draw.js b/src/ol/interaction/Draw.js index 52796f5e96..61f59ba0fb 100644 --- a/src/ol/interaction/Draw.js +++ b/src/ol/interaction/Draw.js @@ -154,11 +154,11 @@ class DrawEvent extends Event { * Interaction for drawing feature geometries. * * @fires module:ol/interaction/Draw~DrawEvent + * @api */ class Draw extends PointerInteraction { /** * @param {module:ol/interaction/Draw~Options} options Options. - * @api */ constructor(options) { diff --git a/src/ol/interaction/Extent.js b/src/ol/interaction/Extent.js index fb75be3a90..abbbbd415a 100644 --- a/src/ol/interaction/Extent.js +++ b/src/ol/interaction/Extent.js @@ -77,11 +77,11 @@ class ExtentInteractionEvent extends Event { * This interaction is only supported for mouse devices. * * @fires module:ol/interaction/Extent~Event + * @api */ class ExtentInteraction extends PointerInteraction { /** * @param {module:ol/interaction/Extent~Options=} opt_options Options. - * @api */ constructor(opt_options) { diff --git a/src/ol/interaction/Interaction.js b/src/ol/interaction/Interaction.js index 0a97db11de..32f678363d 100644 --- a/src/ol/interaction/Interaction.js +++ b/src/ol/interaction/Interaction.js @@ -29,11 +29,11 @@ import {clamp} from '../math.js'; * by a keyboard event not a button element event. * Although interactions do not have a DOM element, some of them do render * vectors and so are visible on the screen. + * @api */ class Interaction extends BaseObject { /** * @param {module:ol/interaction/Interaction~InteractionOptions} options Options. - * @api */ constructor(options) { super(); diff --git a/src/ol/interaction/KeyboardPan.js b/src/ol/interaction/KeyboardPan.js index c6ee6e84a8..c394100c12 100644 --- a/src/ol/interaction/KeyboardPan.js +++ b/src/ol/interaction/KeyboardPan.js @@ -32,11 +32,11 @@ import Interaction, {pan} from '../interaction/Interaction.js'; * element, focus will have to be on, and returned to, this element if the keys * are to function. * See also {@link module:ol/interaction/KeyboardZoom~KeyboardZoom}. + * @api */ class KeyboardPan extends Interaction { /** * @param {module:ol/interaction/KeyboardPan~Options=} opt_options Options. - * @api */ constructor(opt_options) { diff --git a/src/ol/interaction/KeyboardZoom.js b/src/ol/interaction/KeyboardZoom.js index 496b85859d..93b040ea1c 100644 --- a/src/ol/interaction/KeyboardZoom.js +++ b/src/ol/interaction/KeyboardZoom.js @@ -28,11 +28,11 @@ import Interaction, {zoomByDelta} from '../interaction/Interaction.js'; * element, focus will have to be on, and returned to, this element if the keys * are to function. * See also {@link moudle:ol/interaction/KeyboardPan~KeyboardPan}. + * @api */ class KeyboardZoom extends Interaction { /** * @param {module:ol/interaction/KeyboardZoom~Options=} opt_options Options. - * @api */ constructor(opt_options) { diff --git a/src/ol/interaction/Modify.js b/src/ol/interaction/Modify.js index 6691a596e1..fba132d401 100644 --- a/src/ol/interaction/Modify.js +++ b/src/ol/interaction/Modify.js @@ -149,11 +149,11 @@ export class ModifyEvent extends Event { * key is pressed. To configure the interaction with a different condition * for deletion, use the `deleteCondition` option. * @fires module:ol/interaction/Modify~ModifyEvent + * @api */ class Modify extends PointerInteraction { /** * @param {module:ol/interaction/Modify~Options} options Options. - * @api */ constructor(options) { diff --git a/src/ol/interaction/MouseWheelZoom.js b/src/ol/interaction/MouseWheelZoom.js index 038eabb829..cc1bca604c 100644 --- a/src/ol/interaction/MouseWheelZoom.js +++ b/src/ol/interaction/MouseWheelZoom.js @@ -46,11 +46,11 @@ export const Mode = { /** * @classdesc * Allows the user to zoom the map by scrolling the mouse wheel. + * @api */ class MouseWheelZoom extends Interaction { /** * @param {module:ol/interaction/MouseWheelZoom~Options=} opt_options Options. - * @api */ constructor(opt_options) { diff --git a/src/ol/interaction/PinchRotate.js b/src/ol/interaction/PinchRotate.js index d87290e197..c2a4b25435 100644 --- a/src/ol/interaction/PinchRotate.js +++ b/src/ol/interaction/PinchRotate.js @@ -20,11 +20,11 @@ import {disable} from '../rotationconstraint.js'; * @classdesc * Allows the user to rotate the map by twisting with two fingers * on a touch screen. + * @api */ class PinchRotate extends PointerInteraction { /** * @param {module:ol/interaction/PinchRotate~Options=} opt_options Options. - * @api */ constructor(opt_options) { diff --git a/src/ol/interaction/PinchZoom.js b/src/ol/interaction/PinchZoom.js index 257ea320fa..25e8eec6f1 100644 --- a/src/ol/interaction/PinchZoom.js +++ b/src/ol/interaction/PinchZoom.js @@ -19,11 +19,11 @@ import PointerInteraction, {centroid as centroidFromPointers} from '../interacti * @classdesc * Allows the user to zoom the map by pinching with two fingers * on a touch screen. + * @api */ class PinchZoom extends PointerInteraction { /** * @param {module:ol/interaction/PinchZoom~Options=} opt_options Options. - * @api */ constructor(opt_options) { diff --git a/src/ol/interaction/Pointer.js b/src/ol/interaction/Pointer.js index e78f34546c..a488f80727 100644 --- a/src/ol/interaction/Pointer.js +++ b/src/ol/interaction/Pointer.js @@ -73,11 +73,11 @@ const handleMoveEvent = UNDEFINED; * started. During a drag sequence the `handleDragEvent` user function is * called on `move` events. The drag sequence ends when the `handleUpEvent` * user function is called and returns `false`. + * @api */ class PointerInteraction extends Interaction { /** * @param {module:ol/interaction/Pointer~Options=} opt_options Options. - * @api */ constructor(opt_options) { diff --git a/src/ol/interaction/Select.js b/src/ol/interaction/Select.js index 3b2c1d5551..997075f433 100644 --- a/src/ol/interaction/Select.js +++ b/src/ol/interaction/Select.js @@ -152,11 +152,11 @@ class SelectEvent extends Event { * Selected features are added to an internal unmanaged layer. * * @fires SelectEvent + * @api */ class Select extends Interaction { /** * @param {module:ol/interaction/Select~Options=} opt_options Options. - * @api */ constructor(opt_options) { diff --git a/src/ol/interaction/Snap.js b/src/ol/interaction/Snap.js index e6faaf1ffb..abc62c150c 100644 --- a/src/ol/interaction/Snap.js +++ b/src/ol/interaction/Snap.js @@ -62,11 +62,12 @@ import RBush from '../structs/RBush.js'; * var snap = new Snap({ * source: source * }); + * + * @api */ class Snap extends PointerInteraction { /** * @param {module:ol/interaction/Snap~Options=} opt_options Options. - * @api */ constructor(opt_options) { diff --git a/src/ol/interaction/Translate.js b/src/ol/interaction/Translate.js index 419b29cb23..90989c4302 100644 --- a/src/ol/interaction/Translate.js +++ b/src/ol/interaction/Translate.js @@ -91,11 +91,11 @@ export class TranslateEvent extends Event { * Interaction for translating (moving) features. * * @fires module:ol/interaction/Translate~TranslateEvent + * @api */ class Translate extends PointerInteraction { /** * @param {module:ol/interaction/Translate~Options=} opt_options Options. - * @api */ constructor(opt_options) { super({ diff --git a/src/ol/layer/Base.js b/src/ol/layer/Base.js index e75b3eec1a..9de3c476c7 100644 --- a/src/ol/layer/Base.js +++ b/src/ol/layer/Base.js @@ -22,17 +22,19 @@ import {assign} from '../obj.js'; */ +/** + * @classdesc + * Abstract base class; normally only used for creating subclasses and not + * instantiated in apps. + * Note that with {@link module:ol/layer/Base} and all its subclasses, any property set in + * the options is set as a {@link module:ol/Object} property on the layer object, so + * is observable, and has get/set accessors. + * + * @api + */ class BaseLayer extends BaseObject { /** - * @classdesc - * Abstract base class; normally only used for creating subclasses and not - * instantiated in apps. - * Note that with {@link module:ol/layer/Base} and all its subclasses, any property set in - * the options is set as a {@link module:ol/Object} property on the layer object, so - * is observable, and has get/set accessors. - * * @param {module:ol/layer/Base~Options} options Layer options. - * @api */ constructor(options) { diff --git a/src/ol/layer/Group.js b/src/ol/layer/Group.js index 4d6332a5d0..2a172273c5 100644 --- a/src/ol/layer/Group.js +++ b/src/ol/layer/Group.js @@ -40,15 +40,17 @@ const Property = { }; +/** + * @classdesc + * A {@link module:ol/Collection~Collection} of layers that are handled together. + * + * A generic `change` event is triggered when the group/Collection changes. + * + * @api + */ class LayerGroup extends BaseLayer { /** - * @classdesc - * A {@link module:ol/Collection~Collection} of layers that are handled together. - * - * A generic `change` event is triggered when the group/Collection changes. - * * @param {module:ol/layer/Group~Options=} opt_options Layer options. - * @api */ constructor(opt_options) { diff --git a/src/ol/layer/Heatmap.js b/src/ol/layer/Heatmap.js index d7c28495a1..32585fffad 100644 --- a/src/ol/layer/Heatmap.js +++ b/src/ol/layer/Heatmap.js @@ -59,17 +59,19 @@ const Property = { const DEFAULT_GRADIENT = ['#00f', '#0ff', '#0f0', '#ff0', '#f00']; +/** + * @classdesc + * Layer for rendering vector data as a heatmap. + * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject} + * property on the layer object; for example, setting `title: 'My Title'` in the + * options means that `title` is observable, and has get/set accessors. + * + * @fires module:ol/render/Event~RenderEvent + * @api + */ class Heatmap extends VectorLayer { /** - * @classdesc - * Layer for rendering vector data as a heatmap. - * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject} - * property on the layer object; for example, setting `title: 'My Title'` in the - * options means that `title` is observable, and has get/set accessors. - * - * @fires module:ol/render/Event~RenderEvent * @param {module:ol/layer/Heatmap~Options=} opt_options Options. - * @api */ constructor(opt_options) { const options = opt_options ? opt_options : {}; diff --git a/src/ol/layer/Image.js b/src/ol/layer/Image.js index 417864db8e..38c69f79c4 100644 --- a/src/ol/layer/Image.js +++ b/src/ol/layer/Image.js @@ -25,19 +25,21 @@ import Layer from '../layer/Layer.js'; */ +/** + * @classdesc + * Server-rendered images that are available for arbitrary extents and + * resolutions. + * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject} + * property on the layer object; for example, setting `title: 'My Title'` in the + * options means that `title` is observable, and has get/set accessors. + * + * @fires module:ol/render/Event~RenderEvent + * @api + */ class ImageLayer extends Layer { /** - * @classdesc - * Server-rendered images that are available for arbitrary extents and - * resolutions. - * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject} - * property on the layer object; for example, setting `title: 'My Title'` in the - * options means that `title` is observable, and has get/set accessors. - * - * @fires module:ol/render/Event~RenderEvent * @param {module:ol/layer/Image~Options=} opt_options Layer options. - * @api */ constructor(opt_options) { const options = opt_options ? opt_options : {}; diff --git a/src/ol/layer/Layer.js b/src/ol/layer/Layer.js index 0711d28b6f..9d361818f1 100644 --- a/src/ol/layer/Layer.js +++ b/src/ol/layer/Layer.js @@ -43,26 +43,26 @@ import SourceState from '../source/State.js'; * @property {number} minResolution */ - +/** + * @classdesc + * Abstract base class; normally only used for creating subclasses and not + * instantiated in apps. + * A visual representation of raster or vector map data. + * Layers group together those properties that pertain to how the data is to be + * displayed, irrespective of the source of that data. + * + * Layers are usually added to a map with {@link module:ol/Map#addLayer}. Components + * like {@link module:ol/interaction/Select~Select} use unmanaged layers + * internally. These unmanaged layers are associated with the map using + * {@link module:ol/layer/Layer~Layer#setMap} instead. + * + * A generic `change` event is fired when the state of the source changes. + * + * @fires module:ol/render/Event~RenderEvent + */ class Layer extends BaseLayer { /** - * @classdesc - * Abstract base class; normally only used for creating subclasses and not - * instantiated in apps. - * A visual representation of raster or vector map data. - * Layers group together those properties that pertain to how the data is to be - * displayed, irrespective of the source of that data. - * - * Layers are usually added to a map with {@link module:ol/Map#addLayer}. Components - * like {@link module:ol/interaction/Select~Select} use unmanaged layers - * internally. These unmanaged layers are associated with the map using - * {@link module:ol/layer/Layer~Layer#setMap} instead. - * - * A generic `change` event is fired when the state of the source changes. - * - * @fires module:ol/render/Event~RenderEvent * @param {module:ol/layer/Layer~Options} options Layer options. - * @api */ constructor(options) { diff --git a/src/ol/layer/Tile.js b/src/ol/layer/Tile.js index ca1cef189e..1782d8c329 100644 --- a/src/ol/layer/Tile.js +++ b/src/ol/layer/Tile.js @@ -29,18 +29,19 @@ import {assign} from '../obj.js'; * @property {boolean} [useInterimTilesOnError=true] Use interim tiles on error. */ - +/** + * @classdesc + * For layer sources that provide pre-rendered, tiled images in grids that are + * organized by zoom levels for specific resolutions. + * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject} + * property on the layer object; for example, setting `title: 'My Title'` in the + * options means that `title` is observable, and has get/set accessors. + * + * @api + */ class TileLayer extends Layer { /** - * @classdesc - * For layer sources that provide pre-rendered, tiled images in grids that are - * organized by zoom levels for specific resolutions. - * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject} - * property on the layer object; for example, setting `title: 'My Title'` in the - * options means that `title` is observable, and has get/set accessors. - * * @param {module:ol/layer/Tile~Options=} opt_options Tile layer options. - * @api */ constructor(opt_options) { const options = opt_options ? opt_options : {}; diff --git a/src/ol/layer/Vector.js b/src/ol/layer/Vector.js index 55933e088f..12da9663d9 100644 --- a/src/ol/layer/Vector.js +++ b/src/ol/layer/Vector.js @@ -77,16 +77,18 @@ const Property = { }; +/** + * @classdesc + * Vector data that is rendered client-side. + * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject} + * property on the layer object; for example, setting `title: 'My Title'` in the + * options means that `title` is observable, and has get/set accessors. + * + * @api + */ class VectorLayer extends Layer { /** - * @classdesc - * Vector data that is rendered client-side. - * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject} - * property on the layer object; for example, setting `title: 'My Title'` in the - * options means that `title` is observable, and has get/set accessors. - * * @param {module:ol/layer/Vector~Options=} opt_options Options. - * @api */ constructor(opt_options) { const options = opt_options ? diff --git a/src/ol/layer/VectorTile.js b/src/ol/layer/VectorTile.js index a9f5c7d199..3e63f51dab 100644 --- a/src/ol/layer/VectorTile.js +++ b/src/ol/layer/VectorTile.js @@ -86,16 +86,19 @@ export const RenderType = { */ +/** + * @classdesc + * Layer for vector tile data that is rendered client-side. + * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject} + * property on the layer object; for example, setting `title: 'My Title'` in the + * options means that `title` is observable, and has get/set accessors. + * + * @param {module:ol/layer/VectorTile~Options=} opt_options Options. + * @api + */ class VectorTileLayer extends VectorLayer { /** - * @classdesc - * Layer for vector tile data that is rendered client-side. - * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject} - * property on the layer object; for example, setting `title: 'My Title'` in the - * options means that `title` is observable, and has get/set accessors. - * * @param {module:ol/layer/VectorTile~Options=} opt_options Options. - * @api */ constructor(opt_options) { const options = opt_options ? opt_options : {}; diff --git a/src/ol/render/VectorContext.js b/src/ol/render/VectorContext.js index c189528ecb..768341c533 100644 --- a/src/ol/render/VectorContext.js +++ b/src/ol/render/VectorContext.js @@ -3,6 +3,7 @@ */ /** + * @classdesc * Context for drawing geometries. A vector context is available on render * events and does not need to be constructed directly. * @api diff --git a/src/ol/render/canvas/Immediate.js b/src/ol/render/canvas/Immediate.js index dd74c5943a..fc00a3eec0 100644 --- a/src/ol/render/canvas/Immediate.js +++ b/src/ol/render/canvas/Immediate.js @@ -16,16 +16,17 @@ import VectorContext from '../VectorContext.js'; import {defaultTextAlign, defaultFillStyle, defaultLineCap, defaultLineDash, defaultLineDashOffset, defaultLineJoin, defaultLineWidth, defaultMiterLimit, defaultStrokeStyle, defaultTextBaseline, defaultFont} from '../canvas.js'; import {create as createTransform, compose as composeTransform} from '../../transform.js'; +/** + * @classdesc + * A concrete subclass of {@link module:ol/render/VectorContext} that implements + * direct rendering of features and geometries to an HTML5 Canvas context. + * Instances of this class are created internally by the library and + * provided to application code as vectorContext member of the + * {@link module:ol/render/Event~RenderEvent} object associated with postcompose, precompose and + * render events emitted by layers and maps. + */ class CanvasImmediateRenderer extends VectorContext { /** - * @classdesc - * A concrete subclass of {@link module:ol/render/VectorContext} that implements - * direct rendering of features and geometries to an HTML5 Canvas context. - * Instances of this class are created internally by the library and - * provided to application code as vectorContext member of the - * {@link module:ol/render/Event~RenderEvent} object associated with postcompose, precompose and - * render events emitted by layers and maps. - * * @param {CanvasRenderingContext2D} context Context. * @param {number} pixelRatio Pixel ratio. * @param {module:ol/extent~Extent} extent Extent. diff --git a/src/ol/renderer/canvas/ImageLayer.js b/src/ol/renderer/canvas/ImageLayer.js index 5a240bb580..776a859222 100644 --- a/src/ol/renderer/canvas/ImageLayer.js +++ b/src/ol/renderer/canvas/ImageLayer.js @@ -13,11 +13,15 @@ import {layerRendererConstructors} from './Map.js'; import IntermediateCanvasRenderer from './IntermediateCanvas.js'; import {create as createTransform, compose as composeTransform} from '../../transform.js'; +/** + * @classdesc + * Canvas renderer for image layers. + * @api + */ class CanvasImageLayerRenderer extends IntermediateCanvasRenderer { /** * @param {module:ol/layer/Image|module:ol/layer/Vector} imageLayer Image or vector layer. - * @api */ constructor(imageLayer) { diff --git a/src/ol/renderer/canvas/Map.js b/src/ol/renderer/canvas/Map.js index a41ab50e73..3f30a9547c 100644 --- a/src/ol/renderer/canvas/Map.js +++ b/src/ol/renderer/canvas/Map.js @@ -19,12 +19,15 @@ import SourceState from '../../source/State.js'; */ export const layerRendererConstructors = []; - +/** + * @classdesc + * Canvas map renderer. + * @api + */ class CanvasMapRenderer extends MapRenderer { /** * @param {module:ol/PluggableMap} map Map. - * @api */ constructor(map) { super(map); diff --git a/src/ol/renderer/canvas/TileLayer.js b/src/ol/renderer/canvas/TileLayer.js index 7f406795d1..f0e6a7f46b 100644 --- a/src/ol/renderer/canvas/TileLayer.js +++ b/src/ol/renderer/canvas/TileLayer.js @@ -11,12 +11,16 @@ import {containsExtent, createEmpty, equals, getIntersection, isEmpty} from '../ import IntermediateCanvasRenderer from '../canvas/IntermediateCanvas.js'; import {create as createTransform, compose as composeTransform} from '../../transform.js'; +/** + * @classdesc + * Canvas renderer for tile layers. + * @api + */ class CanvasTileLayerRenderer extends IntermediateCanvasRenderer { /** * @param {module:ol/layer/Tile|module:ol/layer/VectorTile} tileLayer Tile layer. * @param {boolean=} opt_noContext Skip the context creation. - * @api */ constructor(tileLayer, opt_noContext) { diff --git a/src/ol/renderer/canvas/VectorLayer.js b/src/ol/renderer/canvas/VectorLayer.js index 198a90041d..2e983182cd 100644 --- a/src/ol/renderer/canvas/VectorLayer.js +++ b/src/ol/renderer/canvas/VectorLayer.js @@ -15,11 +15,15 @@ import CanvasReplayGroup from '../../render/canvas/ReplayGroup.js'; import CanvasLayerRenderer from '../canvas/Layer.js'; import {defaultOrder as defaultRenderOrder, getTolerance as getRenderTolerance, getSquaredTolerance as getSquaredRenderTolerance, renderFeature} from '../vector.js'; +/** + * @classdesc + * Canvas renderer for vector layers. + * @api + */ class CanvasVectorLayerRenderer extends CanvasLayerRenderer { /** * @param {module:ol/layer/Vector} vectorLayer Vector layer. - * @api */ constructor(vectorLayer) { diff --git a/src/ol/renderer/canvas/VectorTileLayer.js b/src/ol/renderer/canvas/VectorTileLayer.js index 03267f69fc..44918800d5 100644 --- a/src/ol/renderer/canvas/VectorTileLayer.js +++ b/src/ol/renderer/canvas/VectorTileLayer.js @@ -47,11 +47,15 @@ const VECTOR_REPLAYS = { }; +/** + * @classdesc + * Canvas renderer for vector tile layers. + * @api + */ class CanvasVectorTileLayerRenderer extends CanvasTileLayerRenderer { /** * @param {module:ol/layer/VectorTile} layer VectorTile layer. - * @api */ constructor(layer) { diff --git a/src/ol/renderer/webgl/ImageLayer.js b/src/ol/renderer/webgl/ImageLayer.js index e42501c469..7042d7d290 100644 --- a/src/ol/renderer/webgl/ImageLayer.js +++ b/src/ol/renderer/webgl/ImageLayer.js @@ -21,12 +21,16 @@ import { import {CLAMP_TO_EDGE} from '../../webgl.js'; import {createTexture} from '../../webgl/Context.js'; +/** + * @classdesc + * WebGL renderer for image layers. + * @api + */ class WebGLImageLayerRenderer extends WebGLLayerRenderer { /** * @param {module:ol/renderer/webgl/Map} mapRenderer Map renderer. * @param {module:ol/layer/Image} imageLayer Tile layer. - * @api */ constructor(mapRenderer, imageLayer) { diff --git a/src/ol/renderer/webgl/Map.js b/src/ol/renderer/webgl/Map.js index d951d3fa5e..c87e35895f 100644 --- a/src/ol/renderer/webgl/Map.js +++ b/src/ol/renderer/webgl/Map.js @@ -37,11 +37,15 @@ import ContextEventType from '../../webgl/ContextEventType.js'; const WEBGL_TEXTURE_CACHE_HIGH_WATER_MARK = 1024; +/** + * @classdesc + * WebGL map renderer. + * @api + */ class WebGLMapRenderer extends MapRenderer { /** * @param {module:ol/PluggableMap} map Map. - * @api */ constructor(map) { super(map); diff --git a/src/ol/renderer/webgl/TileLayer.js b/src/ol/renderer/webgl/TileLayer.js index 5fb00b1aae..9206ef9182 100644 --- a/src/ol/renderer/webgl/TileLayer.js +++ b/src/ol/renderer/webgl/TileLayer.js @@ -24,12 +24,16 @@ import { import {COLOR_BUFFER_BIT, BLEND, ARRAY_BUFFER, FLOAT, LINEAR, TRIANGLE_STRIP} from '../../webgl.js'; import WebGLBuffer from '../../webgl/Buffer.js'; +/** + * @classdesc + * WebGL renderer for tile layers. + * @api + */ class WebGLTileLayerRenderer extends WebGLLayerRenderer { /** * @param {module:ol/renderer/webgl/Map} mapRenderer Map renderer. * @param {module:ol/layer/Tile} tileLayer Tile layer. - * @api */ constructor(mapRenderer, tileLayer) { diff --git a/src/ol/renderer/webgl/VectorLayer.js b/src/ol/renderer/webgl/VectorLayer.js index 7efee54e5c..cbea27b014 100644 --- a/src/ol/renderer/webgl/VectorLayer.js +++ b/src/ol/renderer/webgl/VectorLayer.js @@ -10,12 +10,17 @@ import {defaultOrder as defaultRenderOrder, getTolerance as getRenderTolerance, import WebGLLayerRenderer from '../webgl/Layer.js'; import {apply as applyTransform} from '../../transform.js'; + +/** + * @classdesc + * WebGL renderer for vector layers. + * @api + */ class WebGLVectorLayerRenderer extends WebGLLayerRenderer { /** * @param {module:ol/renderer/webgl/Map} mapRenderer Map renderer. * @param {module:ol/layer/Vector} vectorLayer Vector layer. - * @api */ constructor(mapRenderer, vectorLayer) { diff --git a/src/ol/reproj/Image.js b/src/ol/reproj/Image.js index 0fd04bd71f..1533e7e292 100644 --- a/src/ol/reproj/Image.js +++ b/src/ol/reproj/Image.js @@ -17,12 +17,13 @@ import Triangulation from '../reproj/Triangulation.js'; */ +/** + * @classdesc + * Class encapsulating single reprojected image. + * See {@link module:ol/source/Image~ImageSource}. + */ class ReprojImage extends ImageBase { /** - * @classdesc - * Class encapsulating single reprojected image. - * See {@link module:ol/source/Image~ImageSource}. - * * @param {module:ol/proj/Projection} sourceProj Source projection (of the data). * @param {module:ol/proj/Projection} targetProj Target projection. * @param {module:ol/extent~Extent} targetExtent Target extent. diff --git a/src/ol/reproj/Tile.js b/src/ol/reproj/Tile.js index 2ef188b86e..53c7918a06 100644 --- a/src/ol/reproj/Tile.js +++ b/src/ol/reproj/Tile.js @@ -18,12 +18,14 @@ import Triangulation from '../reproj/Triangulation.js'; */ +/** + * @classdesc + * Class encapsulating single reprojected tile. + * See {@link module:ol/source/TileImage~TileImage}. + * + */ class ReprojTile extends Tile { /** - * @classdesc - * Class encapsulating single reprojected tile. - * See {@link module:ol/source/TileImage~TileImage}. - * * @param {module:ol/proj/Projection} sourceProj Source projection. * @param {module:ol/tilegrid/TileGrid} sourceTileGrid Source tile grid. * @param {module:ol/proj/Projection} targetProj Target projection. diff --git a/src/ol/source/BingMaps.js b/src/ol/source/BingMaps.js index f3dc8835e1..5fe37a7b58 100644 --- a/src/ol/source/BingMaps.js +++ b/src/ol/source/BingMaps.js @@ -44,13 +44,15 @@ const TOS_ATTRIBUTION = '