diff --git a/src/ol/format/GeoJSON.js b/src/ol/format/GeoJSON.js index 6648f859cf..00d3fec7f8 100644 --- a/src/ol/format/GeoJSON.js +++ b/src/ol/format/GeoJSON.js @@ -22,16 +22,14 @@ import {get as getProjection} from '../proj.js'; /** * @typedef {Object} Options - * @property {module:ol/proj~ProjectionLike} defaultDataProjection Default data projection. - * Default is `EPSG:4326`. - * @property {module:ol/proj~ProjectionLike} featureProjection Projection for features read or + * @property {module:ol/proj~ProjectionLike} [defaultDataProjection='EPSG:4326'] Default data projection. + * @property {module:ol/proj~ProjectionLike} [featureProjection] Projection for features read or * written by the format. Options passed to read or write methods will take precedence. - * @property {string|undefined} geometryName Geometry name to use when creating features. - * @property {boolean|undefined} extractGeometryName Certain GeoJSON providers include + * @property {string} [geometryName] Geometry name to use when creating features. + * @property {boolean} [extractGeometryName=false] Certain GeoJSON providers include * the geometry_name field in the feature GeoJSON. If set to `true` the GeoJSON reader * will look for that field to set the geometry name. If both this field is set to `true` * and a `geometryName` is provided, the `geometryName` will take precedence. - * Default is `false`. */ diff --git a/src/ol/format/KML.js b/src/ol/format/KML.js index 1c0ec01e18..14f8e8fd98 100644 --- a/src/ol/format/KML.js +++ b/src/ol/format/KML.js @@ -230,13 +230,11 @@ function createStyleDefaults() { /** * @typedef {Object} Options - * @property {boolean|undefined} extractStyles Extract styles from the KML. - * Default is `true`. - * @property {boolean|undefined} showPointNames Show names as labels for placemarks - * which contain points. Default is `true`. - * @property {Array.|undefined} defaultStyle Default style. The + * @property {boolean} [extractStyles=true] Extract styles from the KML. + * @property {boolean} [showPointNames=true] Show names as labels for placemarks which contain points. + * @property {Array.} [defaultStyle] Default style. The * default default style is the same as Google Earth. - * @property {boolean|undefined} writeStyles Write styles into KML. Default is `true`. + * @property {boolean} [writeStyles=true] Write styles into KML. */ diff --git a/src/ol/format/Polyline.js b/src/ol/format/Polyline.js index c683a59018..7683bad751 100644 --- a/src/ol/format/Polyline.js +++ b/src/ol/format/Polyline.js @@ -16,10 +16,9 @@ import {get as getProjection} from '../proj.js'; /** * @typedef {Object} Options - * @property {number|undefined} factor The factor by which the coordinates - * values will be scaled. Default is `1e5`. - * @property {module:ol/geom/GeometryLayout~GeometryLayout|undefined} geometryLayout Layout of the - * feature geometries created by the format reader. Default is `module:ol/geom/GeometryLayout~GeometryLayout.XY`. + * @property {number} [factor=1e5] The factor by which the coordinates values will be scaled. + * @property {module:ol/geom/GeometryLayout~GeometryLayout} [geometryLayout='XY'] Layout of the + * feature geometries created by the format reader. */ diff --git a/src/ol/format/TopoJSON.js b/src/ol/format/TopoJSON.js index 5e7cd49c77..2ae25edeb4 100644 --- a/src/ol/format/TopoJSON.js +++ b/src/ol/format/TopoJSON.js @@ -16,9 +16,8 @@ import {get as getProjection} from '../proj.js'; /** * @typedef {Object} Options - * @property {module:ol/proj~ProjectionLike} defaultDataProjection Default data projection. - * Default is `EPSG:4326`. - * @property {string|undefined} layerName Set the name of the TopoJSON topology + * @property {module:ol/proj~ProjectionLike} [defaultDataProjection='EPSG:4326'] Default data projection. + * @property {string} [layerName] Set the name of the TopoJSON topology * `objects`'s children as feature property with the specified name. This means * that when set to `'layer'`, a topology like * ``` @@ -34,7 +33,7 @@ import {get as getProjection} from '../proj.js'; * ``` * will result in features that have a property `'layer'` set to `'example'`. * When not set, no property will be added to features. - * @property {Array.|undefined} layers Names of the TopoJSON topology's + * @property {Array.} [layers] Names of the TopoJSON topology's * `objects`'s children to read features from. If not provided, features will * be read from all children. */ diff --git a/src/ol/interaction/DoubleClickZoom.js b/src/ol/interaction/DoubleClickZoom.js index 9058896ebf..f593070778 100644 --- a/src/ol/interaction/DoubleClickZoom.js +++ b/src/ol/interaction/DoubleClickZoom.js @@ -8,8 +8,8 @@ import Interaction, {zoomByDelta} from '../interaction/Interaction.js'; /** * @typedef {Object} Options - * @property {number} [duration] Animation duration in milliseconds. Default is `250`. - * @property {number} [delta] The zoom delta applied on each double click, default is `1`. + * @property {number} [duration=250] Animation duration in milliseconds. + * @property {number} [delta=1] The zoom delta applied on each double click. */ diff --git a/src/ol/interaction/DragAndDrop.js b/src/ol/interaction/DragAndDrop.js index 8ecde2bbf0..3d7dfcc535 100644 --- a/src/ol/interaction/DragAndDrop.js +++ b/src/ol/interaction/DragAndDrop.js @@ -14,14 +14,14 @@ import {get as getProjection} from '../proj.js'; /** * @typedef {Object} Options - * @property {Array.|undefined} formatConstructors Format constructors. - * @property {ol.source.Vector|undefined} source Optional vector source where features will be added. If a source is provided + * @property {Array.} [formatConstructors] Format constructors. + * @property {ol.source.Vector} [source] Optional vector source where features will be added. If a source is provided * all existing features will be removed and new features will be added when * they are dropped on the target. If you want to add features to a vector * source without removing the existing features (append only), instead of * providing the source option listen for the "addfeatures" event. - * @property {module:ol/proj~ProjectionLike} projection Target projection. By default, the map's view's projection is used. - * @property {Element|undefined} target The element that is used as the drop target, default is the viewport element. + * @property {module:ol/proj~ProjectionLike} [projection] Target projection. By default, the map's view's projection is used. + * @property {Element} [target] The element that is used as the drop target, default is the viewport element. */ diff --git a/src/ol/interaction/DragBox.js b/src/ol/interaction/DragBox.js index e1588ceb37..79219b8218 100644 --- a/src/ol/interaction/DragBox.js +++ b/src/ol/interaction/DragBox.js @@ -20,13 +20,13 @@ import RenderBox from '../render/Box.js'; /** * @typedef {Object} Options - * @property {string|undefined} className CSS class name for styling the box. The default is `ol-dragbox`. - * @property {module:ol/events/condition~Condition|undefined} condition A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean + * @property {string} [className='ol-dragbox'] CSS class name for styling the box. + * @property {module:ol/events/condition~Condition} [condition] A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean * to indicate whether that event should be handled. * Default is {@link ol/events/condition~always}. - * @property {number|undefined} minArea The minimum area of the box in pixel, this value is used by the default - * `boxEndCondition` function. Default is `64`. - * @property {module:ol/interaction/DragBox~EndCondition|undefined} boxEndCondition A function that takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and two + * @property {number} [minArea=64] The minimum area of the box in pixel, this value is used by the default + * `boxEndCondition` function. + * @property {module:ol/interaction/DragBox~EndCondition} [boxEndCondition] A function that takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and two * {@link module:ol~Pixel}s to indicate whether a `boxend` event should be fired. * Default is `true` if the area of the box is bigger than the `minArea` option. */ diff --git a/src/ol/interaction/PinchRotate.js b/src/ol/interaction/PinchRotate.js index b016c664d1..b63f8ea744 100644 --- a/src/ol/interaction/PinchRotate.js +++ b/src/ol/interaction/PinchRotate.js @@ -14,7 +14,7 @@ import {disable} from '../rotationconstraint.js'; * @property {number} [duration=250] The duration of the animation in * milliseconds. * @property {number} [threshold=0.3] Minimal angle in radians to start a rotation. - */ + */ /** diff --git a/src/ol/interaction/Pointer.js b/src/ol/interaction/Pointer.js index 81249781bb..d7a5bd9aa7 100644 --- a/src/ol/interaction/Pointer.js +++ b/src/ol/interaction/Pointer.js @@ -57,7 +57,7 @@ const handleMoveEvent = UNDEFINED; * also during a drag sequence (so during a drag sequence both the * `handleDragEvent` function and this function are called). * @property {(function(module:ol/MapBrowserPointerEvent~MapBrowserPointerEvent):boolean)} [handleUpEvent] - Function handling "up" events. If the function returns `false` then the + * Function handling "up" events. If the function returns `false` then the * current drag sequence is stopped. */ diff --git a/src/ol/interaction/Snap.js b/src/ol/interaction/Snap.js index 6d3c1de186..79dfa4d48c 100644 --- a/src/ol/interaction/Snap.js +++ b/src/ol/interaction/Snap.js @@ -35,12 +35,12 @@ import RBush from '../structs/RBush.js'; /** * @typedef {Object} Options - * @property {module:ol/Collection~Collection.|undefined} features Snap to these features. Either this option or source should be provided. - * @property {boolean|undefined} edge Snap to edges. Default is `true`. - * @property {boolean|undefined} vertex Snap to vertices. Default is `true`. - * @property {number|undefined} pixelTolerance Pixel tolerance for considering the pointer close enough to a segment or - * vertex for snapping. Default is `10` pixels. - * @property {module:ol/source/Vector~Vector|undefined} source Snap to features from this source. Either this option or features should be provided + * @property {module:ol/Collection~Collection.} [features] Snap to these features. Either this option or source should be provided. + * @property {boolean} [edge=true] Snap to edges. + * @property {boolean} [vertex=true] Snap to vertices. + * @property {number} [pixelTolerance=10] Pixel tolerance for considering the pointer close enough to a segment or + * vertex for snapping. + * @property {module:ol/source/Vector~Vector} [source] Snap to features from this source. Either this option or features should be provided */ diff --git a/src/ol/interaction/Translate.js b/src/ol/interaction/Translate.js index 8064f47802..9035c35a52 100644 --- a/src/ol/interaction/Translate.js +++ b/src/ol/interaction/Translate.js @@ -39,16 +39,16 @@ const TranslateEventType = { /** * @typedef {Object} interaction_TranslateOptions - * @property {module:ol/Collection~Collection.|undefined} features Only features contained in this collection will be able to be translated. If + * @property {module:ol/Collection~Collection.} [features] Only features contained in this collection will be able to be translated. If * not specified, all features on the map will be able to be translated. - * @property {undefined|Array.|function(module:ol/layer/Layer~Layer): boolean} layers A list of layers from which features should be + * @property {Array.|function(module:ol/layer/Layer~Layer): boolean} [layers] A list of layers from which features should be * translated. Alternatively, a filter function can be provided. The * function will be called for each layer in the map and should return * `true` for layers that you want to be translatable. If the option is * absent, all visible layers will be considered translatable. - * @property {number|undefined} hitTolerance Hit-detection tolerance. Pixels inside the radius around the given position + * @property {number} [hitTolerance=0] Hit-detection tolerance. Pixels inside the radius around the given position * will be checked for features. This only works for the canvas renderer and - * not for WebGL. Default is `0`. + * not for WebGL. */