Merge pull request #8125 from ahocevar/default-export-path

Shorter module paths for default exports
This commit is contained in:
Andreas Hocevar
2018-04-26 14:23:02 +02:00
committed by GitHub
233 changed files with 2136 additions and 2042 deletions

View File

@@ -23,7 +23,7 @@ const Property = {
* type.
*
* @constructor
* @extends {module:ol/events/Event~Event}
* @extends {module:ol/events/Event}
* @implements {oli.CollectionEvent}
* @param {module:ol/CollectionEventType} type Type.
* @param {*=} opt_element Element.
@@ -59,7 +59,7 @@ inherits(CollectionEvent, Event);
* Collection as a whole.
*
* @constructor
* @extends {module:ol/Object~BaseObject}
* @extends {module:ol/Object}
* @fires module:ol/Collection~CollectionEvent
* @param {Array.<T>=} opt_array Array.
* @param {module:ol/Collection~Options=} opt_options Collection options.
@@ -112,7 +112,7 @@ Collection.prototype.clear = function() {
* Add elements to the collection. This pushes each item in the provided array
* to the end of the collection.
* @param {!Array.<T>} arr Array.
* @return {module:ol/Collection~Collection.<T>} This collection.
* @return {module:ol/Collection.<T>} This collection.
* @api
*/
Collection.prototype.extend = function(arr) {

View File

@@ -18,7 +18,7 @@ import Style from './style/Style.js';
* Features can be styled individually with `setStyle`; otherwise they use the
* style of their vector layer.
*
* Note that attribute properties are set as {@link module:ol/Object~BaseObject} properties on
* Note that attribute properties are set as {@link module:ol/Object} properties on
* the feature object, so they are observable, and have get/set accessors.
*
* Typically, a feature has a single geometry property. You can set the
@@ -52,8 +52,8 @@ import Style from './style/Style.js';
* ```
*
* @constructor
* @extends {module:ol/Object~BaseObject}
* @param {module:ol/geom/Geometry~Geometry|Object.<string, *>=} opt_geometryOrProperties
* @extends {module:ol/Object}
* @param {module:ol/geom/Geometry|Object.<string, *>=} opt_geometryOrProperties
* You may pass a Geometry object directly, or an object literal containing
* properties. If you pass an object literal, you may include a Geometry
* associated with a `geometry` key.
@@ -78,7 +78,7 @@ const Feature = function(opt_geometryOrProperties) {
/**
* User provided style.
* @private
* @type {module:ol/style/Style~Style|Array.<module:ol/style/Style~Style>|module:ol/style~StyleFunction}
* @type {module:ol/style/Style|Array.<module:ol/style/Style>|module:ol/style~StyleFunction}
*/
this.style_ = null;
@@ -117,7 +117,7 @@ inherits(Feature, BaseObject);
/**
* Clone this feature. If the original feature has a geometry it
* is also cloned. The feature id is not set in the clone.
* @return {module:ol/Feature~Feature} The clone.
* @return {module:ol/Feature} The clone.
* @api
*/
Feature.prototype.clone = function() {
@@ -139,13 +139,14 @@ Feature.prototype.clone = function() {
* Get the feature's default geometry. A feature may have any number of named
* geometries. The "default" geometry (the one that is rendered by default) is
* set when calling {@link module:ol/Feature~Feature#setGeometry}.
* @return {module:ol/geom/Geometry~Geometry|undefined} The default geometry for the feature.
* @return {module:ol/geom/Geometry|undefined} The default geometry for the feature.
* @api
* @observable
*/
Feature.prototype.getGeometry = function() {
return /** @type {module:ol/geom/Geometry~Geometry|undefined} */ (
this.get(this.geometryName_));
return (
/** @type {module:ol/geom/Geometry|undefined} */ (this.get(this.geometryName_))
);
};
@@ -176,7 +177,7 @@ Feature.prototype.getGeometryName = function() {
/**
* Get the feature's style. Will return what was provided to the
* {@link module:ol/Feature~Feature#setStyle} method.
* @return {module:ol/style/Style~Style|Array.<module:ol/style/Style~Style>|module:ol/style~StyleFunction} The feature style.
* @return {module:ol/style/Style|Array.<module:ol/style/Style>|module:ol/style~StyleFunction} The feature style.
* @api
*/
Feature.prototype.getStyle = function() {
@@ -223,7 +224,7 @@ Feature.prototype.handleGeometryChanged_ = function() {
/**
* Set the default geometry for the feature. This will update the property
* with the name returned by {@link module:ol/Feature~Feature#getGeometryName}.
* @param {module:ol/geom/Geometry~Geometry|undefined} geometry The new geometry.
* @param {module:ol/geom/Geometry|undefined} geometry The new geometry.
* @api
* @observable
*/
@@ -236,7 +237,7 @@ Feature.prototype.setGeometry = function(geometry) {
* Set the style for the feature. This can be a single style object, an array
* of styles, or a function that takes a resolution and returns an array of
* styles. If it is `null` the feature has no style (a `null` style).
* @param {module:ol/style/Style~Style|Array.<module:ol/style/Style~Style>|module:ol/style~StyleFunction} style Style for this feature.
* @param {module:ol/style/Style|Array.<module:ol/style/Style>|module:ol/style~StyleFunction} style Style for this feature.
* @api
* @fires module:ol/events/Event~Event#event:change
*/
@@ -283,9 +284,9 @@ Feature.prototype.setGeometryName = function(name) {
/**
* Convert the provided object into a feature style function. Functions passed
* through unchanged. Arrays of module:ol/style/Style~Style or single style objects wrapped
* through unchanged. Arrays of module:ol/style/Style or single style objects wrapped
* in a new feature style function.
* @param {module:ol/style~StyleFunction|!Array.<module:ol/style/Style~Style>|!module:ol/style/Style~Style} obj
* @param {module:ol/style~StyleFunction|!Array.<module:ol/style/Style>|!module:ol/style/Style} obj
* A feature style function, a single style, or an array of styles.
* @return {module:ol/style~StyleFunction} A style function.
*/
@@ -294,7 +295,7 @@ export function createStyleFunction(obj) {
return obj;
} else {
/**
* @type {Array.<module:ol/style/Style~Style>}
* @type {Array.<module:ol/style/Style>}
*/
let styles;
if (Array.isArray(obj)) {

View File

@@ -45,7 +45,7 @@ import {get as getProjection, getTransformFromProjections, identityTransform} fr
*
* @fires error
* @constructor
* @extends {module:ol/Object~BaseObject}
* @extends {module:ol/Object}
* @param {module:ol/Geolocation~Options=} opt_options Options.
* @api
*/
@@ -199,12 +199,14 @@ Geolocation.prototype.getAccuracy = function() {
/**
* Get a geometry of the position accuracy.
* @return {?module:ol/geom/Polygon~Polygon} A geometry of the position accuracy.
* @return {?module:ol/geom/Polygon} A geometry of the position accuracy.
* @observable
* @api
*/
Geolocation.prototype.getAccuracyGeometry = function() {
return /** @type {?module:ol/geom/Polygon~Polygon} */ (this.get(GeolocationProperty.ACCURACY_GEOMETRY) || null);
return (
/** @type {?module:ol/geom/Polygon} */ (this.get(GeolocationProperty.ACCURACY_GEOMETRY) || null)
);
};
@@ -253,19 +255,23 @@ Geolocation.prototype.getHeading = function() {
* @api
*/
Geolocation.prototype.getPosition = function() {
return /** @type {module:ol/coordinate~Coordinate|undefined} */ (this.get(GeolocationProperty.POSITION));
return (
/** @type {module:ol/coordinate~Coordinate|undefined} */ (this.get(GeolocationProperty.POSITION))
);
};
/**
* Get the projection associated with the position.
* @return {module:ol/proj/Projection~Projection|undefined} The projection the position is
* @return {module:ol/proj/Projection|undefined} The projection the position is
* reported in.
* @observable
* @api
*/
Geolocation.prototype.getProjection = function() {
return /** @type {module:ol/proj/Projection~Projection|undefined} */ (this.get(GeolocationProperty.PROJECTION));
return (
/** @type {module:ol/proj/Projection|undefined} */ (this.get(GeolocationProperty.PROJECTION))
);
};

View File

@@ -17,7 +17,7 @@ import Text from './style/Text.js';
/**
* @type {module:ol/style/Stroke~Stroke}
* @type {module:ol/style/Stroke}
* @private
* @const
*/
@@ -36,13 +36,13 @@ const INTERVALS = [
/**
* @typedef {Object} GraticuleLabelDataType
* @property {module:ol/geom/Point~Point} geom
* @property {module:ol/geom/Point} geom
* @property {string} text
*/
/**
* @typedef {Object} Options
* @property {module:ol/PluggableMap~PluggableMap} [map] Reference to an
* @property {module:ol/PluggableMap} [map] Reference to an
* {@link module:ol/Map~Map} object.
* @property {number} [maxLines=100] The maximum number of meridians and
* parallels from the center of the map. The default value of 100 means that at
@@ -50,7 +50,7 @@ const INTERVALS = [
* appropriate for conformal projections like Spherical Mercator. If you
* increase the value, more lines will be drawn and the drawing performance will
* decrease.
* @property {module:ol/style/Stroke~Stroke} [strokeStyle='rgba(0,0,0,0.2)'] The
* @property {module:ol/style/Stroke} [strokeStyle='rgba(0,0,0,0.2)'] The
* stroke style to use for drawing the graticule. If not provided, a not fully
* opaque black will be used.
* @property {number} [targetSize=100] The target size of the graticule cells,
@@ -67,7 +67,7 @@ const INTERVALS = [
* @property {number} [latLabelPosition=1] Latitude label position in fractions
* (0..1) of view extent. 0 means at the left of the viewport, 1 means at the
* right.
* @property {module:ol/style/Text~Text} [lonLabelStyle] Longitude label text
* @property {module:ol/style/Text} [lonLabelStyle] Longitude label text
* style. If not provided, the following style will be used:
* ```js
* new Text({
@@ -85,7 +85,7 @@ const INTERVALS = [
* Note that the default's `textBaseline` configuration will not work well for
* `lonLabelPosition` configurations that position labels close to the top of
* the viewport.
* @param {module:ol/style/Text~Text} [latLabelStyle] Latitude label text style.
* @param {module:ol/style/Text} [latLabelStyle] Latitude label text style.
* If not provided, the following style will be used:
* ```js
* new Text({
@@ -116,7 +116,7 @@ const Graticule = function(opt_options) {
const options = opt_options || {};
/**
* @type {module:ol/PluggableMap~PluggableMap}
* @type {module:ol/PluggableMap}
* @private
*/
this.map_ = null;
@@ -128,7 +128,7 @@ const Graticule = function(opt_options) {
this.postcomposeListenerKey_ = null;
/**
* @type {module:ol/proj/Projection~Projection}
* @type {module:ol/proj/Projection}
*/
this.projection_ = null;
@@ -193,19 +193,19 @@ const Graticule = function(opt_options) {
this.maxLines_ = options.maxLines !== undefined ? options.maxLines : 100;
/**
* @type {Array.<module:ol/geom/LineString~LineString>}
* @type {Array.<module:ol/geom/LineString>}
* @private
*/
this.meridians_ = [];
/**
* @type {Array.<module:ol/geom/LineString~LineString>}
* @type {Array.<module:ol/geom/LineString>}
* @private
*/
this.parallels_ = [];
/**
* @type {module:ol/style/Stroke~Stroke}
* @type {module:ol/style/Stroke}
* @private
*/
this.strokeStyle_ = options.strokeStyle !== undefined ? options.strokeStyle : DEFAULT_STROKE_STYLE;
@@ -276,7 +276,7 @@ const Graticule = function(opt_options) {
options.latLabelPosition;
/**
* @type {module:ol/style/Text~Text}
* @type {module:ol/style/Text}
* @private
*/
this.lonLabelStyle_ = options.lonLabelStyle !== undefined ? options.lonLabelStyle :
@@ -293,7 +293,7 @@ const Graticule = function(opt_options) {
});
/**
* @type {module:ol/style/Text~Text}
* @type {module:ol/style/Text}
* @private
*/
this.latLabelStyle_ = options.latLabelStyle !== undefined ? options.latLabelStyle :
@@ -343,10 +343,10 @@ Graticule.prototype.addMeridian_ = function(lon, minLat, maxLat, squaredToleranc
};
/**
* @param {module:ol/geom/LineString~LineString} lineString Meridian
* @param {module:ol/geom/LineString} lineString Meridian
* @param {module:ol/extent~Extent} extent Extent.
* @param {number} index Index.
* @return {module:ol/geom/Point~Point} Meridian point.
* @return {module:ol/geom/Point} Meridian point.
* @private
*/
Graticule.prototype.getMeridianPoint_ = function(lineString, extent, index) {
@@ -391,10 +391,10 @@ Graticule.prototype.addParallel_ = function(lat, minLon, maxLon, squaredToleranc
/**
* @param {module:ol/geom/LineString~LineString} lineString Parallels.
* @param {module:ol/geom/LineString} lineString Parallels.
* @param {module:ol/extent~Extent} extent Extent.
* @param {number} index Index.
* @return {module:ol/geom/Point~Point} Parallel point.
* @return {module:ol/geom/Point} Parallel point.
* @private
*/
Graticule.prototype.getParallelPoint_ = function(lineString, extent, index) {
@@ -542,7 +542,7 @@ Graticule.prototype.getInterval_ = function(resolution) {
/**
* Get the map associated with this graticule.
* @return {module:ol/PluggableMap~PluggableMap} The map.
* @return {module:ol/PluggableMap} The map.
* @api
*/
Graticule.prototype.getMap = function() {
@@ -555,7 +555,7 @@ Graticule.prototype.getMap = function() {
* @param {number} minLat Minimal latitude.
* @param {number} maxLat Maximal latitude.
* @param {number} squaredTolerance Squared tolerance.
* @return {module:ol/geom/LineString~LineString} The meridian line string.
* @return {module:ol/geom/LineString} The meridian line string.
* @param {number} index Index.
* @private
*/
@@ -569,7 +569,7 @@ Graticule.prototype.getMeridian_ = function(lon, minLat, maxLat, squaredToleranc
/**
* Get the list of meridians. Meridians are lines of equal longitude.
* @return {Array.<module:ol/geom/LineString~LineString>} The meridians.
* @return {Array.<module:ol/geom/LineString>} The meridians.
* @api
*/
Graticule.prototype.getMeridians = function() {
@@ -582,7 +582,7 @@ Graticule.prototype.getMeridians = function() {
* @param {number} minLon Minimal longitude.
* @param {number} maxLon Maximal longitude.
* @param {number} squaredTolerance Squared tolerance.
* @return {module:ol/geom/LineString~LineString} The parallel line string.
* @return {module:ol/geom/LineString} The parallel line string.
* @param {number} index Index.
* @private
*/
@@ -596,7 +596,7 @@ Graticule.prototype.getParallel_ = function(lat, minLon, maxLon, squaredToleranc
/**
* Get the list of parallels. Parallels are lines of equal latitude.
* @return {Array.<module:ol/geom/LineString~LineString>} The parallels.
* @return {Array.<module:ol/geom/LineString>} The parallels.
* @api
*/
Graticule.prototype.getParallels = function() {
@@ -605,7 +605,7 @@ Graticule.prototype.getParallels = function() {
/**
* @param {module:ol/render/Event~RenderEvent} e Event.
* @param {module:ol/render/Event} e Event.
* @private
*/
Graticule.prototype.handlePostCompose_ = function(e) {
@@ -661,7 +661,7 @@ Graticule.prototype.handlePostCompose_ = function(e) {
/**
* @param {module:ol/proj/Projection~Projection} projection Projection.
* @param {module:ol/proj/Projection} projection Projection.
* @private
*/
Graticule.prototype.updateProjectionInfo_ = function(projection) {
@@ -705,7 +705,7 @@ Graticule.prototype.updateProjectionInfo_ = function(projection) {
/**
* Set the map for this graticule. The graticule will be rendered on the
* provided map.
* @param {module:ol/PluggableMap~PluggableMap} map Map.
* @param {module:ol/PluggableMap} map Map.
* @api
*/
Graticule.prototype.setMap = function(map) {

View File

@@ -30,7 +30,7 @@ import {getHeight} from './extent.js';
/**
* @constructor
* @extends {module:ol/ImageBase~ImageBase}
* @extends {module:ol/ImageBase}
* @param {module:ol/extent~Extent} extent Extent.
* @param {number|undefined} resolution Resolution.
* @param {number} pixelRatio Pixel ratio.

View File

@@ -8,7 +8,7 @@ import EventType from './events/EventType.js';
/**
* @constructor
* @abstract
* @extends {module:ol/events/EventTarget~EventTarget}
* @extends {module:ol/events/EventTarget}
* @param {module:ol/extent~Extent} extent Extent.
* @param {number|undefined} resolution Resolution.
* @param {number} pixelRatio Pixel ratio.

View File

@@ -18,7 +18,7 @@ import ImageState from './ImageState.js';
/**
* @constructor
* @extends {module:ol/ImageBase~ImageBase}
* @extends {module:ol/ImageBase}
* @param {module:ol/extent~Extent} extent Extent.
* @param {number} resolution Resolution.
* @param {number} pixelRatio Pixel ratio.

View File

@@ -9,14 +9,14 @@ import {listenOnce, unlistenByKey} from './events.js';
import EventType from './events/EventType.js';
/**
* @typedef {function(new: module:ol/ImageTile~ImageTile, module:ol/tilecoord~TileCoord,
* @typedef {function(new: module:ol/ImageTile, module:ol/tilecoord~TileCoord,
* module:ol/TileState, string, ?string, module:ol/Tile~LoadFunction)} TileClass
* @api
*/
/**
* @constructor
* @extends {module:ol/Tile~Tile}
* @extends {module:ol/Tile}
* @param {module:ol/tilecoord~TileCoord} tileCoord Tile coordinate.
* @param {module:ol/TileState} state State.
* @param {string} src Image source URI.

View File

@@ -58,7 +58,7 @@ import CanvasVectorTileLayerRenderer from './renderer/canvas/VectorTileLayer.js'
* groups, and so on.
*
* @constructor
* @extends {module:ol/PluggableMap~PluggableMap}
* @extends {module:ol/PluggableMap}
* @param {module:ol/PluggableMap~MapOptions} options Map options.
* @fires module:ol/MapBrowserEvent~MapBrowserEvent
* @fires module:ol/MapEvent~MapEvent

View File

@@ -10,10 +10,10 @@ import MapEvent from './MapEvent.js';
* See {@link module:ol/Map~Map} for which events trigger a map browser event.
*
* @constructor
* @extends {module:ol/MapEvent~MapEvent}
* @extends {module:ol/MapEvent}
* @implements {oli.MapBrowserEvent}
* @param {string} type Event type.
* @param {module:ol/PluggableMap~PluggableMap} map Map.
* @param {module:ol/PluggableMap} map Map.
* @param {Event} browserEvent Browser event.
* @param {boolean=} opt_dragging Is the map currently being dragged?
* @param {?module:ol/PluggableMap~FrameState=} opt_frameState Frame state.

View File

@@ -11,12 +11,12 @@ import PointerEventType from './pointer/EventType.js';
import PointerEventHandler from './pointer/PointerEventHandler.js';
/**
* @param {module:ol/PluggableMap~PluggableMap} map The map with the viewport to
* @param {module:ol/PluggableMap} 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.
* @constructor
* @extends {module:ol/events/EventTarget~EventTarget}
* @extends {module:ol/events/EventTarget}
*/
const MapBrowserEventHandler = function(map, moveTolerance) {
@@ -24,7 +24,7 @@ const MapBrowserEventHandler = function(map, moveTolerance) {
/**
* This is the element that we will listen to the real events on.
* @type {module:ol/PluggableMap~PluggableMap}
* @type {module:ol/PluggableMap}
* @private
*/
this.map_ = map;
@@ -57,7 +57,7 @@ const MapBrowserEventHandler = function(map, moveTolerance) {
/**
* The most recent "down" type event (or null if none have occurred).
* Set on pointerdown.
* @type {module:ol/pointer/PointerEvent~PointerEvent}
* @type {module:ol/pointer/PointerEvent}
* @private
*/
this.down_ = null;
@@ -80,7 +80,7 @@ const MapBrowserEventHandler = function(map, moveTolerance) {
* Event handler which generates pointer events for
* the viewport element.
*
* @type {module:ol/pointer/PointerEventHandler~PointerEventHandler}
* @type {module:ol/pointer/PointerEventHandler}
* @private
*/
this.pointerEventHandler_ = new PointerEventHandler(element);
@@ -89,7 +89,7 @@ const MapBrowserEventHandler = function(map, moveTolerance) {
* Event handler which generates pointer events for
* the document (used when dragging).
*
* @type {module:ol/pointer/PointerEventHandler~PointerEventHandler}
* @type {module:ol/pointer/PointerEventHandler}
* @private
*/
this.documentPointerEventHandler_ = null;
@@ -116,7 +116,7 @@ inherits(MapBrowserEventHandler, EventTarget);
/**
* @param {module:ol/pointer/PointerEvent~PointerEvent} pointerEvent Pointer
* @param {module:ol/pointer/PointerEvent} pointerEvent Pointer
* event.
* @private
*/
@@ -146,7 +146,7 @@ MapBrowserEventHandler.prototype.emulateClick_ = function(pointerEvent) {
/**
* Keeps track on how many pointers are currently active.
*
* @param {module:ol/pointer/PointerEvent~PointerEvent} pointerEvent Pointer
* @param {module:ol/pointer/PointerEvent} pointerEvent Pointer
* event.
* @private
*/
@@ -164,7 +164,7 @@ MapBrowserEventHandler.prototype.updateActivePointers_ = function(pointerEvent)
/**
* @param {module:ol/pointer/PointerEvent~PointerEvent} pointerEvent Pointer
* @param {module:ol/pointer/PointerEvent} pointerEvent Pointer
* event.
* @private
*/
@@ -196,7 +196,7 @@ MapBrowserEventHandler.prototype.handlePointerUp_ = function(pointerEvent) {
/**
* @param {module:ol/pointer/PointerEvent~PointerEvent} pointerEvent Pointer
* @param {module:ol/pointer/PointerEvent} pointerEvent Pointer
* event.
* @return {boolean} If the left mouse button was pressed.
* @private
@@ -207,7 +207,7 @@ MapBrowserEventHandler.prototype.isMouseActionButton_ = function(pointerEvent) {
/**
* @param {module:ol/pointer/PointerEvent~PointerEvent} pointerEvent Pointer
* @param {module:ol/pointer/PointerEvent} pointerEvent Pointer
* event.
* @private
*/
@@ -256,7 +256,7 @@ MapBrowserEventHandler.prototype.handlePointerDown_ = function(pointerEvent) {
/**
* @param {module:ol/pointer/PointerEvent~PointerEvent} pointerEvent Pointer
* @param {module:ol/pointer/PointerEvent} pointerEvent Pointer
* event.
* @private
*/
@@ -283,7 +283,7 @@ MapBrowserEventHandler.prototype.handlePointerMove_ = function(pointerEvent) {
/**
* Wrap and relay a pointer event. Note that this requires that the type
* string for the MapBrowserPointerEvent matches the PointerEvent type.
* @param {module:ol/pointer/PointerEvent~PointerEvent} pointerEvent Pointer
* @param {module:ol/pointer/PointerEvent} pointerEvent Pointer
* event.
* @private
*/
@@ -295,7 +295,7 @@ MapBrowserEventHandler.prototype.relayEvent_ = function(pointerEvent) {
/**
* @param {module:ol/pointer/PointerEvent~PointerEvent} pointerEvent Pointer
* @param {module:ol/pointer/PointerEvent} pointerEvent Pointer
* event.
* @return {boolean} Is moving.
* @private

View File

@@ -6,10 +6,10 @@ import MapBrowserEvent from './MapBrowserEvent.js';
/**
* @constructor
* @extends {module:ol/MapBrowserEvent~MapBrowserEvent}
* @extends {module:ol/MapBrowserEvent}
* @param {string} type Event type.
* @param {module:ol/PluggableMap~PluggableMap} map Map.
* @param {module:ol/pointer/PointerEvent~PointerEvent} pointerEvent Pointer
* @param {module:ol/PluggableMap} map Map.
* @param {module:ol/pointer/PointerEvent} pointerEvent Pointer
* event.
* @param {boolean=} opt_dragging Is the map currently being dragged?
* @param {?module:ol/PluggableMap~FrameState=} opt_frameState Frame state.
@@ -22,7 +22,7 @@ const MapBrowserPointerEvent = function(type, map, pointerEvent, opt_dragging,
/**
* @const
* @type {module:ol/pointer/PointerEvent~PointerEvent}
* @type {module:ol/pointer/PointerEvent}
*/
this.pointerEvent = pointerEvent;

View File

@@ -10,10 +10,10 @@ import Event from './events/Event.js';
* See {@link module:ol/Map~Map} for which events trigger a map event.
*
* @constructor
* @extends {module:ol/events/Event~Event}
* @extends {module:ol/events/Event}
* @implements {oli.MapEvent}
* @param {string} type Event type.
* @param {module:ol/PluggableMap~PluggableMap} map Map.
* @param {module:ol/PluggableMap} map Map.
* @param {?module:ol/PluggableMap~FrameState=} opt_frameState Frame state.
*/
const MapEvent = function(type, map, opt_frameState) {
@@ -22,7 +22,7 @@ const MapEvent = function(type, map, opt_frameState) {
/**
* The map where the event occurred.
* @type {module:ol/PluggableMap~PluggableMap}
* @type {module:ol/PluggableMap}
* @api
*/
this.map = map;

View File

@@ -16,7 +16,7 @@ import {assign} from './obj.js';
* @param {string} type The event type.
* @param {string} key The property name.
* @param {*} oldValue The old value for `key`.
* @extends {module:ol/events/Event~Event}
* @extends {module:ol/events/Event}
* @implements {oli.Object.Event}
* @constructor
*/
@@ -48,7 +48,7 @@ inherits(ObjectEvent, Event);
* instantiated in apps.
* Most non-trivial classes inherit from this.
*
* This extends {@link module:ol/Observable~Observable} with observable
* This extends {@link module:ol/Observable} with observable
* properties, where each property is observable as well as the object as a
* whole.
*
@@ -83,7 +83,7 @@ inherits(ObjectEvent, Event);
* object.unset('foo').
*
* @constructor
* @extends {module:ol/Observable~Observable}
* @extends {module:ol/Observable}
* @param {Object.<string, *>=} opt_values An object with key-value pairs.
* @fires module:ol/Object~ObjectEvent
* @api

View File

@@ -15,7 +15,7 @@ import EventType from './events/EventType.js';
* {@link module:ol/Observable~Observable#changed}.
*
* @constructor
* @extends {module:ol/events/EventTarget~EventTarget}
* @extends {module:ol/events/EventTarget}
* @fires module:ol/events/Event~Event
* @struct
* @api
@@ -68,8 +68,8 @@ Observable.prototype.changed = function() {
* Object with a `type` property.
*
* @param {{type: string,
* target: (EventTarget|module:ol/events/EventTarget~EventTarget|undefined)}|
* module:ol/events/Event~Event|string} event Event object.
* target: (EventTarget|module:ol/events/EventTarget|undefined)}|
* module:ol/events/Event|string} event Event object.
* @function
* @api
*/

View File

@@ -94,7 +94,7 @@ const Property = {
* map.addOverlay(popup);
*
* @constructor
* @extends {module:ol/Object~BaseObject}
* @extends {module:ol/Object}
* @param {module:ol/Overlay~Options} options Overlay options.
* @api
*/
@@ -239,13 +239,15 @@ Overlay.prototype.getId = function() {
/**
* Get the map associated with this overlay.
* @return {module:ol/PluggableMap~PluggableMap|undefined} The map that the
* @return {module:ol/PluggableMap|undefined} The map that the
* overlay is part of.
* @observable
* @api
*/
Overlay.prototype.getMap = function() {
return /** @type {module:ol/PluggableMap~PluggableMap|undefined} */ (this.get(Property.MAP));
return (
/** @type {module:ol/PluggableMap|undefined} */ (this.get(Property.MAP))
);
};
@@ -268,7 +270,9 @@ Overlay.prototype.getOffset = function() {
* @api
*/
Overlay.prototype.getPosition = function() {
return /** @type {module:ol/coordinate~Coordinate|undefined} */ (this.get(Property.POSITION));
return (
/** @type {module:ol/coordinate~Coordinate|undefined} */ (this.get(Property.POSITION))
);
};
@@ -280,7 +284,9 @@ Overlay.prototype.getPosition = function() {
* @api
*/
Overlay.prototype.getPositioning = function() {
return /** @type {module:ol/OverlayPositioning~OverlayPositioning} */ (this.get(Property.POSITIONING));
return (
/** @type {module:ol/OverlayPositioning~OverlayPositioning} */ (this.get(Property.POSITIONING))
);
};
@@ -369,7 +375,7 @@ Overlay.prototype.setElement = function(element) {
/**
* Set the map to be associated with this overlay.
* @param {module:ol/PluggableMap~PluggableMap|undefined} map The map that the
* @param {module:ol/PluggableMap|undefined} map The map that the
* overlay is part of.
* @observable
* @api

View File

@@ -47,23 +47,23 @@ import {create as createTransform, apply as applyTransform} from './transform.js
* @property {Array.<module:ol/PluggableMap~PostRenderFunction>} postRenderFunctions
* @property {module:ol/size~Size} size
* @property {!Object.<string, boolean>} skippedFeatureUids
* @property {module:ol/TileQueue~TileQueue} tileQueue
* @property {Object.<string, Object.<string, module:ol/TileRange~TileRange>>} usedTiles
* @property {module:ol/TileQueue} tileQueue
* @property {Object.<string, Object.<string, module:ol/TileRange>>} usedTiles
* @property {Array.<number>} viewHints
* @property {!Object.<string, Object.<string, boolean>>} wantedTiles
*/
/**
* @typedef {function(module:ol/PluggableMap~PluggableMap, ?module:ol/PluggableMap~FrameState): boolean} PostRenderFunction
* @typedef {function(module:ol/PluggableMap, ?module:ol/PluggableMap~FrameState): boolean} PostRenderFunction
*/
/**
* @typedef {Object} AtPixelOptions
* @property {((function(module:ol/layer/Layer~Layer): boolean)|undefined)} layerFilter Layer filter
* @property {((function(module:ol/layer/Layer): boolean)|undefined)} layerFilter Layer filter
* function. The filter function will receive one argument, the
* {@link module:ol/layer/Layer~Layer layer-candidate} and it should return a boolean value.
* {@link module:ol/layer/Layer layer-candidate} and it should return a boolean value.
* Only layers which are visible and for which this function returns `true`
* will be tested for features. By default, all visible layers will be tested.
* @property {number} [hitTolerance=0] Hit-detection tolerance in pixels. Pixels
@@ -74,10 +74,10 @@ import {create as createTransform, apply as applyTransform} from './transform.js
/**
* @typedef {Object} MapOptionsInternal
* @property {module:ol/Collection~Collection.<module:ol/control/Control~Control>} [controls]
* @property {module:ol/Collection~Collection.<module:ol/interaction/Interaction~Interaction>} [interactions]
* @property {module:ol/Collection.<module:ol/control/Control>} [controls]
* @property {module:ol/Collection.<module:ol/interaction/Interaction>} [interactions]
* @property {Element|Document} keyboardEventTarget
* @property {module:ol/Collection~Collection.<module:ol/Overlay~Overlay>} overlays
* @property {module:ol/Collection.<module:ol/Overlay>} overlays
* @property {Object.<string, *>} values
*/
@@ -85,12 +85,12 @@ import {create as createTransform, apply as applyTransform} from './transform.js
/**
* Object literal with config options for the map.
* @typedef {Object} MapOptions
* @property {module:ol/Collection~Collection.<module:ol/control/Control~Control>|Array.<module:ol/control/Control~Control>} [controls]
* @property {module:ol/Collection.<module:ol/control/Control>|Array.<module:ol/control/Control>} [controls]
* Controls initially added to the map. If not specified,
* {@link module:ol/control~defaults} is used.
* @property {number} [pixelRatio=window.devicePixelRatio] The ratio between
* physical pixels and device-independent pixels (dips) on the device.
* @property {module:ol/Collection~Collection.<module:ol/interaction/Interaction~Interaction>|Array.<module:ol/interaction/Interaction~Interaction>} [interactions]
* @property {module:ol/Collection.<module:ol/interaction/Interaction>|Array.<module:ol/interaction/Interaction>} [interactions]
* Interactions that are initially added to the map. If not specified,
* {@link module:ol/interaction~defaults} is used.
* @property {Element|Document|string} [keyboardEventTarget] The element to
@@ -118,7 +118,7 @@ import {create as createTransform, apply as applyTransform} from './transform.js
* @property {number} [moveTolerance=1] The minimum distance in pixels the
* cursor must move to be detected as a map move event instead of a click.
* Increasing this value can make it easier to click on the map.
* @property {module:ol/Collection~Collection.<module:ol/Overlay~Overlay>|Array.<module:ol/Overlay~Overlay>} [overlays]
* @property {module:ol/Collection.<module:ol/Overlay>|Array.<module:ol/Overlay>} [overlays]
* Overlays initially added to the map. By default, no overlays are added.
* @property {Element|string} [target] The container for the map, either the
* element itself or the `id` of the element. If not specified at construction
@@ -132,7 +132,7 @@ import {create as createTransform, apply as applyTransform} from './transform.js
/**
* @constructor
* @extends {module:ol/Object~BaseObject}
* @extends {module:ol/Object}
* @param {module:ol/PluggableMap~MapOptions} options Map options.
* @fires module:ol/MapBrowserEvent~MapBrowserEvent
* @fires module:ol/MapEvent~MapEvent
@@ -283,7 +283,7 @@ const PluggableMap = function(options) {
/**
* @private
* @type {module:ol/MapBrowserEventHandler~MapBrowserEventHandler}
* @type {module:ol/MapBrowserEventHandler}
*/
this.mapBrowserEventHandler_ = new MapBrowserEventHandler(this, options.moveTolerance);
for (const key in MapBrowserEventType) {
@@ -311,19 +311,19 @@ const PluggableMap = function(options) {
this.handleBrowserEvent, this);
/**
* @type {module:ol/Collection~Collection.<module:ol/control/Control~Control>}
* @type {module:ol/Collection.<module:ol/control/Control>}
* @protected
*/
this.controls = optionsInternal.controls || new Collection();
/**
* @type {module:ol/Collection~Collection.<module:ol/interaction/Interaction~Interaction>}
* @type {module:ol/Collection.<module:ol/interaction/Interaction>}
* @protected
*/
this.interactions = optionsInternal.interactions || new Collection();
/**
* @type {module:ol/Collection~Collection.<module:ol/Overlay~Overlay>}
* @type {module:ol/Collection.<module:ol/Overlay>}
* @private
*/
this.overlays_ = optionsInternal.overlays;
@@ -331,7 +331,7 @@ const PluggableMap = function(options) {
/**
* A lookup of overlays by id.
* @private
* @type {Object.<string, module:ol/Overlay~Overlay>}
* @type {Object.<string, module:ol/Overlay>}
*/
this.overlayIdIndex_ = {};
@@ -361,7 +361,7 @@ const PluggableMap = function(options) {
/**
* @private
* @type {module:ol/TileQueue~TileQueue}
* @type {module:ol/TileQueue}
*/
this.tileQueue_ = new TileQueue(
this.getTilePriority.bind(this),
@@ -390,8 +390,8 @@ const PluggableMap = function(options) {
this.controls.forEach(
/**
* @param {module:ol/control/Control~Control} control Control.
* @this {module:ol/PluggableMap~PluggableMap}
* @param {module:ol/control/Control} control Control.
* @this {module:ol/PluggableMap}
*/
function(control) {
control.setMap(this);
@@ -415,8 +415,8 @@ const PluggableMap = function(options) {
this.interactions.forEach(
/**
* @param {module:ol/interaction/Interaction~Interaction} interaction Interaction.
* @this {module:ol/PluggableMap~PluggableMap}
* @param {module:ol/interaction/Interaction} interaction Interaction.
* @this {module:ol/PluggableMap}
*/
function(interaction) {
interaction.setMap(this);
@@ -445,7 +445,7 @@ const PluggableMap = function(options) {
* @param {module:ol/Collection~CollectionEvent} event CollectionEvent.
*/
function(event) {
this.addOverlayInternal_(/** @type {module:ol/Overlay~Overlay} */ (event.element));
this.addOverlayInternal_(/** @type {module:ol/Overlay} */ (event.element));
}, this);
listen(this.overlays_, CollectionEventType.REMOVE,
@@ -453,7 +453,7 @@ const PluggableMap = function(options) {
* @param {module:ol/Collection~CollectionEvent} event CollectionEvent.
*/
function(event) {
const overlay = /** @type {module:ol/Overlay~Overlay} */ (event.element);
const overlay = /** @type {module:ol/Overlay} */ (event.element);
const id = overlay.getId();
if (id !== undefined) {
delete this.overlayIdIndex_[id.toString()];
@@ -473,7 +473,7 @@ PluggableMap.prototype.createRenderer = function() {
/**
* Add the given control to the map.
* @param {module:ol/control/Control~Control} control Control.
* @param {module:ol/control/Control} control Control.
* @api
*/
PluggableMap.prototype.addControl = function(control) {
@@ -483,7 +483,7 @@ PluggableMap.prototype.addControl = function(control) {
/**
* Add the given interaction to the map.
* @param {module:ol/interaction/Interaction~Interaction} interaction Interaction to add.
* @param {module:ol/interaction/Interaction} interaction Interaction to add.
* @api
*/
PluggableMap.prototype.addInteraction = function(interaction) {
@@ -506,7 +506,7 @@ PluggableMap.prototype.addLayer = function(layer) {
/**
* Add the given overlay to the map.
* @param {module:ol/Overlay~Overlay} overlay Overlay.
* @param {module:ol/Overlay} overlay Overlay.
* @api
*/
PluggableMap.prototype.addOverlay = function(overlay) {
@@ -516,7 +516,7 @@ PluggableMap.prototype.addOverlay = function(overlay) {
/**
* This deals with map's overlay collection changes.
* @param {module:ol/Overlay~Overlay} overlay Overlay.
* @param {module:ol/Overlay} overlay Overlay.
* @private
*/
PluggableMap.prototype.addOverlayInternal_ = function(overlay) {
@@ -555,12 +555,12 @@ PluggableMap.prototype.disposeInternal = function() {
* callback with each intersecting feature. Layers included in the detection can
* be configured through the `layerFilter` option in `opt_options`.
* @param {module:ol~Pixel} pixel Pixel.
* @param {function(this: S, (module:ol/Feature~Feature|module:ol/render/Feature~Feature),
* module:ol/layer/Layer~Layer): T} callback Feature callback. The callback will be
* @param {function(this: S, (module:ol/Feature|module:ol/render/Feature~Feature),
* module:ol/layer/Layer): T} callback Feature callback. The callback will be
* called with two arguments. The first argument is one
* {@link module:ol/Feature~Feature feature} or
* {@link module:ol/Feature feature} or
* {@link module:ol/render/Feature~Feature render feature} at the pixel, the second is
* the {@link module:ol/layer/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
* truthy value.
* @param {module:ol/PluggableMap~AtPixelOptions=} opt_options Optional options.
@@ -589,7 +589,7 @@ PluggableMap.prototype.forEachFeatureAtPixel = function(pixel, callback, opt_opt
* Get all features that intersect a pixel on the viewport.
* @param {module:ol~Pixel} pixel Pixel.
* @param {module:ol/PluggableMap~AtPixelOptions=} opt_options Optional options.
* @return {Array.<module:ol/Feature~Feature|module:ol/render/Feature~Feature>} The detected features or
* @return {Array.<module:ol/Feature|module:ol/render/Feature~Feature>} The detected features or
* `null` if none were found.
* @api
*/
@@ -609,16 +609,16 @@ PluggableMap.prototype.getFeaturesAtPixel = function(pixel, opt_options) {
* execute a callback with each matching layer. Layers included in the
* detection can be configured through `opt_layerFilter`.
* @param {module:ol~Pixel} pixel Pixel.
* @param {function(this: S, module:ol/layer/Layer~Layer, (Uint8ClampedArray|Uint8Array)): T} callback
* @param {function(this: S, module:ol/layer/Layer, (Uint8ClampedArray|Uint8Array)): T} callback
* Layer callback. This callback will receive two arguments: first is the
* {@link module:ol/layer/Layer~Layer layer}, second argument is an array representing
* {@link module:ol/layer/Layer layer}, second argument is an array representing
* [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
* functions can return a truthy value.
* @param {S=} opt_this Value to use as `this` when executing `callback`.
* @param {(function(this: U, module:ol/layer/Layer~Layer): boolean)=} opt_layerFilter Layer
* @param {(function(this: U, module:ol/layer/Layer): boolean)=} opt_layerFilter Layer
* filter function. The filter function will receive one argument, the
* {@link module:ol/layer/Layer~Layer layer-candidate} and it should return a boolean
* {@link module:ol/layer/Layer layer-candidate} and it should return a boolean
* value. Only layers which are visible and for which this function returns
* `true` will be tested for features. By default, all visible layers will
* be tested.
@@ -742,7 +742,7 @@ PluggableMap.prototype.getCoordinateFromPixel = function(pixel) {
/**
* Get the map controls. Modifying this collection changes the controls
* associated with the map.
* @return {module:ol/Collection~Collection.<module:ol/control/Control~Control>} Controls.
* @return {module:ol/Collection.<module:ol/control/Control>} Controls.
* @api
*/
PluggableMap.prototype.getControls = function() {
@@ -753,7 +753,7 @@ PluggableMap.prototype.getControls = function() {
/**
* Get the map overlays. Modifying this collection changes the overlays
* associated with the map.
* @return {module:ol/Collection~Collection.<module:ol/Overlay~Overlay>} Overlays.
* @return {module:ol/Collection.<module:ol/Overlay>} Overlays.
* @api
*/
PluggableMap.prototype.getOverlays = function() {
@@ -766,7 +766,7 @@ PluggableMap.prototype.getOverlays = function() {
* Note that the index treats string and numeric identifiers as the same. So
* `map.getOverlayById(2)` will return an overlay with id `'2'` or `2`.
* @param {string|number} id Overlay identifier.
* @return {module:ol/Overlay~Overlay} Overlay.
* @return {module:ol/Overlay} Overlay.
* @api
*/
PluggableMap.prototype.getOverlayById = function(id) {
@@ -780,7 +780,7 @@ PluggableMap.prototype.getOverlayById = function(id) {
* associated with the map.
*
* Interactions are used for e.g. pan, zoom and rotate.
* @return {module:ol/Collection~Collection.<module:ol/interaction/Interaction~Interaction>} Interactions.
* @return {module:ol/Collection.<module:ol/interaction/Interaction>} Interactions.
* @api
*/
PluggableMap.prototype.getInteractions = function() {
@@ -795,13 +795,15 @@ PluggableMap.prototype.getInteractions = function() {
* @api
*/
PluggableMap.prototype.getLayerGroup = function() {
return /** @type {module:ol/layer/Group~Group} */ (this.get(MapProperty.LAYERGROUP));
return (
/** @type {module:ol/layer/Group~Group} */ (this.get(MapProperty.LAYERGROUP))
);
};
/**
* Get the collection of layers associated with this map.
* @return {!module:ol/Collection~Collection.<module:ol/layer/Base~Base>} Layers.
* @return {!module:ol/Collection.<module:ol/layer/Base~Base>} Layers.
* @api
*/
PluggableMap.prototype.getLayers = function() {
@@ -843,19 +845,23 @@ PluggableMap.prototype.getRenderer = function() {
* @api
*/
PluggableMap.prototype.getSize = function() {
return /** @type {module:ol/size~Size|undefined} */ (this.get(MapProperty.SIZE));
return (
/** @type {module:ol/size~Size|undefined} */ (this.get(MapProperty.SIZE))
);
};
/**
* Get the view associated with this map. A view manages properties such as
* center and resolution.
* @return {module:ol/View~View} The view that controls this map.
* @return {module:ol/View} The view that controls this map.
* @observable
* @api
*/
PluggableMap.prototype.getView = function() {
return /** @type {module:ol/View~View} */ (this.get(MapProperty.VIEW));
return (
/** @type {module:ol/View} */ (this.get(MapProperty.VIEW))
);
};
@@ -894,7 +900,7 @@ PluggableMap.prototype.getOverlayContainerStopEvent = function() {
/**
* @param {module:ol/Tile~Tile} tile Tile.
* @param {module:ol/Tile} tile Tile.
* @param {string} tileSourceKey Tile source key.
* @param {module:ol/coordinate~Coordinate} tileCenter Tile center.
* @param {number} tileResolution Tile resolution.
@@ -935,7 +941,7 @@ PluggableMap.prototype.handleBrowserEvent = function(browserEvent, opt_type) {
/**
* @param {module:ol/MapBrowserEvent~MapBrowserEvent} mapBrowserEvent The event to handle.
* @param {module:ol/MapBrowserEvent} mapBrowserEvent The event to handle.
*/
PluggableMap.prototype.handleMapBrowserEvent = function(mapBrowserEvent) {
if (!this.frameState_) {
@@ -1162,8 +1168,8 @@ PluggableMap.prototype.render = function() {
/**
* Remove the given control from the map.
* @param {module:ol/control/Control~Control} control Control.
* @return {module:ol/control/Control~Control|undefined} The removed control (or undefined
* @param {module:ol/control/Control} control Control.
* @return {module:ol/control/Control|undefined} The removed control (or undefined
* if the control was not found).
* @api
*/
@@ -1174,8 +1180,8 @@ PluggableMap.prototype.removeControl = function(control) {
/**
* Remove the given interaction from the map.
* @param {module:ol/interaction/Interaction~Interaction} interaction Interaction to remove.
* @return {module:ol/interaction/Interaction~Interaction|undefined} The removed interaction (or
* @param {module:ol/interaction/Interaction} interaction Interaction to remove.
* @return {module:ol/interaction/Interaction|undefined} The removed interaction (or
* undefined if the interaction was not found).
* @api
*/
@@ -1199,8 +1205,8 @@ PluggableMap.prototype.removeLayer = function(layer) {
/**
* Remove the given overlay from the map.
* @param {module:ol/Overlay~Overlay} overlay Overlay.
* @return {module:ol/Overlay~Overlay|undefined} The removed overlay (or undefined
* @param {module:ol/Overlay} overlay Overlay.
* @return {module:ol/Overlay|undefined} The removed overlay (or undefined
* if the overlay was not found).
* @api
*/
@@ -1339,7 +1345,7 @@ PluggableMap.prototype.setTarget = function(target) {
/**
* Set the view for this map.
* @param {module:ol/View~View} view The view that controls this map.
* @param {module:ol/View} view The view that controls this map.
* @observable
* @api
*/
@@ -1349,7 +1355,7 @@ PluggableMap.prototype.setView = function(view) {
/**
* @param {module:ol/Feature~Feature} feature Feature.
* @param {module:ol/Feature} feature Feature.
*/
PluggableMap.prototype.skipFeature = function(feature) {
const featureUid = getUid(feature).toString();
@@ -1387,7 +1393,7 @@ PluggableMap.prototype.updateSize = function() {
/**
* @param {module:ol/Feature~Feature} feature Feature.
* @param {module:ol/Feature} feature Feature.
*/
PluggableMap.prototype.unskipFeature = function(feature) {
const featureUid = getUid(feature).toString();

View File

@@ -9,10 +9,10 @@ import EventType from './events/EventType.js';
/**
* A function that takes an {@link module:ol/Tile~Tile} for the tile and a
* A function that takes an {@link module:ol/Tile} for the tile and a
* `{string}` for the url as arguments.
*
* @typedef {function(module:ol/Tile~Tile, string)} LoadFunction
* @typedef {function(module:ol/Tile, string)} LoadFunction
* @api
*/
@@ -22,12 +22,12 @@ import EventType from './events/EventType.js';
*
* This function takes an {@link module:ol/tilecoord~TileCoord} for the tile
* coordinate, a `{number}` representing the pixel ratio and a
* {@link module:ol/proj/Projection~Projection} for the projection as arguments
* {@link module:ol/proj/Projection} for the projection as arguments
* and returns a `{string}` representing the tile URL, or undefined if no tile
* should be requested for the passed tile coordinate.
*
* @typedef {function(module:ol/tilecoord~TileCoord, number,
* module:ol/proj/Projection~Projection): (string|undefined)} UrlFunction
* module:ol/proj/Projection): (string|undefined)} UrlFunction
* @api
*/
@@ -46,7 +46,7 @@ import EventType from './events/EventType.js';
*
* @constructor
* @abstract
* @extends {module:ol/events/EventTarget~EventTarget}
* @extends {module:ol/events/EventTarget}
* @param {module:ol/tilecoord~TileCoord} tileCoord Tile coordinate.
* @param {module:ol/TileState} state State.
* @param {module:ol/Tile~Options=} opt_options Tile options.
@@ -71,7 +71,7 @@ const Tile = function(tileCoord, state, opt_options) {
* An "interim" tile for this tile. The interim tile may be used while this
* one is loading, for "smooth" transitions when changing params/dimensions
* on the source.
* @type {module:ol/Tile~Tile}
* @type {module:ol/Tile}
*/
this.interimTile = null;
@@ -120,7 +120,7 @@ Tile.prototype.getKey = function() {
* Get the interim tile most suitable for rendering using the chain of interim
* tiles. This corresponds to the most recent tile that has been loaded, if no
* such tile exists, the original tile is returned.
* @return {!module:ol/Tile~Tile} Best tile for rendering.
* @return {!module:ol/Tile} Best tile for rendering.
*/
Tile.prototype.getInterimTile = function() {
if (!this.interimTile) {

View File

@@ -7,7 +7,7 @@ import {fromKey, getKey} from './tilecoord.js';
/**
* @constructor
* @extends {module:ol/structs/LRUCache~LRUCache.<module:ol/Tile~Tile>}
* @extends {module:ol/structs/LRUCache.<module:ol/Tile>}
* @param {number=} opt_highWaterMark High water mark.
* @struct
*/
@@ -21,7 +21,7 @@ inherits(TileCache, LRUCache);
/**
* @param {!Object.<string, module:ol/TileRange~TileRange>} usedTiles Used tiles.
* @param {!Object.<string, module:ol/TileRange>} usedTiles Used tiles.
*/
TileCache.prototype.expireCache = function(usedTiles) {
while (this.canExpireCache()) {

View File

@@ -9,13 +9,13 @@ import PriorityQueue from './structs/PriorityQueue.js';
/**
* @typedef {function(module:ol/Tile~Tile, string, module:ol/coordinate~Coordinate, number): number} PriorityFunction
* @typedef {function(module:ol/Tile, string, module:ol/coordinate~Coordinate, number): number} PriorityFunction
*/
/**
* @constructor
* @extends {module:ol/structs/PriorityQueue~PriorityQueue.<Array>}
* @extends {module:ol/structs/PriorityQueue.<Array>}
* @param {module:ol/TileQueue~PriorityFunction} tilePriorityFunction
* Tile priority function.
* @param {function(): ?} tileChangeCallback
@@ -38,7 +38,9 @@ const TileQueue = function(tilePriorityFunction, tileChangeCallback) {
* @return {string} Key.
*/
function(element) {
return /** @type {module:ol/Tile~Tile} */ (element[0]).getKey();
return (
/** @type {module:ol/Tile} */ (element[0]).getKey()
);
});
/**
@@ -87,11 +89,11 @@ TileQueue.prototype.getTilesLoading = function() {
/**
* @param {module:ol/events/Event~Event} event Event.
* @param {module:ol/events/Event} event Event.
* @protected
*/
TileQueue.prototype.handleTileChange = function(event) {
const tile = /** @type {module:ol/Tile~Tile} */ (event.target);
const tile = /** @type {module:ol/Tile} */ (event.target);
const state = tile.getState();
if (state === TileState.LOADED || state === TileState.ERROR ||
state === TileState.EMPTY || state === TileState.ABORT) {
@@ -117,7 +119,7 @@ TileQueue.prototype.loadMoreTiles = function(maxTotalLoading, maxNewLoads) {
let state, tile, tileKey;
while (this.tilesLoading_ < maxTotalLoading && newLoads < maxNewLoads &&
this.getCount() > 0) {
tile = /** @type {module:ol/Tile~Tile} */ (this.dequeue()[0]);
tile = /** @type {module:ol/Tile} */ (this.dequeue()[0]);
tileKey = tile.getKey();
state = tile.getState();
if (state === TileState.ABORT) {

View File

@@ -42,8 +42,8 @@ const TileRange = function(minX, maxX, minY, maxY) {
* @param {number} maxX Maximum X.
* @param {number} minY Minimum Y.
* @param {number} maxY Maximum Y.
* @param {module:ol/TileRange~TileRange=} tileRange TileRange.
* @return {module:ol/TileRange~TileRange} Tile range.
* @param {module:ol/TileRange=} tileRange TileRange.
* @return {module:ol/TileRange} Tile range.
*/
export function createOrUpdate(minX, maxX, minY, maxY, tileRange) {
if (tileRange !== undefined) {
@@ -68,7 +68,7 @@ TileRange.prototype.contains = function(tileCoord) {
/**
* @param {module:ol/TileRange~TileRange} tileRange Tile range.
* @param {module:ol/TileRange} tileRange Tile range.
* @return {boolean} Contains.
*/
TileRange.prototype.containsTileRange = function(tileRange) {
@@ -88,7 +88,7 @@ TileRange.prototype.containsXY = function(x, y) {
/**
* @param {module:ol/TileRange~TileRange} tileRange Tile range.
* @param {module:ol/TileRange} tileRange Tile range.
* @return {boolean} Equals.
*/
TileRange.prototype.equals = function(tileRange) {
@@ -98,7 +98,7 @@ TileRange.prototype.equals = function(tileRange) {
/**
* @param {module:ol/TileRange~TileRange} tileRange Tile range.
* @param {module:ol/TileRange} tileRange Tile range.
*/
TileRange.prototype.extend = function(tileRange) {
if (tileRange.minX < this.minX) {
@@ -141,7 +141,7 @@ TileRange.prototype.getWidth = function() {
/**
* @param {module:ol/TileRange~TileRange} tileRange Tile range.
* @param {module:ol/TileRange} tileRange Tile range.
* @return {boolean} Intersects.
*/
TileRange.prototype.intersects = function(tileRange) {

View File

@@ -22,23 +22,23 @@ import {loadFeaturesXhr} from './featureloader.js';
/**
* @constructor
* @extends {module:ol/Tile~Tile}
* @extends {module:ol/Tile}
* @param {module:ol/tilecoord~TileCoord} tileCoord Tile coordinate.
* @param {module:ol/TileState} state State.
* @param {number} sourceRevision Source revision.
* @param {module:ol/format/Feature~FeatureFormat} format Feature format.
* @param {module:ol/format/Feature} format Feature format.
* @param {module:ol/Tile~LoadFunction} tileLoadFunction Tile load function.
* @param {module:ol/tilecoord~TileCoord} urlTileCoord Wrapped tile coordinate for source urls.
* @param {module:ol/Tile~UrlFunction} tileUrlFunction Tile url function.
* @param {module:ol/tilegrid/TileGrid~TileGrid} sourceTileGrid Tile grid of the source.
* @param {module:ol/tilegrid/TileGrid~TileGrid} tileGrid Tile grid of the renderer.
* @param {Object.<string, module:ol/VectorTile~VectorTile>} sourceTiles Source tiles.
* @param {module:ol/tilegrid/TileGrid} sourceTileGrid Tile grid of the source.
* @param {module:ol/tilegrid/TileGrid} tileGrid Tile grid of the renderer.
* @param {Object.<string, module:ol/VectorTile>} sourceTiles Source tiles.
* @param {number} pixelRatio Pixel ratio.
* @param {module:ol/proj/Projection~Projection} projection Projection.
* @param {function(new: module:ol/VectorTile~VectorTile, module:ol/tilecoord~TileCoord, module:ol/TileState, string,
* module:ol/format/Feature~FeatureFormat, module:ol/Tile~LoadFunction)} tileClass Class to
* @param {module:ol/proj/Projection} projection Projection.
* @param {function(new: module:ol/VectorTile, module:ol/tilecoord~TileCoord, module:ol/TileState, string,
* module:ol/format/Feature, module:ol/Tile~LoadFunction)} tileClass Class to
* instantiate for source tiles.
* @param {function(this: module:ol/source/VectorTile~VectorTile, module:ol/events/Event~Event)} handleTileChange
* @param {function(this: module:ol/source/VectorTile, module:ol/events/Event)} handleTileChange
* Function to call when a source tile's state changes.
* @param {module:ol/Tile~Options=} opt_options Tile options.
*/
@@ -68,7 +68,7 @@ const VectorImageTile = function(tileCoord, state, sourceRevision, format,
/**
* @private
* @type {Object.<string, module:ol/VectorTile~VectorTile>}
* @type {Object.<string, module:ol/VectorTile>}
*/
this.sourceTiles_ = sourceTiles;
@@ -164,7 +164,7 @@ VectorImageTile.prototype.disposeInternal = function() {
/**
* @param {module:ol/layer/Layer~Layer} layer Layer.
* @param {module:ol/layer/Layer} layer Layer.
* @return {CanvasRenderingContext2D} The rendering context.
*/
VectorImageTile.prototype.getContext = function(layer) {
@@ -178,7 +178,7 @@ VectorImageTile.prototype.getContext = function(layer) {
/**
* Get the Canvas for this tile.
* @param {module:ol/layer/Layer~Layer} layer Layer.
* @param {module:ol/layer/Layer} layer Layer.
* @return {HTMLCanvasElement} Canvas.
*/
VectorImageTile.prototype.getImage = function(layer) {
@@ -188,7 +188,7 @@ VectorImageTile.prototype.getImage = function(layer) {
/**
* @param {module:ol/layer/Layer~Layer} layer Layer.
* @param {module:ol/layer/Layer} layer Layer.
* @return {module:ol/VectorImageTile~ReplayState} The replay state.
*/
VectorImageTile.prototype.getReplayState = function(layer) {
@@ -215,7 +215,7 @@ VectorImageTile.prototype.getKey = function() {
/**
* @param {string} tileKey Key (tileCoord) of the source tile.
* @return {module:ol/VectorTile~VectorTile} Source tile.
* @return {module:ol/VectorTile} Source tile.
*/
VectorImageTile.prototype.getTile = function(tileKey) {
return this.sourceTiles_[tileKey];
@@ -299,7 +299,7 @@ export default VectorImageTile;
/**
* Sets the loader for a tile.
* @param {module:ol/VectorTile~VectorTile} tile Vector tile.
* @param {module:ol/VectorTile} tile Vector tile.
* @param {string} url URL.
*/
export function defaultLoadFunction(tile, url) {

View File

@@ -6,18 +6,18 @@ import Tile from './Tile.js';
import TileState from './TileState.js';
/**
* @typedef {function(new: module:ol/VectorTile~VectorTile, module:ol/tilecoord~TileCoord,
* @typedef {function(new: module:ol/VectorTile, module:ol/tilecoord~TileCoord,
* module:ol/TileState, string, ?string, module:ol/Tile~LoadFunction)} TileClass
* @api
*/
/**
* @constructor
* @extends {module:ol/Tile~Tile}
* @extends {module:ol/Tile}
* @param {module:ol/tilecoord~TileCoord} tileCoord Tile coordinate.
* @param {module:ol/TileState} state State.
* @param {string} src Data source url.
* @param {module:ol/format/Feature~FeatureFormat} format Feature format.
* @param {module:ol/format/Feature} format Feature format.
* @param {module:ol/Tile~LoadFunction} tileLoadFunction Tile load function.
* @param {module:ol/Tile~Options=} opt_options Tile options.
*/
@@ -38,13 +38,13 @@ const VectorTile = function(tileCoord, state, src, format, tileLoadFunction, opt
/**
* @private
* @type {module:ol/format/Feature~FeatureFormat}
* @type {module:ol/format/Feature}
*/
this.format_ = format;
/**
* @private
* @type {Array.<module:ol/Feature~Feature>}
* @type {Array.<module:ol/Feature>}
*/
this.features_ = null;
@@ -57,13 +57,13 @@ const VectorTile = function(tileCoord, state, src, format, tileLoadFunction, opt
/**
* Data projection
* @private
* @type {module:ol/proj/Projection~Projection}
* @type {module:ol/proj/Projection}
*/
this.projection_;
/**
* @private
* @type {Object.<string, module:ol/render/ReplayGroup~ReplayGroup>}
* @type {Object.<string, module:ol/render/ReplayGroup>}
*/
this.replayGroups_ = {};
@@ -114,7 +114,7 @@ VectorTile.prototype.getExtent = function() {
/**
* Get the feature format assigned for reading this tile's features.
* @return {module:ol/format/Feature~FeatureFormat} Feature format.
* @return {module:ol/format/Feature} Feature format.
* @api
*/
VectorTile.prototype.getFormat = function() {
@@ -125,7 +125,7 @@ VectorTile.prototype.getFormat = function() {
/**
* Get the features for this tile. Geometries will be in the projection returned
* by {@link module:ol/VectorTile~VectorTile#getProjection}.
* @return {Array.<module:ol/Feature~Feature|module:ol/render/Feature~Feature>} Features.
* @return {Array.<module:ol/Feature|module:ol/render/Feature~Feature>} Features.
* @api
*/
VectorTile.prototype.getFeatures = function() {
@@ -144,7 +144,7 @@ VectorTile.prototype.getKey = function() {
/**
* Get the feature projection of features returned by
* {@link module:ol/VectorTile~VectorTile#getFeatures}.
* @return {module:ol/proj/Projection~Projection} Feature projection.
* @return {module:ol/proj/Projection} Feature projection.
* @api
*/
VectorTile.prototype.getProjection = function() {
@@ -153,9 +153,9 @@ VectorTile.prototype.getProjection = function() {
/**
* @param {module:ol/layer/Layer~Layer} layer Layer.
* @param {module:ol/layer/Layer} layer Layer.
* @param {string} key Key.
* @return {module:ol/render/ReplayGroup~ReplayGroup} Replay group.
* @return {module:ol/render/ReplayGroup} Replay group.
*/
VectorTile.prototype.getReplayGroup = function(layer, key) {
return this.replayGroups_[getUid(layer) + ',' + key];
@@ -176,8 +176,8 @@ VectorTile.prototype.load = function() {
/**
* Handler for successful tile load.
* @param {Array.<module:ol/Feature~Feature>} features The loaded features.
* @param {module:ol/proj/Projection~Projection} dataProjection Data projection.
* @param {Array.<module:ol/Feature>} features The loaded features.
* @param {module:ol/proj/Projection} dataProjection Data projection.
* @param {module:ol/extent~Extent} extent Extent.
*/
VectorTile.prototype.onLoad = function(features, dataProjection, extent) {
@@ -215,7 +215,7 @@ VectorTile.prototype.setExtent = function(extent) {
/**
* Function for use in an {@link module:ol/source/VectorTile~VectorTile}'s `tileLoadFunction`.
* Sets the features for the tile.
* @param {Array.<module:ol/Feature~Feature>} features Features.
* @param {Array.<module:ol/Feature>} features Features.
* @api
*/
VectorTile.prototype.setFeatures = function(features) {
@@ -228,7 +228,7 @@ VectorTile.prototype.setFeatures = function(features) {
* Function for use in an {@link module:ol/source/VectorTile~VectorTile}'s `tileLoadFunction`.
* Sets the projection of the features that were added with
* {@link module:ol/VectorTile~VectorTile#setFeatures}.
* @param {module:ol/proj/Projection~Projection} projection Feature projection.
* @param {module:ol/proj/Projection} projection Feature projection.
* @api
*/
VectorTile.prototype.setProjection = function(projection) {
@@ -237,9 +237,9 @@ VectorTile.prototype.setProjection = function(projection) {
/**
* @param {module:ol/layer/Layer~Layer} layer Layer.
* @param {module:ol/layer/Layer} layer Layer.
* @param {string} key Key.
* @param {module:ol/render/ReplayGroup~ReplayGroup} replayGroup Replay group.
* @param {module:ol/render/ReplayGroup} replayGroup Replay group.
*/
VectorTile.prototype.setReplayGroup = function(layer, key, replayGroup) {
this.replayGroups_[getUid(layer) + ',' + key] = replayGroup;

View File

@@ -158,7 +158,7 @@ import Units from './proj/Units.js';
/**
* @typedef {Object} State
* @property {module:ol/coordinate~Coordinate} center
* @property {module:ol/proj/Projection~Projection} projection
* @property {module:ol/proj/Projection} projection
* @property {number} resolution
* @property {number} rotation
* @property {number} zoom
@@ -225,7 +225,7 @@ const DEFAULT_MIN_ZOOM = 0;
* default the center is not constrained at all.
*
* @constructor
* @extends {module:ol/Object~BaseObject}
* @extends {module:ol/Object}
* @param {module:ol/View~ViewOptions=} opt_options View options.
* @api
*/
@@ -257,7 +257,7 @@ const View = function(opt_options) {
/**
* @private
* @const
* @type {module:ol/proj/Projection~Projection}
* @type {module:ol/proj/Projection}
*/
this.projection_ = createProjection(options.projection, 'EPSG:3857');
@@ -711,7 +711,9 @@ View.prototype.constrainRotation = function(rotation, opt_delta) {
* @api
*/
View.prototype.getCenter = function() {
return /** @type {module:ol/coordinate~Coordinate|undefined} */ (this.get(ViewProperty.CENTER));
return (
/** @type {module:ol/coordinate~Coordinate|undefined} */ (this.get(ViewProperty.CENTER))
);
};
@@ -823,7 +825,7 @@ View.prototype.setMinZoom = function(zoom) {
/**
* Get the view projection.
* @return {module:ol/proj/Projection~Projection} The projection of the view.
* @return {module:ol/proj/Projection} The projection of the view.
* @api
*/
View.prototype.getProjection = function() {
@@ -935,13 +937,15 @@ View.prototype.getState = function() {
const projection = this.getProjection();
const resolution = /** @type {number} */ (this.getResolution());
const rotation = this.getRotation();
return /** @type {module:ol/View~State} */ ({
center: center.slice(),
projection: projection !== undefined ? projection : null,
resolution: resolution,
rotation: rotation,
zoom: this.getZoom()
});
return (
/** @type {module:ol/View~State} */ ({
center: center.slice(),
projection: projection !== undefined ? projection : null,
resolution: resolution,
rotation: rotation,
zoom: this.getZoom()
})
);
};
@@ -1005,7 +1009,7 @@ View.prototype.getResolutionForZoom = function(zoom) {
* The size is pixel dimensions of the box to fit the extent into.
* In most cases you will want to use the map size, that is `map.getSize()`.
* Takes care of the map angle.
* @param {module:ol/geom/SimpleGeometry~SimpleGeometry|module:ol/extent~Extent} geometryOrExtent The geometry or
* @param {module:ol/geom/SimpleGeometry|module:ol/extent~Extent} geometryOrExtent The geometry or
* extent to fit the view to.
* @param {module:ol/View~FitOptions=} opt_options Options.
* @api
@@ -1016,7 +1020,7 @@ View.prototype.fit = function(geometryOrExtent, opt_options) {
if (!size) {
size = this.getSizeFromViewport_();
}
/** @type {module:ol/geom/SimpleGeometry~SimpleGeometry} */
/** @type {module:ol/geom/SimpleGeometry} */
let geometry;
if (!(geometryOrExtent instanceof SimpleGeometry)) {
assert(Array.isArray(geometryOrExtent),

View File

@@ -58,7 +58,7 @@ import WebGLVectorLayerRenderer from './renderer/webgl/VectorLayer.js';
* with `addLayer` can be groups, which can contain further groups, and so on.
*
* @constructor
* @extends {module:ol/PluggableMap~PluggableMap}
* @extends {module:ol/PluggableMap}
* @param {module:ol/PluggableMap~MapOptions} options Map options.
* @fires module:ol/MapBrowserEvent~MapBrowserEvent
* @fires module:ol/MapEvent~MapEvent

View File

@@ -185,7 +185,9 @@ function fromStringInternal_(s) {
} else {
assert(false, 14); // Invalid color
}
return /** @type {module:ol/color~Color} */ (color);
return (
/** @type {module:ol/color~Color} */ (color)
);
}

View File

@@ -44,7 +44,7 @@ export {default as ZoomToExtent} from './control/ZoomToExtent.js';
*
* @param {module:ol/control~DefaultsOptions=} opt_options
* Defaults options.
* @return {module:ol/Collection~Collection.<module:ol/control/Control~Control>}
* @return {module:ol/Collection.<module:ol/control/Control>}
* Controls.
* @api
*/

View File

@@ -29,7 +29,7 @@ import {visibleAtResolution} from '../layer/Layer.js';
* @property {string|Element} [collapseLabel='»'] Text label to use
* for the expanded attributions button.
* Instead of text, also an element (e.g. a `span` element) can be used.
* @property {function(module:ol/MapEvent~MapEvent)} [render] Function called when
* @property {function(module:ol/MapEvent)} [render] Function called when
* the control should be re-rendered. This is called in a `requestAnimationFrame`
* callback.
*/
@@ -43,7 +43,7 @@ import {visibleAtResolution} from '../layer/Layer.js';
* be changed by using a css selector for `.ol-attribution`.
*
* @constructor
* @extends {module:ol/control/Control~Control}
* @extends {module:ol/control/Control}
* @param {module:ol/control/Attribution~Options=} opt_options Attribution options.
* @api
*/
@@ -208,8 +208,8 @@ Attribution.prototype.getSourceAttributions_ = function(frameState) {
/**
* Update the attribution element.
* @param {module:ol/MapEvent~MapEvent} mapEvent Map event.
* @this {module:ol/control/Attribution~Attribution}
* @param {module:ol/MapEvent} mapEvent Map event.
* @this {module:ol/control/Attribution}
* @api
*/
export function render(mapEvent) {

View File

@@ -14,7 +14,7 @@ import {listen, unlistenByKey} from '../events.js';
* @property {Element} [element] The element is the control's
* container element. This only needs to be specified if you're developing
* a custom control.
* @property {function(module:ol/MapEvent~MapEvent)} [render] Function called when
* @property {function(module:ol/MapEvent)} [render] Function called when
* the control should be re-rendered. This is called in a `requestAnimationFrame`
* callback.
* @property {Element|string} [target] Specify a target if you want
@@ -45,7 +45,7 @@ import {listen, unlistenByKey} from '../events.js';
* examples/custom-controls for an example of how to do this.
*
* @constructor
* @extends {module:ol/Object~BaseObject}
* @extends {module:ol/Object}
* @implements {oli.control.Control}
* @param {module:ol/control/Control~Options} options Control options.
* @api
@@ -68,7 +68,7 @@ const Control = function(options) {
/**
* @private
* @type {module:ol/PluggableMap~PluggableMap}
* @type {module:ol/PluggableMap}
*/
this.map_ = null;
@@ -79,7 +79,7 @@ const Control = function(options) {
this.listenerKeys = [];
/**
* @type {function(module:ol/MapEvent~MapEvent)}
* @type {function(module:ol/MapEvent)}
*/
this.render = options.render ? options.render : UNDEFINED;
@@ -103,7 +103,7 @@ Control.prototype.disposeInternal = function() {
/**
* Get the map associated with this control.
* @return {module:ol/PluggableMap~PluggableMap} Map.
* @return {module:ol/PluggableMap} Map.
* @api
*/
Control.prototype.getMap = function() {
@@ -115,7 +115,7 @@ Control.prototype.getMap = function() {
* Remove the control from its current map and attach it to the new map.
* Subclasses may set up event handlers to get notified about changes to
* the map here.
* @param {module:ol/PluggableMap~PluggableMap} map Map.
* @param {module:ol/PluggableMap} map Map.
* @override
* @api
*/

View File

@@ -63,7 +63,7 @@ const getChangeType = (function() {
*
*
* @constructor
* @extends {module:ol/control/Control~Control}
* @extends {module:ol/control/Control}
* @param {module:ol/control/FullScreen~Options=} opt_options Options.
* @api
*/

View File

@@ -26,7 +26,7 @@ const COORDINATE_FORMAT = 'coordinateFormat';
* @property {string} [className='ol-mouse-position'] CSS class name.
* @property {module:ol/coordinate~CoordinateFormat} [coordinateFormat] Coordinate format.
* @property {module:ol/proj~ProjectionLike} projection Projection.
* @property {function(module:ol/MapEvent~MapEvent)} [render] Function called when the
* @property {function(module:ol/MapEvent)} [render] Function called when the
* control should be re-rendered. This is called in a `requestAnimationFrame`
* callback.
* @property {Element|string} [target] Specify a target if you want the
@@ -47,7 +47,7 @@ const COORDINATE_FORMAT = 'coordinateFormat';
* can be changed by using the css selector `.ol-mouse-position`.
*
* @constructor
* @extends {module:ol/control/Control~Control}
* @extends {module:ol/control/Control}
* @param {module:ol/control/MousePosition~Options=} opt_options Mouse position
* options.
* @api
@@ -96,7 +96,7 @@ const MousePosition = function(opt_options) {
/**
* @private
* @type {module:ol/proj/Projection~Projection}
* @type {module:ol/proj/Projection}
*/
this.mapProjection_ = null;
@@ -119,8 +119,8 @@ inherits(MousePosition, Control);
/**
* Update the mouseposition element.
* @param {module:ol/MapEvent~MapEvent} mapEvent Map event.
* @this {module:ol/control/MousePosition~MousePosition}
* @param {module:ol/MapEvent} mapEvent Map event.
* @this {module:ol/control/MousePosition}
* @api
*/
export function render(mapEvent) {
@@ -154,19 +154,23 @@ MousePosition.prototype.handleProjectionChanged_ = function() {
* @api
*/
MousePosition.prototype.getCoordinateFormat = function() {
return /** @type {module:ol/coordinate~CoordinateFormat|undefined} */ (this.get(COORDINATE_FORMAT));
return (
/** @type {module:ol/coordinate~CoordinateFormat|undefined} */ (this.get(COORDINATE_FORMAT))
);
};
/**
* Return the projection that is used to report the mouse position.
* @return {module:ol/proj/Projection~Projection|undefined} The projection to report mouse
* @return {module:ol/proj/Projection|undefined} The projection to report mouse
* position in.
* @observable
* @api
*/
MousePosition.prototype.getProjection = function() {
return /** @type {module:ol/proj/Projection~Projection|undefined} */ (this.get(PROJECTION));
return (
/** @type {module:ol/proj/Projection|undefined} */ (this.get(PROJECTION))
);
};

View File

@@ -45,15 +45,15 @@ const MIN_RATIO = 0.1;
* @property {boolean} [collapsible=true] Whether the control can be collapsed or not.
* @property {string|Element} [label='»'] Text label to use for the collapsed
* overviewmap button. Instead of text, also an element (e.g. a `span` element) can be used.
* @property {Array.<module:ol/layer/Layer~Layer>|module:ol/Collection~Collection.<module:ol/layer/Layer~Layer>} [layers]
* @property {Array.<module:ol/layer/Layer>|module:ol/Collection.<module:ol/layer/Layer>} [layers]
* Layers for the overview map. If not set, then all main map layers are used
* instead.
* @property {function(module:ol/MapEvent~MapEvent)} [render] Function called when the control
* @property {function(module:ol/MapEvent)} [render] Function called when the control
* should be re-rendered. This is called in a `requestAnimationFrame` callback.
* @property {Element|string} [target] Specify a target if you want the control
* to be rendered outside of the map's viewport.
* @property {string} [tipLabel='Overview map'] Text label to use for the button tip.
* @property {module:ol/View~View} [view] Custom view for the overview map. If not provided,
* @property {module:ol/View} [view] Custom view for the overview map. If not provided,
* a default view with an EPSG:3857 projection will be used.
*/
@@ -62,7 +62,7 @@ const MIN_RATIO = 0.1;
* Create a new control with a map acting as an overview map for an other
* defined map.
* @constructor
* @extends {module:ol/control/Control~Control}
* @extends {module:ol/control/Control}
* @param {module:ol/control/OverviewMap~Options=} opt_options OverviewMap options.
* @api
*/
@@ -136,7 +136,7 @@ const OverviewMap = function(opt_options) {
this.ovmapDiv_.className = 'ol-overviewmap-map';
/**
* @type {module:ol/Map~Map}
* @type {module:ol/Map}
* @private
*/
this.ovmap_ = new Map({
@@ -149,7 +149,7 @@ const OverviewMap = function(opt_options) {
if (options.layers) {
options.layers.forEach(
/**
* @param {module:ol/layer/Layer~Layer} layer Layer.
* @param {module:ol/layer/Layer} layer Layer.
*/
function(layer) {
ovmap.addLayer(layer);
@@ -161,7 +161,7 @@ const OverviewMap = function(opt_options) {
box.style.boxSizing = 'border-box';
/**
* @type {module:ol/Overlay~Overlay}
* @type {module:ol/Overlay}
* @private
*/
this.boxOverlay_ = new Overlay({
@@ -275,7 +275,7 @@ OverviewMap.prototype.setMap = function(map) {
*/
OverviewMap.prototype.handleMapPropertyChange_ = function(event) {
if (event.key === MapProperty.VIEW) {
const oldView = /** @type {module:ol/View~View} */ (event.oldValue);
const oldView = /** @type {module:ol/View} */ (event.oldValue);
if (oldView) {
this.unbindView_(oldView);
}
@@ -287,7 +287,7 @@ OverviewMap.prototype.handleMapPropertyChange_ = function(event) {
/**
* Register listeners for view property changes.
* @param {module:ol/View~View} view The view.
* @param {module:ol/View} view The view.
* @private
*/
OverviewMap.prototype.bindView_ = function(view) {
@@ -299,7 +299,7 @@ OverviewMap.prototype.bindView_ = function(view) {
/**
* Unregister listeners for view property changes.
* @param {module:ol/View~View} view The view.
* @param {module:ol/View} view The view.
* @private
*/
OverviewMap.prototype.unbindView_ = function(view) {
@@ -322,8 +322,8 @@ OverviewMap.prototype.handleRotationChanged_ = function() {
/**
* Update the overview map element.
* @param {module:ol/MapEvent~MapEvent} mapEvent Map event.
* @this {module:ol/control/OverviewMap~OverviewMap}
* @param {module:ol/MapEvent} mapEvent Map event.
* @this {module:ol/control/OverviewMap}
* @api
*/
export function render(mapEvent) {
@@ -588,7 +588,7 @@ OverviewMap.prototype.getCollapsed = function() {
/**
* Return the overview map.
* @return {module:ol/PluggableMap~PluggableMap} Overview map.
* @return {module:ol/PluggableMap} Overview map.
* @api
*/
OverviewMap.prototype.getOverviewMap = function() {

View File

@@ -18,7 +18,7 @@ import {inherits} from '../index.js';
* @property {string} [tipLabel='Reset rotation'] Text label to use for the rotate tip.
* @property {number} [duration=250] Animation duration in milliseconds.
* @property {boolean} [autoHide=true] Hide the control when rotation is 0.
* @property {function(module:ol/MapEvent~MapEvent)} [render] Function called when the control should
* @property {function(module:ol/MapEvent)} [render] Function called when the control should
* be re-rendered. This is called in a `requestAnimationFrame` callback.
* @property {function()} [resetNorth] Function called when the control is clicked.
* This will override the default `resetNorth`.
@@ -34,7 +34,7 @@ import {inherits} from '../index.js';
* selector is added to the button when the rotation is 0.
*
* @constructor
* @extends {module:ol/control/Control~Control}
* @extends {module:ol/control/Control}
* @param {module:ol/control/Rotate~Options=} opt_options Rotate options.
* @api
*/
@@ -153,8 +153,8 @@ Rotate.prototype.resetNorth_ = function() {
/**
* Update the rotate control element.
* @param {module:ol/MapEvent~MapEvent} mapEvent Map event.
* @this {module:ol/control/Rotate~Rotate}
* @param {module:ol/MapEvent} mapEvent Map event.
* @this {module:ol/control/Rotate}
* @api
*/
export function render(mapEvent) {

View File

@@ -41,7 +41,7 @@ const LEADING_DIGITS = [1, 2, 5];
* @typedef {Object} Options
* @property {string} [className='ol-scale-line'] CSS Class name.
* @property {number} [minWidth=64] Minimum width in pixels.
* @property {function(module:ol/MapEvent~MapEvent)} [render] Function called when the control
* @property {function(module:ol/MapEvent)} [render] Function called when the control
* should be re-rendered. This is called in a `requestAnimationFrame` callback.
* @property {Element|string} [target] Specify a target if you want the control
* to be rendered outside of the map's viewport.
@@ -60,7 +60,7 @@ const LEADING_DIGITS = [1, 2, 5];
* but this can be changed by using the css selector `.ol-scale-line`.
*
* @constructor
* @extends {module:ol/control/Control~Control}
* @extends {module:ol/control/Control}
* @param {module:ol/control/ScaleLine~Options=} opt_options Scale line options.
* @api
*/
@@ -141,14 +141,16 @@ inherits(ScaleLine, Control);
* @api
*/
ScaleLine.prototype.getUnits = function() {
return /** @type {module:ol/control/ScaleLine~Units|undefined} */ (this.get(UNITS_PROP));
return (
/** @type {module:ol/control/ScaleLine~Units|undefined} */ (this.get(UNITS_PROP))
);
};
/**
* Update the scale line element.
* @param {module:ol/MapEvent~MapEvent} mapEvent Map event.
* @this {module:ol/control/ScaleLine~ScaleLine}
* @param {module:ol/MapEvent} mapEvent Map event.
* @this {module:ol/control/ScaleLine}
* @api
*/
export function render(mapEvent) {

View File

@@ -32,7 +32,7 @@ import {easeOut} from '../easing.js';
* use css selectors `.ol-zoom-in` and `.ol-zoom-out`.
*
* @constructor
* @extends {module:ol/control/Control~Control}
* @extends {module:ol/control/Control}
* @param {module:ol/control/Zoom~Options=} opt_options Zoom options.
* @api
*/

View File

@@ -29,7 +29,7 @@ const Direction = {
* @typedef {Object} Options
* @property {string} [className='ol-zoomslider'] CSS class name.
* @property {number} [duration=200] Animation duration in milliseconds.
* @property {function(module:ol/MapEvent~MapEvent)} [render] Function called when the control
* @property {function(module:ol/MapEvent)} [render] Function called when the control
* should be re-rendered. This is called in a `requestAnimationFrame` callback.
*/
@@ -43,7 +43,7 @@ const Direction = {
* map.addControl(new ZoomSlider());
*
* @constructor
* @extends {module:ol/control/Control~Control}
* @extends {module:ol/control/Control}
* @param {module:ol/control/ZoomSlider~Options=} opt_options Zoom slider options.
* @api
*/
@@ -127,7 +127,7 @@ const ZoomSlider = function(opt_options) {
containerElement.className = className + ' ' + CLASS_UNSELECTABLE + ' ' + CLASS_CONTROL;
containerElement.appendChild(thumbElement);
/**
* @type {module:ol/pointer/PointerEventHandler~PointerEventHandler}
* @type {module:ol/pointer/PointerEventHandler}
* @private
*/
this.dragger_ = new PointerEventHandler(containerElement);
@@ -207,8 +207,8 @@ ZoomSlider.prototype.initSlider_ = function() {
/**
* Update the zoomslider element.
* @param {module:ol/MapEvent~MapEvent} mapEvent Map event.
* @this {module:ol/control/ZoomSlider~ZoomSlider}
* @param {module:ol/MapEvent} mapEvent Map event.
* @this {module:ol/control/ZoomSlider}
* @api
*/
export function render(mapEvent) {
@@ -249,7 +249,7 @@ ZoomSlider.prototype.handleContainerClick_ = function(event) {
/**
* Handle dragger start events.
* @param {module:ol/pointer/PointerEvent~PointerEvent} event The drag event.
* @param {module:ol/pointer/PointerEvent} event The drag event.
* @private
*/
ZoomSlider.prototype.handleDraggerStart_ = function(event) {
@@ -265,7 +265,7 @@ ZoomSlider.prototype.handleDraggerStart_ = function(event) {
/**
* Handle dragger drag events.
*
* @param {module:ol/pointer/PointerEvent~PointerEvent|Event} event The drag event.
* @param {module:ol/pointer/PointerEvent|Event} event The drag event.
* @private
*/
ZoomSlider.prototype.handleDraggerDrag_ = function(event) {
@@ -285,7 +285,7 @@ ZoomSlider.prototype.handleDraggerDrag_ = function(event) {
/**
* Handle dragger end events.
* @param {module:ol/pointer/PointerEvent~PointerEvent|Event} event The drag event.
* @param {module:ol/pointer/PointerEvent|Event} event The drag event.
* @private
*/
ZoomSlider.prototype.handleDraggerEnd_ = function(event) {

View File

@@ -27,7 +27,7 @@ import {CLASS_CONTROL, CLASS_UNSELECTABLE} from '../css.js';
* extent. To style this control use the css selector `.ol-zoom-extent`.
*
* @constructor
* @extends {module:ol/control/Control~Control}
* @extends {module:ol/control/Control}
* @param {module:ol/control/ZoomToExtent~Options=} opt_options Options.
* @api
*/

View File

@@ -50,7 +50,7 @@ export function add(coordinate, delta) {
* Calculates the point closest to the passed coordinate on the passed circle.
*
* @param {module:ol/coordinate~Coordinate} coordinate The coordinate.
* @param {module:ol/geom/Circle~Circle} circle The circle.
* @param {module:ol/geom/Circle} circle The circle.
* @return {module:ol/coordinate~Coordinate} Closest point on the circumference.
*/
export function closestOnCircle(coordinate, circle) {

View File

@@ -12,7 +12,7 @@ import {clear} from './obj.js';
* @property {boolean} callOnce
* @property {number} [deleteIndex]
* @property {module:ol/events~ListenerFunction} listener
* @property {EventTarget|module:ol/events/EventTarget~EventTarget} target
* @property {EventTarget|module:ol/events/EventTarget} target
* @property {string} type
* @api
*/
@@ -22,7 +22,7 @@ import {clear} from './obj.js';
* Listener function. This function is called with an event object as argument.
* When the function returns `false`, event propagation will stop.
*
* @typedef {function(module:ol/events/Event~Event)|function(module:ol/events/Event~Event): boolean} ListenerFunction
* @typedef {function(module:ol/events/Event)|function(module:ol/events/Event): boolean} ListenerFunction
* @api
*/

View File

@@ -59,7 +59,7 @@ Event.prototype.preventDefault =
/**
* @param {Event|module:ol/events/Event~Event} evt Event
* @param {Event|module:ol/events/Event} evt Event
*/
export function stopPropagation(evt) {
evt.stopPropagation();
@@ -67,7 +67,7 @@ export function stopPropagation(evt) {
/**
* @param {Event|module:ol/events/Event~Event} evt Event
* @param {Event|module:ol/events/Event} evt Event
*/
export function preventDefault(evt) {
evt.preventDefault();

View File

@@ -9,7 +9,7 @@ import Event from '../events/Event.js';
/**
* @typedef {EventTarget|module:ol/events/EventTarget~EventTarget} EventTargetLike
* @typedef {EventTarget|module:ol/events/EventTarget} EventTargetLike
*/
@@ -29,7 +29,7 @@ import Event from '../events/Event.js';
* returns false.
*
* @constructor
* @extends {module:ol/Disposable~Disposable}
* @extends {module:ol/Disposable}
*/
const EventTarget = function() {
@@ -75,7 +75,7 @@ EventTarget.prototype.addEventListener = function(type, listener) {
/**
* @param {{type: string,
* target: (EventTarget|module:ol/events/EventTarget~EventTarget|undefined)}|module:ol/events/Event~Event|
* target: (EventTarget|module:ol/events/EventTarget|undefined)}|module:ol/events/Event|
* string} event Event or event type.
* @return {boolean|undefined} `false` if anyone called preventDefault on the
* event object or if any of the listeners returned false.

View File

@@ -8,10 +8,10 @@ import {WEBKIT, MAC} from '../has.js';
/**
* A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a
* A function that takes an {@link module:ol/MapBrowserEvent} and returns a
* `{boolean}`. If the condition is met, true should be returned.
*
* @typedef {function(module:ol/MapBrowserEvent~MapBrowserEvent): boolean} Condition
* @typedef {function(module:ol/MapBrowserEvent): boolean} Condition
*/
@@ -19,7 +19,7 @@ import {WEBKIT, MAC} from '../has.js';
* Return `true` if only the alt-key is pressed, `false` otherwise (e.g. when
* additionally the shift-key is pressed).
*
* @param {module:ol/MapBrowserEvent~MapBrowserEvent} mapBrowserEvent Map browser event.
* @param {module:ol/MapBrowserEvent} mapBrowserEvent Map browser event.
* @return {boolean} True if only the alt key is pressed.
* @api
*/
@@ -36,7 +36,7 @@ export const altKeyOnly = function(mapBrowserEvent) {
* Return `true` if only the alt-key and shift-key is pressed, `false` otherwise
* (e.g. when additionally the platform-modifier-key is pressed).
*
* @param {module:ol/MapBrowserEvent~MapBrowserEvent} mapBrowserEvent Map browser event.
* @param {module:ol/MapBrowserEvent} mapBrowserEvent Map browser event.
* @return {boolean} True if only the alt and shift keys are pressed.
* @api
*/
@@ -53,7 +53,7 @@ export const altShiftKeysOnly = function(mapBrowserEvent) {
* Return `true` if the map has the focus. This condition requires a map target
* element with a `tabindex` attribute, e.g. `<div id="map" tabindex="1">`.
*
* @param {module:ol/MapBrowserEvent~MapBrowserEvent} event Map browser event.
* @param {module:ol/MapBrowserEvent} event Map browser event.
* @return {boolean} The map has the focus.
* @api
*/
@@ -65,7 +65,7 @@ export const focus = function(event) {
/**
* Return always true.
*
* @param {module:ol/MapBrowserEvent~MapBrowserEvent} mapBrowserEvent Map browser event.
* @param {module:ol/MapBrowserEvent} mapBrowserEvent Map browser event.
* @return {boolean} True.
* @function
* @api
@@ -76,7 +76,7 @@ export const always = TRUE;
/**
* Return `true` if the event is a `click` event, `false` otherwise.
*
* @param {module:ol/MapBrowserEvent~MapBrowserEvent} mapBrowserEvent Map browser event.
* @param {module:ol/MapBrowserEvent} mapBrowserEvent Map browser event.
* @return {boolean} True if the event is a map `click` event.
* @api
*/
@@ -91,7 +91,7 @@ export const click = function(mapBrowserEvent) {
* By definition, this includes left-click on windows/linux, and left-click
* without the ctrl key on Macs.
*
* @param {module:ol/MapBrowserEvent~MapBrowserEvent} mapBrowserEvent Map browser event.
* @param {module:ol/MapBrowserEvent} mapBrowserEvent Map browser event.
* @return {boolean} The result.
*/
export const mouseActionButton = function(mapBrowserEvent) {
@@ -104,7 +104,7 @@ export const mouseActionButton = function(mapBrowserEvent) {
/**
* Return always false.
*
* @param {module:ol/MapBrowserEvent~MapBrowserEvent} mapBrowserEvent Map browser event.
* @param {module:ol/MapBrowserEvent} mapBrowserEvent Map browser event.
* @return {boolean} False.
* @function
* @api
@@ -116,7 +116,7 @@ export const never = FALSE;
* Return `true` if the browser event is a `pointermove` event, `false`
* otherwise.
*
* @param {module:ol/MapBrowserEvent~MapBrowserEvent} mapBrowserEvent Map browser event.
* @param {module:ol/MapBrowserEvent} mapBrowserEvent Map browser event.
* @return {boolean} True if the browser event is a `pointermove` event.
* @api
*/
@@ -128,7 +128,7 @@ export const pointerMove = function(mapBrowserEvent) {
/**
* Return `true` if the event is a map `singleclick` event, `false` otherwise.
*
* @param {module:ol/MapBrowserEvent~MapBrowserEvent} mapBrowserEvent Map browser event.
* @param {module:ol/MapBrowserEvent} mapBrowserEvent Map browser event.
* @return {boolean} True if the event is a map `singleclick` event.
* @api
*/
@@ -140,7 +140,7 @@ export const singleClick = function(mapBrowserEvent) {
/**
* Return `true` if the event is a map `dblclick` event, `false` otherwise.
*
* @param {module:ol/MapBrowserEvent~MapBrowserEvent} mapBrowserEvent Map browser event.
* @param {module:ol/MapBrowserEvent} mapBrowserEvent Map browser event.
* @return {boolean} True if the event is a map `dblclick` event.
* @api
*/
@@ -153,7 +153,7 @@ export const doubleClick = function(mapBrowserEvent) {
* Return `true` if no modifier key (alt-, shift- or platform-modifier-key) is
* pressed.
*
* @param {module:ol/MapBrowserEvent~MapBrowserEvent} mapBrowserEvent Map browser event.
* @param {module:ol/MapBrowserEvent} mapBrowserEvent Map browser event.
* @return {boolean} True only if there no modifier keys are pressed.
* @api
*/
@@ -171,7 +171,7 @@ export const noModifierKeys = function(mapBrowserEvent) {
* ctrl-key otherwise) is pressed, `false` otherwise (e.g. when additionally
* the shift-key is pressed).
*
* @param {module:ol/MapBrowserEvent~MapBrowserEvent} mapBrowserEvent Map browser event.
* @param {module:ol/MapBrowserEvent} mapBrowserEvent Map browser event.
* @return {boolean} True if only the platform modifier key is pressed.
* @api
*/
@@ -187,7 +187,7 @@ export const platformModifierKeyOnly = function(mapBrowserEvent) {
* Return `true` if only the shift-key is pressed, `false` otherwise (e.g. when
* additionally the alt-key is pressed).
*
* @param {module:ol/MapBrowserEvent~MapBrowserEvent} mapBrowserEvent Map browser event.
* @param {module:ol/MapBrowserEvent} mapBrowserEvent Map browser event.
* @return {boolean} True if only the shift key is pressed.
* @api
*/
@@ -204,7 +204,7 @@ export const shiftKeyOnly = function(mapBrowserEvent) {
* Return `true` if the target element is not editable, i.e. not a `<input>`-,
* `<select>`- or `<textarea>`-element, `false` otherwise.
*
* @param {module:ol/MapBrowserEvent~MapBrowserEvent} mapBrowserEvent Map browser event.
* @param {module:ol/MapBrowserEvent} mapBrowserEvent Map browser event.
* @return {boolean} True only if the target element is not editable.
* @api
*/
@@ -221,14 +221,16 @@ export const targetNotEditable = function(mapBrowserEvent) {
/**
* Return `true` if the event originates from a mouse device.
*
* @param {module:ol/MapBrowserEvent~MapBrowserEvent} mapBrowserEvent Map browser event.
* @param {module:ol/MapBrowserEvent} mapBrowserEvent Map browser event.
* @return {boolean} True if the event originates from a mouse device.
* @api
*/
export const mouseOnly = function(mapBrowserEvent) {
assert(mapBrowserEvent.pointerEvent, 56); // mapBrowserEvent must originate from a pointer event
// see http://www.w3.org/TR/pointerevents/#widl-PointerEvent-pointerType
return /** @type {module:ol/MapBrowserEvent~MapBrowserEvent} */ (mapBrowserEvent).pointerEvent.pointerType == 'mouse';
return (
/** @type {module:ol/MapBrowserEvent} */ (mapBrowserEvent).pointerEvent.pointerType == 'mouse'
);
};
@@ -237,7 +239,7 @@ export const mouseOnly = function(mapBrowserEvent) {
* contact with the surface or if the left mouse button is pressed.
* @see http://www.w3.org/TR/pointerevents/#button-states
*
* @param {module:ol/MapBrowserEvent~MapBrowserEvent} mapBrowserEvent Map browser event.
* @param {module:ol/MapBrowserEvent} mapBrowserEvent Map browser event.
* @return {boolean} True if the event originates from a primary pointer.
* @api
*/

View File

@@ -494,7 +494,9 @@ export function getCorner(extent, corner) {
} else {
assert(false, 13); // Invalid corner
}
return /** @type {!module:ol/coordinate~Coordinate} */ (coordinate);
return (
/** @type {!module:ol/coordinate~Coordinate} */ (coordinate)
);
}

View File

@@ -11,14 +11,14 @@ import FormatType from './format/FormatType.js';
*
* This function takes an {@link module:ol/extent~Extent} representing the area to be loaded,
* a `{number}` representing the resolution (map units per pixel) and an
* {@link module:ol/proj/Projection~Projection} for the projection as
* {@link module:ol/proj/Projection} for the projection as
* arguments. `this` within the function is bound to the
* {@link module:ol/source/Vector~Vector} it's called from.
*
* The function is responsible for loading the features and adding them to the
* source.
* @typedef {function(this:module:ol/source/Vector~Vector, module:ol/extent~Extent, number,
* module:ol/proj/Projection~Projection)} FeatureLoader
* module:ol/proj/Projection)} FeatureLoader
* @api
*/
@@ -29,20 +29,20 @@ import FormatType from './format/FormatType.js';
*
* This function takes an {@link module:ol/extent~Extent} representing the area
* to be loaded, a `{number}` representing the resolution (map units per pixel)
* and an {@link module:ol/proj/Projection~Projection} for the projection as
* and an {@link module:ol/proj/Projection} for the projection as
* arguments and returns a `{string}` representing the URL.
* @typedef {function(module:ol/extent~Extent, number, module:ol/proj/Projection~Projection): string} FeatureUrlFunction
* @typedef {function(module:ol/extent~Extent, number, module:ol/proj/Projection): string} FeatureUrlFunction
* @api
*/
/**
* @param {string|module:ol/featureloader~FeatureUrlFunction} url Feature URL service.
* @param {module:ol/format/Feature~FeatureFormat} format Feature format.
* @param {function(this:module:ol/VectorTile~VectorTile, Array.<module:ol/Feature~Feature>, module:ol/proj/Projection~Projection, module:ol/extent~Extent)|function(this:module:ol/source/Vector~Vector, Array.<module:ol/Feature~Feature>)} success
* @param {module:ol/format/Feature} format Feature format.
* @param {function(this:module:ol/VectorTile, Array.<module:ol/Feature>, module:ol/proj/Projection, module:ol/extent~Extent)|function(this:module:ol/source/Vector~Vector, Array.<module:ol/Feature>)} success
* Function called with the loaded features and optionally with the data
* projection. Called with the vector tile or source as `this`.
* @param {function(this:module:ol/VectorTile~VectorTile)|function(this:module:ol/source/Vector~Vector)} failure
* @param {function(this:module:ol/VectorTile)|function(this:module:ol/source/Vector~Vector)} failure
* Function called when loading failed. Called with the vector tile or
* source as `this`.
* @return {module:ol/featureloader~FeatureLoader} The feature loader.
@@ -52,8 +52,8 @@ export function loadFeaturesXhr(url, format, success, failure) {
/**
* @param {module:ol/extent~Extent} extent Extent.
* @param {number} resolution Resolution.
* @param {module:ol/proj/Projection~Projection} projection Projection.
* @this {module:ol/source/Vector~Vector|module:ol/VectorTile~VectorTile}
* @param {module:ol/proj/Projection} projection Projection.
* @this {module:ol/source/Vector~Vector|module:ol/VectorTile}
*/
function(extent, resolution, projection) {
const xhr = new XMLHttpRequest();
@@ -111,15 +111,15 @@ export function loadFeaturesXhr(url, format, success, failure) {
* loads features (with XHR), parses the features, and adds them to the
* vector source.
* @param {string|module:ol/featureloader~FeatureUrlFunction} url Feature URL service.
* @param {module:ol/format/Feature~FeatureFormat} format Feature format.
* @param {module:ol/format/Feature} format Feature format.
* @return {module:ol/featureloader~FeatureLoader} The feature loader.
* @api
*/
export function xhr(url, format) {
return loadFeaturesXhr(url, format,
/**
* @param {Array.<module:ol/Feature~Feature>} features The loaded features.
* @param {module:ol/proj/Projection~Projection} dataProjection Data
* @param {Array.<module:ol/Feature>} features The loaded features.
* @param {module:ol/proj/Projection} dataProjection Data
* projection.
* @this {module:ol/source/Vector~Vector}
*/

View File

@@ -24,7 +24,7 @@ import {get as getProjection} from '../proj.js';
/**
* @const
* @type {Object.<module:ol/geom/GeometryType, function(EsriJSONGeometry): module:ol/geom/Geometry~Geometry>}
* @type {Object.<module:ol/geom/GeometryType, function(EsriJSONGeometry): module:ol/geom/Geometry>}
*/
const GEOMETRY_READERS = {};
GEOMETRY_READERS[GeometryType.POINT] = readPointGeometry;
@@ -37,7 +37,7 @@ GEOMETRY_READERS[GeometryType.MULTI_POLYGON] = readMultiPolygonGeometry;
/**
* @const
* @type {Object.<string, function(module:ol/geom/Geometry~Geometry, module:ol/format/Feature~WriteOptions=): (EsriJSONGeometry)>}
* @type {Object.<string, function(module:ol/geom/Geometry, module:ol/format/Feature~WriteOptions=): (EsriJSONGeometry)>}
*/
const GEOMETRY_WRITERS = {};
GEOMETRY_WRITERS[GeometryType.POINT] = writePointGeometry;
@@ -59,7 +59,7 @@ GEOMETRY_WRITERS[GeometryType.MULTI_POLYGON] = writeMultiPolygonGeometry;
* Feature format for reading and writing data in the EsriJSON format.
*
* @constructor
* @extends {module:ol/format/JSONFeature~JSONFeature}
* @extends {module:ol/format/JSONFeature}
* @param {module:ol/format/EsriJSON~Options=} opt_options Options.
* @api
*/
@@ -84,7 +84,7 @@ inherits(EsriJSON, JSONFeature);
/**
* @param {EsriJSONGeometry} object Object.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @return {module:ol/geom/Geometry~Geometry} Geometry.
* @return {module:ol/geom/Geometry} Geometry.
*/
function readGeometry(object, opt_options) {
if (!object) {
@@ -115,8 +115,8 @@ function readGeometry(object, opt_options) {
}
}
const geometryReader = GEOMETRY_READERS[type];
return /** @type {module:ol/geom/Geometry~Geometry} */ (transformWithOptions(
geometryReader(object), false, opt_options)
return (
/** @type {module:ol/geom/Geometry} */ (transformWithOptions(geometryReader(object), false, opt_options))
);
}
@@ -176,7 +176,7 @@ function convertRings(rings, layout) {
/**
* @param {EsriJSONGeometry} object Object.
* @return {module:ol/geom/Geometry~Geometry} Point.
* @return {module:ol/geom/Geometry} Point.
*/
function readPointGeometry(object) {
let point;
@@ -198,7 +198,7 @@ function readPointGeometry(object) {
/**
* @param {EsriJSONGeometry} object Object.
* @return {module:ol/geom/Geometry~Geometry} LineString.
* @return {module:ol/geom/Geometry} LineString.
*/
function readLineStringGeometry(object) {
const layout = getGeometryLayout(object);
@@ -208,7 +208,7 @@ function readLineStringGeometry(object) {
/**
* @param {EsriJSONGeometry} object Object.
* @return {module:ol/geom/Geometry~Geometry} MultiLineString.
* @return {module:ol/geom/Geometry} MultiLineString.
*/
function readMultiLineStringGeometry(object) {
const layout = getGeometryLayout(object);
@@ -235,7 +235,7 @@ function getGeometryLayout(object) {
/**
* @param {EsriJSONGeometry} object Object.
* @return {module:ol/geom/Geometry~Geometry} MultiPoint.
* @return {module:ol/geom/Geometry} MultiPoint.
*/
function readMultiPointGeometry(object) {
const layout = getGeometryLayout(object);
@@ -245,7 +245,7 @@ function readMultiPointGeometry(object) {
/**
* @param {EsriJSONGeometry} object Object.
* @return {module:ol/geom/Geometry~Geometry} MultiPolygon.
* @return {module:ol/geom/Geometry} MultiPolygon.
*/
function readMultiPolygonGeometry(object) {
const layout = getGeometryLayout(object);
@@ -257,7 +257,7 @@ function readMultiPolygonGeometry(object) {
/**
* @param {EsriJSONGeometry} object Object.
* @return {module:ol/geom/Geometry~Geometry} Polygon.
* @return {module:ol/geom/Geometry} Polygon.
*/
function readPolygonGeometry(object) {
const layout = getGeometryLayout(object);
@@ -266,14 +266,14 @@ function readPolygonGeometry(object) {
/**
* @param {module:ol/geom/Geometry~Geometry} geometry Geometry.
* @param {module:ol/geom/Geometry} geometry Geometry.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {EsriJSONGeometry} EsriJSON geometry.
*/
function writePointGeometry(geometry, opt_options) {
const coordinates = /** @type {module:ol/geom/Point~Point} */ (geometry).getCoordinates();
const coordinates = /** @type {module:ol/geom/Point} */ (geometry).getCoordinates();
let esriJSON;
const layout = /** @type {module:ol/geom/Point~Point} */ (geometry).getLayout();
const layout = /** @type {module:ol/geom/Point} */ (geometry).getLayout();
if (layout === GeometryLayout.XYZ) {
esriJSON = /** @type {EsriJSONPoint} */ ({
x: coordinates[0],
@@ -306,7 +306,7 @@ function writePointGeometry(geometry, opt_options) {
/**
* @param {module:ol/geom/SimpleGeometry~SimpleGeometry} geometry Geometry.
* @param {module:ol/geom/SimpleGeometry} geometry Geometry.
* @return {Object} Object with boolean hasZ and hasM keys.
*/
function getHasZM(geometry) {
@@ -321,76 +321,84 @@ function getHasZM(geometry) {
/**
* @param {module:ol/geom/Geometry~Geometry} geometry Geometry.
* @param {module:ol/geom/Geometry} geometry Geometry.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {EsriJSONPolyline} EsriJSON geometry.
*/
function writeLineStringGeometry(geometry, opt_options) {
const hasZM = getHasZM(/** @type {module:ol/geom/LineString~LineString} */(geometry));
return /** @type {EsriJSONPolyline} */ ({
hasZ: hasZM.hasZ,
hasM: hasZM.hasM,
paths: [
/** @type {module:ol/geom/LineString~LineString} */ (geometry).getCoordinates()
]
});
const hasZM = getHasZM(/** @type {module:ol/geom/LineString} */(geometry));
return (
/** @type {EsriJSONPolyline} */ {
hasZ: hasZM.hasZ,
hasM: hasZM.hasM,
paths: [
/** @type {module:ol/geom/LineString} */ (geometry).getCoordinates()
]
}
);
}
/**
* @param {module:ol/geom/Geometry~Geometry} geometry Geometry.
* @param {module:ol/geom/Geometry} geometry Geometry.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {EsriJSONPolygon} EsriJSON geometry.
*/
function writePolygonGeometry(geometry, opt_options) {
// Esri geometries use the left-hand rule
const hasZM = getHasZM(/** @type {module:ol/geom/Polygon~Polygon} */(geometry));
return /** @type {EsriJSONPolygon} */ ({
hasZ: hasZM.hasZ,
hasM: hasZM.hasM,
rings: /** @type {module:ol/geom/Polygon~Polygon} */ (geometry).getCoordinates(false)
});
const hasZM = getHasZM(/** @type {module:ol/geom/Polygon} */(geometry));
return (
/** @type {EsriJSONPolygon} */ {
hasZ: hasZM.hasZ,
hasM: hasZM.hasM,
rings: /** @type {module:ol/geom/Polygon} */ (geometry).getCoordinates(false)
}
);
}
/**
* @param {module:ol/geom/Geometry~Geometry} geometry Geometry.
* @param {module:ol/geom/Geometry} geometry Geometry.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {EsriJSONPolyline} EsriJSON geometry.
*/
function writeMultiLineStringGeometry(geometry, opt_options) {
const hasZM = getHasZM(/** @type {module:ol/geom/MultiLineString~MultiLineString} */(geometry));
return /** @type {EsriJSONPolyline} */ ({
hasZ: hasZM.hasZ,
hasM: hasZM.hasM,
paths: /** @type {module:ol/geom/MultiLineString~MultiLineString} */ (geometry).getCoordinates()
});
const hasZM = getHasZM(/** @type {module:ol/geom/MultiLineString} */(geometry));
return (
/** @type {EsriJSONPolyline} */ {
hasZ: hasZM.hasZ,
hasM: hasZM.hasM,
paths: /** @type {module:ol/geom/MultiLineString} */ (geometry).getCoordinates()
}
);
}
/**
* @param {module:ol/geom/Geometry~Geometry} geometry Geometry.
* @param {module:ol/geom/Geometry} geometry Geometry.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {EsriJSONMultipoint} EsriJSON geometry.
*/
function writeMultiPointGeometry(geometry, opt_options) {
const hasZM = getHasZM(/** @type {module:ol/geom/MultiPoint~MultiPoint} */(geometry));
return /** @type {EsriJSONMultipoint} */ ({
hasZ: hasZM.hasZ,
hasM: hasZM.hasM,
points: /** @type {module:ol/geom/MultiPoint~MultiPoint} */ (geometry).getCoordinates()
});
const hasZM = getHasZM(/** @type {module:ol/geom/MultiPoint} */(geometry));
return (
/** @type {EsriJSONMultipoint} */ {
hasZ: hasZM.hasZ,
hasM: hasZM.hasM,
points: /** @type {module:ol/geom/MultiPoint} */ (geometry).getCoordinates()
}
);
}
/**
* @param {module:ol/geom/Geometry~Geometry} geometry Geometry.
* @param {module:ol/geom/Geometry} geometry Geometry.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {EsriJSONPolygon} EsriJSON geometry.
*/
function writeMultiPolygonGeometry(geometry, opt_options) {
const hasZM = getHasZM(/** @type {module:ol/geom/MultiPolygon~MultiPolygon} */(geometry));
const coordinates = /** @type {module:ol/geom/MultiPolygon~MultiPolygon} */ (geometry).getCoordinates(false);
const hasZM = getHasZM(/** @type {module:ol/geom/MultiPolygon} */(geometry));
const coordinates = /** @type {module:ol/geom/MultiPolygon} */ (geometry).getCoordinates(false);
const output = [];
for (let i = 0; i < coordinates.length; i++) {
for (let x = coordinates[i].length - 1; x >= 0; x--) {
@@ -412,7 +420,7 @@ function writeMultiPolygonGeometry(geometry, opt_options) {
* @function
* @param {ArrayBuffer|Document|Node|Object|string} source Source.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @return {module:ol/Feature~Feature} Feature.
* @return {module:ol/Feature} Feature.
* @api
*/
EsriJSON.prototype.readFeature;
@@ -425,7 +433,7 @@ EsriJSON.prototype.readFeature;
* @function
* @param {ArrayBuffer|Document|Node|Object|string} source Source.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @return {Array.<module:ol/Feature~Feature>} Features.
* @return {Array.<module:ol/Feature>} Features.
* @api
*/
EsriJSON.prototype.readFeatures;
@@ -461,7 +469,7 @@ EsriJSON.prototype.readFeaturesFromObject = function(object, opt_options) {
const options = opt_options ? opt_options : {};
if (esriJSONObject.features) {
const esriJSONFeatureCollection = /** @type {EsriJSONFeatureCollection} */ (object);
/** @type {Array.<module:ol/Feature~Feature>} */
/** @type {Array.<module:ol/Feature>} */
const features = [];
const esriJSONFeatures = esriJSONFeatureCollection.features;
options.idField = object.objectIdFieldName;
@@ -481,7 +489,7 @@ EsriJSON.prototype.readFeaturesFromObject = function(object, opt_options) {
* @function
* @param {ArrayBuffer|Document|Node|Object|string} source Source.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @return {module:ol/geom/Geometry~Geometry} Geometry.
* @return {module:ol/geom/Geometry} Geometry.
* @api
*/
EsriJSON.prototype.readGeometry;
@@ -500,7 +508,7 @@ EsriJSON.prototype.readGeometryFromObject = function(object, opt_options) {
*
* @function
* @param {ArrayBuffer|Document|Node|Object|string} source Source.
* @return {module:ol/proj/Projection~Projection} Projection.
* @return {module:ol/proj/Projection} Projection.
* @api
*/
EsriJSON.prototype.readProjection;
@@ -521,13 +529,13 @@ EsriJSON.prototype.readProjectionFromObject = function(object) {
/**
* @param {module:ol/geom/Geometry~Geometry} geometry Geometry.
* @param {module:ol/geom/Geometry} geometry Geometry.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {EsriJSONGeometry} EsriJSON geometry.
*/
function writeGeometry(geometry, opt_options) {
const geometryWriter = GEOMETRY_WRITERS[geometry.getType()];
return geometryWriter(/** @type {module:ol/geom/Geometry~Geometry} */(
return geometryWriter(/** @type {module:ol/geom/Geometry} */(
transformWithOptions(geometry, true, opt_options)), opt_options);
}
@@ -536,7 +544,7 @@ function writeGeometry(geometry, opt_options) {
* Encode a geometry as a EsriJSON string.
*
* @function
* @param {module:ol/geom/Geometry~Geometry} geometry Geometry.
* @param {module:ol/geom/Geometry} geometry Geometry.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {string} EsriJSON.
* @api
@@ -547,7 +555,7 @@ EsriJSON.prototype.writeGeometry;
/**
* Encode a geometry as a EsriJSON object.
*
* @param {module:ol/geom/Geometry~Geometry} geometry Geometry.
* @param {module:ol/geom/Geometry} geometry Geometry.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {EsriJSONGeometry} Object.
* @override
@@ -562,7 +570,7 @@ EsriJSON.prototype.writeGeometryObject = function(geometry, opt_options) {
* Encode a feature as a EsriJSON Feature string.
*
* @function
* @param {module:ol/Feature~Feature} feature Feature.
* @param {module:ol/Feature} feature Feature.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {string} EsriJSON.
* @api
@@ -573,7 +581,7 @@ EsriJSON.prototype.writeFeature;
/**
* Encode a feature as a esriJSON Feature object.
*
* @param {module:ol/Feature~Feature} feature Feature.
* @param {module:ol/Feature} feature Feature.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {Object} Object.
* @override
@@ -606,7 +614,7 @@ EsriJSON.prototype.writeFeatureObject = function(feature, opt_options) {
* Encode an array of features as EsriJSON.
*
* @function
* @param {Array.<module:ol/Feature~Feature>} features Features.
* @param {Array.<module:ol/Feature>} features Features.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {string} EsriJSON.
* @api
@@ -617,7 +625,7 @@ EsriJSON.prototype.writeFeatures;
/**
* Encode an array of features as a EsriJSON object.
*
* @param {Array.<module:ol/Feature~Feature>} features Features.
* @param {Array.<module:ol/Feature>} features Features.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {Object} EsriJSON Object.
* @override

View File

@@ -64,13 +64,13 @@ const FeatureFormat = function() {
/**
* @protected
* @type {module:ol/proj/Projection~Projection}
* @type {module:ol/proj/Projection}
*/
this.defaultDataProjection = null;
/**
* @protected
* @type {module:ol/proj/Projection~Projection}
* @type {module:ol/proj/Projection}
*/
this.defaultFeatureProjection = null;
@@ -136,7 +136,7 @@ FeatureFormat.prototype.getType = function() {};
* @abstract
* @param {Document|Node|Object|string} source Source.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @return {module:ol/Feature~Feature} Feature.
* @return {module:ol/Feature} Feature.
*/
FeatureFormat.prototype.readFeature = function(source, opt_options) {};
@@ -147,7 +147,7 @@ FeatureFormat.prototype.readFeature = function(source, opt_options) {};
* @abstract
* @param {Document|Node|ArrayBuffer|Object|string} source Source.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @return {Array.<module:ol/Feature~Feature>} Features.
* @return {Array.<module:ol/Feature>} Features.
*/
FeatureFormat.prototype.readFeatures = function(source, opt_options) {};
@@ -158,7 +158,7 @@ FeatureFormat.prototype.readFeatures = function(source, opt_options) {};
* @abstract
* @param {Document|Node|Object|string} source Source.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @return {module:ol/geom/Geometry~Geometry} Geometry.
* @return {module:ol/geom/Geometry} Geometry.
*/
FeatureFormat.prototype.readGeometry = function(source, opt_options) {};
@@ -168,7 +168,7 @@ FeatureFormat.prototype.readGeometry = function(source, opt_options) {};
*
* @abstract
* @param {Document|Node|Object|string} source Source.
* @return {module:ol/proj/Projection~Projection} Projection.
* @return {module:ol/proj/Projection} Projection.
*/
FeatureFormat.prototype.readProjection = function(source) {};
@@ -177,7 +177,7 @@ FeatureFormat.prototype.readProjection = function(source) {};
* Encode a feature in this format.
*
* @abstract
* @param {module:ol/Feature~Feature} feature Feature.
* @param {module:ol/Feature} feature Feature.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {string} Result.
*/
@@ -188,7 +188,7 @@ FeatureFormat.prototype.writeFeature = function(feature, opt_options) {};
* Encode an array of features in this format.
*
* @abstract
* @param {Array.<module:ol/Feature~Feature>} features Features.
* @param {Array.<module:ol/Feature>} features Features.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {string} Result.
*/
@@ -199,7 +199,7 @@ FeatureFormat.prototype.writeFeatures = function(features, opt_options) {};
* Write a single geometry in this format.
*
* @abstract
* @param {module:ol/geom/Geometry~Geometry} geometry Geometry.
* @param {module:ol/geom/Geometry} geometry Geometry.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {string} Result.
*/
@@ -208,11 +208,11 @@ FeatureFormat.prototype.writeGeometry = function(geometry, opt_options) {};
export default FeatureFormat;
/**
* @param {module:ol/geom/Geometry~Geometry|module:ol/extent~Extent} geometry Geometry.
* @param {module:ol/geom/Geometry|module:ol/extent~Extent} geometry Geometry.
* @param {boolean} write Set to true for writing, false for reading.
* @param {(module:ol/format/Feature~WriteOptions|module:ol/format/Feature~ReadOptions)=} opt_options
* Options.
* @return {module:ol/geom/Geometry~Geometry|module:ol/extent~Extent} Transformed geometry.
* @return {module:ol/geom/Geometry|module:ol/extent~Extent} Transformed geometry.
*/
export function transformWithOptions(geometry, write, opt_options) {
const featureProjection = opt_options ?
@@ -220,7 +220,7 @@ export function transformWithOptions(geometry, write, opt_options) {
const dataProjection = opt_options ?
getProjection(opt_options.dataProjection) : null;
/**
* @type {module:ol/geom/Geometry~Geometry|module:ol/extent~Extent}
* @type {module:ol/geom/Geometry|module:ol/extent~Extent}
*/
let transformed;
if (featureProjection && dataProjection &&

View File

@@ -12,7 +12,7 @@ import GML3 from '../format/GML3.js';
* @constructor
* @param {module:ol/format/GMLBase~Options=} opt_options
* Optional configuration object.
* @extends {module:ol/format/GMLBase~GMLBase}
* @extends {module:ol/format/GMLBase}
* @api
*/
const GML = GML3;
@@ -22,7 +22,7 @@ const GML = GML3;
* Encode an array of features in GML 3.1.1 Simple Features.
*
* @function
* @param {Array.<module:ol/Feature~Feature>} features Features.
* @param {Array.<module:ol/Feature>} features Features.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Options.
* @return {string} Result.
* @api
@@ -34,7 +34,7 @@ GML.prototype.writeFeatures;
* Encode an array of features in the GML 3.1.1 format as an XML node.
*
* @function
* @param {Array.<module:ol/Feature~Feature>} features Features.
* @param {Array.<module:ol/Feature>} features Features.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Options.
* @return {Node} Node.
* @api

View File

@@ -27,7 +27,7 @@ const schemaLocation = GMLNS + ' http://schemas.opengis.net/gml/2.1.2/feature.xs
*
* @constructor
* @param {module:ol/format/GMLBase~Options=} opt_options Optional configuration object.
* @extends {module:ol/format/GMLBase~GMLBase}
* @extends {module:ol/format/GMLBase}
* @api
*/
const GML2 = function(opt_options) {
@@ -150,7 +150,7 @@ GML2.prototype.GEOMETRY_NODE_FACTORY_ = function(value, objectStack, opt_nodeNam
const multiCurve = context['multiCurve'];
let nodeName;
if (!Array.isArray(value)) {
nodeName = /** @type {module:ol/geom/Geometry~Geometry} */ (value).getType();
nodeName = /** @type {module:ol/geom/Geometry} */ (value).getType();
if (nodeName === 'MultiPolygon' && multiSurface === true) {
nodeName = 'MultiSurface';
} else if (nodeName === 'Polygon' && surface === true) {
@@ -168,7 +168,7 @@ GML2.prototype.GEOMETRY_NODE_FACTORY_ = function(value, objectStack, opt_nodeNam
/**
* @param {Node} node Node.
* @param {module:ol/Feature~Feature} feature Feature.
* @param {module:ol/Feature} feature Feature.
* @param {Array.<*>} objectStack Node stack.
*/
GML2.prototype.writeFeatureElement = function(node, feature, objectStack) {
@@ -215,7 +215,7 @@ GML2.prototype.writeFeatureElement = function(node, feature, objectStack) {
/**
* @param {Node} node Node.
* @param {module:ol/geom/LineString~LineString} geometry LineString geometry.
* @param {module:ol/geom/LineString} geometry LineString geometry.
* @param {Array.<*>} objectStack Node stack.
* @private
*/
@@ -241,7 +241,7 @@ GML2.prototype.writeCurveOrLineString_ = function(node, geometry, objectStack) {
/**
* @param {Node} node Node.
* @param {module:ol/geom/LineString~LineString} line LineString geometry.
* @param {module:ol/geom/LineString} line LineString geometry.
* @param {Array.<*>} objectStack Node stack.
* @private
*/
@@ -256,7 +256,7 @@ GML2.prototype.writeLineStringOrCurveMember_ = function(node, line, objectStack)
/**
* @param {Node} node Node.
* @param {module:ol/geom/MultiLineString~MultiLineString} geometry MultiLineString geometry.
* @param {module:ol/geom/MultiLineString} geometry MultiLineString geometry.
* @param {Array.<*>} objectStack Node stack.
* @private
*/
@@ -278,7 +278,7 @@ GML2.prototype.writeMultiCurveOrLineString_ = function(node, geometry, objectSta
/**
* @param {Node} node Node.
* @param {module:ol/geom/Geometry~Geometry|module:ol/extent~Extent} geometry Geometry.
* @param {module:ol/geom/Geometry|module:ol/extent~Extent} geometry Geometry.
* @param {Array.<*>} objectStack Node stack.
*/
GML2.prototype.writeGeometryElement = function(node, geometry, objectStack) {
@@ -294,7 +294,7 @@ GML2.prototype.writeGeometryElement = function(node, geometry, objectStack) {
value = geometry;
}
} else {
value = transformWithOptions(/** @type {module:ol/geom/Geometry~Geometry} */ (geometry), true, context);
value = transformWithOptions(/** @type {module:ol/geom/Geometry} */ (geometry), true, context);
}
pushSerializeAndPop(/** @type {module:ol/xml~NodeStackItem} */
(item), this.GEOMETRY_SERIALIZERS_,
@@ -320,7 +320,7 @@ GML2.prototype.createCoordinatesNode_ = function(namespaceURI) {
/**
* @param {Node} node Node.
* @param {module:ol/geom/LineString~LineString|module:ol/geom/LinearRing~LinearRing} value Geometry.
* @param {module:ol/geom/LineString|module:ol/geom/LinearRing} value Geometry.
* @param {Array.<*>} objectStack Node stack.
* @private
*/
@@ -342,7 +342,7 @@ GML2.prototype.writeCoordinates_ = function(node, value, objectStack) {
/**
* @param {Node} node Node.
* @param {module:ol/geom/LineString~LineString} line LineString geometry.
* @param {module:ol/geom/LineString} line LineString geometry.
* @param {Array.<*>} objectStack Node stack.
* @private
*/
@@ -355,7 +355,7 @@ GML2.prototype.writeCurveSegments_ = function(node, line, objectStack) {
/**
* @param {Node} node Node.
* @param {module:ol/geom/Polygon~Polygon} geometry Polygon geometry.
* @param {module:ol/geom/Polygon} geometry Polygon geometry.
* @param {Array.<*>} objectStack Node stack.
* @private
*/
@@ -403,7 +403,7 @@ GML2.prototype.RING_NODE_FACTORY_ = function(value, objectStack, opt_nodeName) {
/**
* @param {Node} node Node.
* @param {module:ol/geom/Polygon~Polygon} polygon Polygon geometry.
* @param {module:ol/geom/Polygon} polygon Polygon geometry.
* @param {Array.<*>} objectStack Node stack.
* @private
*/
@@ -416,7 +416,7 @@ GML2.prototype.writeSurfacePatches_ = function(node, polygon, objectStack) {
/**
* @param {Node} node Node.
* @param {module:ol/geom/LinearRing~LinearRing} ring LinearRing geometry.
* @param {module:ol/geom/LinearRing} ring LinearRing geometry.
* @param {Array.<*>} objectStack Node stack.
* @private
*/
@@ -454,7 +454,7 @@ GML2.prototype.getCoords_ = function(point, opt_srsName, opt_hasZ) {
/**
* @param {Node} node Node.
* @param {module:ol/geom/Point~Point} geometry Point geometry.
* @param {module:ol/geom/Point} geometry Point geometry.
* @param {Array.<*>} objectStack Node stack.
* @private
*/
@@ -475,7 +475,7 @@ GML2.prototype.writePoint_ = function(node, geometry, objectStack) {
/**
* @param {Node} node Node.
* @param {module:ol/geom/MultiPoint~MultiPoint} geometry MultiPoint geometry.
* @param {module:ol/geom/MultiPoint} geometry MultiPoint geometry.
* @param {Array.<*>} objectStack Node stack.
* @private
*/
@@ -496,7 +496,7 @@ GML2.prototype.writeMultiPoint_ = function(node, geometry, objectStack) {
/**
* @param {Node} node Node.
* @param {module:ol/geom/Point~Point} point Point geometry.
* @param {module:ol/geom/Point} point Point geometry.
* @param {Array.<*>} objectStack Node stack.
* @private
*/
@@ -509,7 +509,7 @@ GML2.prototype.writePointMember_ = function(node, point, objectStack) {
/**
* @param {Node} node Node.
* @param {module:ol/geom/LinearRing~LinearRing} geometry LinearRing geometry.
* @param {module:ol/geom/LinearRing} geometry LinearRing geometry.
* @param {Array.<*>} objectStack Node stack.
* @private
*/
@@ -527,7 +527,7 @@ GML2.prototype.writeLinearRing_ = function(node, geometry, objectStack) {
/**
* @param {Node} node Node.
* @param {module:ol/geom/MultiPolygon~MultiPolygon} geometry MultiPolygon geometry.
* @param {module:ol/geom/MultiPolygon} geometry MultiPolygon geometry.
* @param {Array.<*>} objectStack Node stack.
* @private
*/
@@ -549,7 +549,7 @@ GML2.prototype.writeMultiSurfaceOrPolygon_ = function(node, geometry, objectStac
/**
* @param {Node} node Node.
* @param {module:ol/geom/Polygon~Polygon} polygon Polygon geometry.
* @param {module:ol/geom/Polygon} polygon Polygon geometry.
* @param {Array.<*>} objectStack Node stack.
* @private
*/

View File

@@ -39,7 +39,7 @@ const schemaLocation = GMLNS +
* @constructor
* @param {module:ol/format/GMLBase~Options=} opt_options
* Optional configuration object.
* @extends {module:ol/format/GMLBase~GMLBase}
* @extends {module:ol/format/GMLBase}
* @api
*/
const GML3 = function(opt_options) {
@@ -96,10 +96,10 @@ inherits(GML3, GMLBase);
* @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack.
* @private
* @return {module:ol/geom/MultiLineString~MultiLineString|undefined} MultiLineString.
* @return {module:ol/geom/MultiLineString|undefined} MultiLineString.
*/
GML3.prototype.readMultiCurve_ = function(node, objectStack) {
/** @type {Array.<module:ol/geom/LineString~LineString>} */
/** @type {Array.<module:ol/geom/LineString>} */
const lineStrings = pushParseAndPop([],
this.MULTICURVE_PARSERS_, node, objectStack, this);
if (lineStrings) {
@@ -116,10 +116,10 @@ GML3.prototype.readMultiCurve_ = function(node, objectStack) {
* @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack.
* @private
* @return {module:ol/geom/MultiPolygon~MultiPolygon|undefined} MultiPolygon.
* @return {module:ol/geom/MultiPolygon|undefined} MultiPolygon.
*/
GML3.prototype.readMultiSurface_ = function(node, objectStack) {
/** @type {Array.<module:ol/geom/Polygon~Polygon>} */
/** @type {Array.<module:ol/geom/Polygon>} */
const polygons = pushParseAndPop([],
this.MULTISURFACE_PARSERS_, node, objectStack, this);
if (polygons) {
@@ -240,7 +240,7 @@ GML3.prototype.exteriorParser_ = function(node, objectStack) {
* @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack.
* @private
* @return {module:ol/geom/Polygon~Polygon|undefined} Polygon.
* @return {module:ol/geom/Polygon|undefined} Polygon.
*/
GML3.prototype.readSurface_ = function(node, objectStack) {
/** @type {Array.<Array.<number>>} */
@@ -268,7 +268,7 @@ GML3.prototype.readSurface_ = function(node, objectStack) {
* @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack.
* @private
* @return {module:ol/geom/LineString~LineString|undefined} LineString.
* @return {module:ol/geom/LineString|undefined} LineString.
*/
GML3.prototype.readCurve_ = function(node, objectStack) {
/** @type {Array.<number>} */
@@ -573,7 +573,7 @@ GML3.prototype.SEGMENTS_PARSERS_ = {
/**
* @param {Node} node Node.
* @param {module:ol/geom/Point~Point} value Point geometry.
* @param {module:ol/geom/Point} value Point geometry.
* @param {Array.<*>} objectStack Node stack.
* @private
*/
@@ -631,7 +631,7 @@ GML3.prototype.getCoords_ = function(point, opt_srsName, opt_hasZ) {
/**
* @param {Node} node Node.
* @param {module:ol/geom/LineString~LineString|module:ol/geom/LinearRing~LinearRing} value Geometry.
* @param {module:ol/geom/LineString|module:ol/geom/LinearRing} value Geometry.
* @param {Array.<*>} objectStack Node stack.
* @private
*/
@@ -656,7 +656,7 @@ GML3.prototype.writePosList_ = function(node, value, objectStack) {
/**
* @param {Node} node Node.
* @param {module:ol/geom/Point~Point} geometry Point geometry.
* @param {module:ol/geom/Point} geometry Point geometry.
* @param {Array.<*>} objectStack Node stack.
* @private
*/
@@ -695,7 +695,7 @@ GML3.prototype.writeEnvelope = function(node, extent, objectStack) {
/**
* @param {Node} node Node.
* @param {module:ol/geom/LinearRing~LinearRing} geometry LinearRing geometry.
* @param {module:ol/geom/LinearRing} geometry LinearRing geometry.
* @param {Array.<*>} objectStack Node stack.
* @private
*/
@@ -732,7 +732,7 @@ GML3.prototype.RING_NODE_FACTORY_ = function(value, objectStack, opt_nodeName) {
/**
* @param {Node} node Node.
* @param {module:ol/geom/Polygon~Polygon} geometry Polygon geometry.
* @param {module:ol/geom/Polygon} geometry Polygon geometry.
* @param {Array.<*>} objectStack Node stack.
* @private
*/
@@ -761,7 +761,7 @@ GML3.prototype.writeSurfaceOrPolygon_ = function(node, geometry, objectStack) {
/**
* @param {Node} node Node.
* @param {module:ol/geom/LineString~LineString} geometry LineString geometry.
* @param {module:ol/geom/LineString} geometry LineString geometry.
* @param {Array.<*>} objectStack Node stack.
* @private
*/
@@ -787,7 +787,7 @@ GML3.prototype.writeCurveOrLineString_ = function(node, geometry, objectStack) {
/**
* @param {Node} node Node.
* @param {module:ol/geom/MultiPolygon~MultiPolygon} geometry MultiPolygon geometry.
* @param {module:ol/geom/MultiPolygon} geometry MultiPolygon geometry.
* @param {Array.<*>} objectStack Node stack.
* @private
*/
@@ -809,7 +809,7 @@ GML3.prototype.writeMultiSurfaceOrPolygon_ = function(node, geometry, objectStac
/**
* @param {Node} node Node.
* @param {module:ol/geom/MultiPoint~MultiPoint} geometry MultiPoint geometry.
* @param {module:ol/geom/MultiPoint} geometry MultiPoint geometry.
* @param {Array.<*>} objectStack Node stack.
* @private
*/
@@ -830,7 +830,7 @@ GML3.prototype.writeMultiPoint_ = function(node, geometry, objectStack) {
/**
* @param {Node} node Node.
* @param {module:ol/geom/MultiLineString~MultiLineString} geometry MultiLineString geometry.
* @param {module:ol/geom/MultiLineString} geometry MultiLineString geometry.
* @param {Array.<*>} objectStack Node stack.
* @private
*/
@@ -852,7 +852,7 @@ GML3.prototype.writeMultiCurveOrLineString_ = function(node, geometry, objectSta
/**
* @param {Node} node Node.
* @param {module:ol/geom/LinearRing~LinearRing} ring LinearRing geometry.
* @param {module:ol/geom/LinearRing} ring LinearRing geometry.
* @param {Array.<*>} objectStack Node stack.
* @private
*/
@@ -865,7 +865,7 @@ GML3.prototype.writeRing_ = function(node, ring, objectStack) {
/**
* @param {Node} node Node.
* @param {module:ol/geom/Polygon~Polygon} polygon Polygon geometry.
* @param {module:ol/geom/Polygon} polygon Polygon geometry.
* @param {Array.<*>} objectStack Node stack.
* @private
*/
@@ -881,7 +881,7 @@ GML3.prototype.writeSurfaceOrPolygonMember_ = function(node, polygon, objectStac
/**
* @param {Node} node Node.
* @param {module:ol/geom/Point~Point} point Point geometry.
* @param {module:ol/geom/Point} point Point geometry.
* @param {Array.<*>} objectStack Node stack.
* @private
*/
@@ -894,7 +894,7 @@ GML3.prototype.writePointMember_ = function(node, point, objectStack) {
/**
* @param {Node} node Node.
* @param {module:ol/geom/LineString~LineString} line LineString geometry.
* @param {module:ol/geom/LineString} line LineString geometry.
* @param {Array.<*>} objectStack Node stack.
* @private
*/
@@ -909,7 +909,7 @@ GML3.prototype.writeLineStringOrCurveMember_ = function(node, line, objectStack)
/**
* @param {Node} node Node.
* @param {module:ol/geom/Polygon~Polygon} polygon Polygon geometry.
* @param {module:ol/geom/Polygon} polygon Polygon geometry.
* @param {Array.<*>} objectStack Node stack.
* @private
*/
@@ -922,7 +922,7 @@ GML3.prototype.writeSurfacePatches_ = function(node, polygon, objectStack) {
/**
* @param {Node} node Node.
* @param {module:ol/geom/LineString~LineString} line LineString geometry.
* @param {module:ol/geom/LineString} line LineString geometry.
* @param {Array.<*>} objectStack Node stack.
* @private
*/
@@ -936,7 +936,7 @@ GML3.prototype.writeCurveSegments_ = function(node, line, objectStack) {
/**
* @param {Node} node Node.
* @param {module:ol/geom/Geometry~Geometry|module:ol/extent~Extent} geometry Geometry.
* @param {module:ol/geom/Geometry|module:ol/extent~Extent} geometry Geometry.
* @param {Array.<*>} objectStack Node stack.
*/
GML3.prototype.writeGeometryElement = function(node, geometry, objectStack) {
@@ -952,7 +952,7 @@ GML3.prototype.writeGeometryElement = function(node, geometry, objectStack) {
value = geometry;
}
} else {
value = transformWithOptions(/** @type {module:ol/geom/Geometry~Geometry} */ (geometry), true, context);
value = transformWithOptions(/** @type {module:ol/geom/Geometry} */ (geometry), true, context);
}
pushSerializeAndPop(/** @type {module:ol/xml~NodeStackItem} */
(item), this.GEOMETRY_SERIALIZERS_,
@@ -963,7 +963,7 @@ GML3.prototype.writeGeometryElement = function(node, geometry, objectStack) {
/**
* @param {Node} node Node.
* @param {module:ol/Feature~Feature} feature Feature.
* @param {module:ol/Feature} feature Feature.
* @param {Array.<*>} objectStack Node stack.
*/
GML3.prototype.writeFeatureElement = function(node, feature, objectStack) {
@@ -1010,7 +1010,7 @@ GML3.prototype.writeFeatureElement = function(node, feature, objectStack) {
/**
* @param {Node} node Node.
* @param {Array.<module:ol/Feature~Feature>} features Features.
* @param {Array.<module:ol/Feature>} features Features.
* @param {Array.<*>} objectStack Node stack.
* @private
*/
@@ -1075,7 +1075,7 @@ GML3.prototype.GEOMETRY_NODE_FACTORY_ = function(value, objectStack, opt_nodeNam
const multiCurve = context['multiCurve'];
let nodeName;
if (!Array.isArray(value)) {
nodeName = /** @type {module:ol/geom/Geometry~Geometry} */ (value).getType();
nodeName = /** @type {module:ol/geom/Geometry} */ (value).getType();
if (nodeName === 'MultiPolygon' && multiSurface === true) {
nodeName = 'MultiSurface';
} else if (nodeName === 'Polygon' && surface === true) {
@@ -1096,7 +1096,7 @@ GML3.prototype.GEOMETRY_NODE_FACTORY_ = function(value, objectStack, opt_nodeNam
/**
* Encode a geometry in GML 3.1.1 Simple Features.
*
* @param {module:ol/geom/Geometry~Geometry} geometry Geometry.
* @param {module:ol/geom/Geometry} geometry Geometry.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Options.
* @return {Node} Node.
* @override
@@ -1120,7 +1120,7 @@ GML3.prototype.writeGeometryNode = function(geometry, opt_options) {
* Encode an array of features in GML 3.1.1 Simple Features.
*
* @function
* @param {Array.<module:ol/Feature~Feature>} features Features.
* @param {Array.<module:ol/Feature>} features Features.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Options.
* @return {string} Result.
* @api
@@ -1131,7 +1131,7 @@ GML3.prototype.writeFeatures;
/**
* Encode an array of features in the GML 3.1.1 format as an XML node.
*
* @param {Array.<module:ol/Feature~Feature>} features Features.
* @param {Array.<module:ol/Feature>} features Features.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Options.
* @return {Node} Node.
* @override

View File

@@ -74,7 +74,7 @@ export const GMLNS = 'http://www.opengis.net/gml';
* @abstract
* @param {module:ol/format/GMLBase~Options=} opt_options
* Optional configuration object.
* @extends {module:ol/format/XMLFeature~XMLFeature}
* @extends {module:ol/format/XMLFeature}
*/
const GMLBase = function(opt_options) {
const options = /** @type {module:ol/format/GMLBase~Options} */ (opt_options ? opt_options : {});
@@ -135,7 +135,7 @@ const ONLY_WHITESPACE_RE = /^[\s\xa0]*$/;
/**
* @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack.
* @return {Array.<module:ol/Feature~Feature> | undefined} Features.
* @return {Array.<module:ol/Feature> | undefined} Features.
*/
GMLBase.prototype.readFeaturesInternal = function(node, objectStack) {
const localName = node.localName;
@@ -224,16 +224,18 @@ GMLBase.prototype.readFeaturesInternal = function(node, objectStack) {
/**
* @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack.
* @return {module:ol/geom/Geometry~Geometry|undefined} Geometry.
* @return {module:ol/geom/Geometry|undefined} Geometry.
*/
GMLBase.prototype.readGeometryElement = function(node, objectStack) {
const context = /** @type {Object} */ (objectStack[0]);
context['srsName'] = node.firstElementChild.getAttribute('srsName');
context['srsDimension'] = node.firstElementChild.getAttribute('srsDimension');
/** @type {module:ol/geom/Geometry~Geometry} */
/** @type {module:ol/geom/Geometry} */
const geometry = pushParseAndPop(null, this.GEOMETRY_PARSERS_, node, objectStack, this);
if (geometry) {
return /** @type {module:ol/geom/Geometry~Geometry} */ (transformWithOptions(geometry, false, context));
return (
/** @type {module:ol/geom/Geometry} */ (transformWithOptions(geometry, false, context))
);
} else {
return undefined;
}
@@ -243,7 +245,7 @@ GMLBase.prototype.readGeometryElement = function(node, objectStack) {
/**
* @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack.
* @return {module:ol/Feature~Feature} Feature.
* @return {module:ol/Feature} Feature.
*/
GMLBase.prototype.readFeatureElement = function(node, objectStack) {
let n;
@@ -285,7 +287,7 @@ GMLBase.prototype.readFeatureElement = function(node, objectStack) {
/**
* @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack.
* @return {module:ol/geom/Point~Point|undefined} Point.
* @return {module:ol/geom/Point|undefined} Point.
*/
GMLBase.prototype.readPoint = function(node, objectStack) {
const flatCoordinates = this.readFlatCoordinatesFromNode_(node, objectStack);
@@ -300,7 +302,7 @@ GMLBase.prototype.readPoint = function(node, objectStack) {
/**
* @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack.
* @return {module:ol/geom/MultiPoint~MultiPoint|undefined} MultiPoint.
* @return {module:ol/geom/MultiPoint|undefined} MultiPoint.
*/
GMLBase.prototype.readMultiPoint = function(node, objectStack) {
/** @type {Array.<Array.<number>>} */
@@ -317,10 +319,10 @@ GMLBase.prototype.readMultiPoint = function(node, objectStack) {
/**
* @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack.
* @return {module:ol/geom/MultiLineString~MultiLineString|undefined} MultiLineString.
* @return {module:ol/geom/MultiLineString|undefined} MultiLineString.
*/
GMLBase.prototype.readMultiLineString = function(node, objectStack) {
/** @type {Array.<module:ol/geom/LineString~LineString>} */
/** @type {Array.<module:ol/geom/LineString>} */
const lineStrings = pushParseAndPop([],
this.MULTILINESTRING_PARSERS_, node, objectStack, this);
if (lineStrings) {
@@ -336,10 +338,10 @@ GMLBase.prototype.readMultiLineString = function(node, objectStack) {
/**
* @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack.
* @return {module:ol/geom/MultiPolygon~MultiPolygon|undefined} MultiPolygon.
* @return {module:ol/geom/MultiPolygon|undefined} MultiPolygon.
*/
GMLBase.prototype.readMultiPolygon = function(node, objectStack) {
/** @type {Array.<module:ol/geom/Polygon~Polygon>} */
/** @type {Array.<module:ol/geom/Polygon>} */
const polygons = pushParseAndPop([], this.MULTIPOLYGON_PARSERS_, node, objectStack, this);
if (polygons) {
const multiPolygon = new MultiPolygon(null);
@@ -384,7 +386,7 @@ GMLBase.prototype.polygonMemberParser_ = function(node, objectStack) {
/**
* @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack.
* @return {module:ol/geom/LineString~LineString|undefined} LineString.
* @return {module:ol/geom/LineString|undefined} LineString.
*/
GMLBase.prototype.readLineString = function(node, objectStack) {
const flatCoordinates = this.readFlatCoordinatesFromNode_(node, objectStack);
@@ -419,7 +421,7 @@ GMLBase.prototype.readFlatLinearRing_ = function(node, objectStack) {
/**
* @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack.
* @return {module:ol/geom/LinearRing~LinearRing|undefined} LinearRing.
* @return {module:ol/geom/LinearRing|undefined} LinearRing.
*/
GMLBase.prototype.readLinearRing = function(node, objectStack) {
const flatCoordinates = this.readFlatCoordinatesFromNode_(node, objectStack);
@@ -436,7 +438,7 @@ GMLBase.prototype.readLinearRing = function(node, objectStack) {
/**
* @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack.
* @return {module:ol/geom/Polygon~Polygon|undefined} Polygon.
* @return {module:ol/geom/Polygon|undefined} Polygon.
*/
GMLBase.prototype.readPolygon = function(node, objectStack) {
/** @type {Array.<Array.<number>>} */
@@ -573,7 +575,7 @@ GMLBase.prototype.readGeometryFromNode = function(node, opt_options) {
* @function
* @param {Document|Node|Object|string} source Source.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Options.
* @return {Array.<module:ol/Feature~Feature>} Features.
* @return {Array.<module:ol/Feature>} Features.
* @api
*/
GMLBase.prototype.readFeatures;

View File

@@ -20,7 +20,7 @@ import {createElementNS, makeArrayPusher, makeArraySerializer, makeChildAppender
/**
* @typedef {Object} Options
* @property {function(module:ol/Feature~Feature, Node)} [readExtensions] Callback function
* @property {function(module:ol/Feature, Node)} [readExtensions] Callback function
* to process `extensions` nodes. To prevent memory leaks, this callback function must
* not store any references to the node. Note that the `extensions`
* node is not allowed in GPX 1.0. Moreover, only `extensions`
@@ -39,7 +39,7 @@ import {createElementNS, makeArrayPusher, makeArraySerializer, makeChildAppender
* Feature format for reading and writing data in the GPX format.
*
* @constructor
* @extends {module:ol/format/XMLFeature~XMLFeature}
* @extends {module:ol/format/XMLFeature}
* @param {module:ol/format/GPX~Options=} opt_options Options.
* @api
*/
@@ -55,7 +55,7 @@ const GPX = function(opt_options) {
this.defaultDataProjection = getProjection('EPSG:4326');
/**
* @type {function(module:ol/Feature~Feature, Node)|undefined}
* @type {function(module:ol/Feature, Node)|undefined}
* @private
*/
this.readExtensions_ = options.readExtensions;
@@ -85,7 +85,7 @@ const SCHEMA_LOCATION = 'http://www.topografix.com/GPX/1/1 ' +
/**
* @const
* @type {Object.<string, function(Node, Array.<*>): (module:ol/Feature~Feature|undefined)>}
* @type {Object.<string, function(Node, Array.<*>): (module:ol/Feature|undefined)>}
*/
const FEATURE_READER = {
'rte': readRte,
@@ -369,7 +369,7 @@ const GEOMETRY_TYPE_TO_NODENAME = {
* @return {Node|undefined} Node.
*/
function GPX_NODE_FACTORY(value, objectStack, opt_nodeName) {
const geometry = /** @type {module:ol/Feature~Feature} */ (value).getGeometry();
const geometry = /** @type {module:ol/Feature} */ (value).getGeometry();
if (geometry) {
const nodeName = GEOMETRY_TYPE_TO_NODENAME[geometry.getType()];
if (nodeName) {
@@ -536,7 +536,7 @@ function parseTrkSeg(node, objectStack) {
/**
* @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack.
* @return {module:ol/Feature~Feature|undefined} Track.
* @return {module:ol/Feature|undefined} Track.
*/
function readRte(node, objectStack) {
const options = /** @type {module:ol/format/Feature~ReadOptions} */ (objectStack[0]);
@@ -565,7 +565,7 @@ function readRte(node, objectStack) {
/**
* @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack.
* @return {module:ol/Feature~Feature|undefined} Track.
* @return {module:ol/Feature|undefined} Track.
*/
function readTrk(node, objectStack) {
const options = /** @type {module:ol/format/Feature~ReadOptions} */ (objectStack[0]);
@@ -597,7 +597,7 @@ function readTrk(node, objectStack) {
/**
* @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack.
* @return {module:ol/Feature~Feature|undefined} Waypoint.
* @return {module:ol/Feature|undefined} Waypoint.
*/
function readWpt(node, objectStack) {
const options = /** @type {module:ol/format/Feature~ReadOptions} */ (objectStack[0]);
@@ -617,7 +617,7 @@ function readWpt(node, objectStack) {
/**
* @param {Array.<module:ol/Feature~Feature>} features List of features.
* @param {Array.<module:ol/Feature>} features List of features.
* @private
*/
GPX.prototype.handleReadExtensions_ = function(features) {
@@ -643,7 +643,7 @@ GPX.prototype.handleReadExtensions_ = function(features) {
* @function
* @param {Document|Node|Object|string} source Source.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @return {module:ol/Feature~Feature} Feature.
* @return {module:ol/Feature} Feature.
* @api
*/
GPX.prototype.readFeature;
@@ -677,7 +677,7 @@ GPX.prototype.readFeatureFromNode = function(node, opt_options) {
* @function
* @param {Document|Node|Object|string} source Source.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @return {Array.<module:ol/Feature~Feature>} Features.
* @return {Array.<module:ol/Feature>} Features.
* @api
*/
GPX.prototype.readFeatures;
@@ -691,7 +691,7 @@ GPX.prototype.readFeaturesFromNode = function(node, opt_options) {
return [];
}
if (node.localName == 'gpx') {
/** @type {Array.<module:ol/Feature~Feature>} */
/** @type {Array.<module:ol/Feature>} */
const features = pushParseAndPop([], GPX_PARSERS,
node, [this.getReadOptions(node, opt_options)]);
if (features) {
@@ -710,7 +710,7 @@ GPX.prototype.readFeaturesFromNode = function(node, opt_options) {
*
* @function
* @param {Document|Node|Object|string} source Source.
* @return {module:ol/proj/Projection~Projection} Projection.
* @return {module:ol/proj/Projection} Projection.
* @api
*/
GPX.prototype.readProjection;
@@ -781,7 +781,7 @@ function writeWptType(node, coordinate, objectStack) {
/**
* @param {Node} node Node.
* @param {module:ol/Feature~Feature} feature Feature.
* @param {module:ol/Feature} feature Feature.
* @param {Array.<*>} objectStack Object stack.
*/
function writeRte(node, feature, objectStack) {
@@ -790,7 +790,7 @@ function writeRte(node, feature, objectStack) {
const context = {node: node, 'properties': properties};
let geometry = feature.getGeometry();
if (geometry) {
geometry = /** @type {module:ol/geom/LineString~LineString} */ (transformWithOptions(geometry, true, options));
geometry = /** @type {module:ol/geom/LineString} */ (transformWithOptions(geometry, true, options));
context['geometryLayout'] = geometry.getLayout();
properties['rtept'] = geometry.getCoordinates();
}
@@ -805,7 +805,7 @@ function writeRte(node, feature, objectStack) {
/**
* @param {Node} node Node.
* @param {module:ol/Feature~Feature} feature Feature.
* @param {module:ol/Feature} feature Feature.
* @param {Array.<*>} objectStack Object stack.
*/
function writeTrk(node, feature, objectStack) {
@@ -815,7 +815,7 @@ function writeTrk(node, feature, objectStack) {
const context = {node: node, 'properties': properties};
let geometry = feature.getGeometry();
if (geometry) {
geometry = /** @type {module:ol/geom/MultiLineString~MultiLineString} */
geometry = /** @type {module:ol/geom/MultiLineString} */
(transformWithOptions(geometry, true, options));
properties['trkseg'] = geometry.getLineStrings();
}
@@ -830,7 +830,7 @@ function writeTrk(node, feature, objectStack) {
/**
* @param {Node} node Node.
* @param {module:ol/geom/LineString~LineString} lineString LineString.
* @param {module:ol/geom/LineString} lineString LineString.
* @param {Array.<*>} objectStack Object stack.
*/
function writeTrkSeg(node, lineString, objectStack) {
@@ -845,7 +845,7 @@ function writeTrkSeg(node, lineString, objectStack) {
/**
* @param {Node} node Node.
* @param {module:ol/Feature~Feature} feature Feature.
* @param {module:ol/Feature} feature Feature.
* @param {Array.<*>} objectStack Object stack.
*/
function writeWpt(node, feature, objectStack) {
@@ -854,7 +854,7 @@ function writeWpt(node, feature, objectStack) {
context['properties'] = feature.getProperties();
let geometry = feature.getGeometry();
if (geometry) {
geometry = /** @type {module:ol/geom/Point~Point} */
geometry = /** @type {module:ol/geom/Point} */
(transformWithOptions(geometry, true, options));
context['geometryLayout'] = geometry.getLayout();
writeWptType(node, geometry.getCoordinates(), objectStack);
@@ -868,7 +868,7 @@ function writeWpt(node, feature, objectStack) {
* as tracks (`<trk>`).
*
* @function
* @param {Array.<module:ol/Feature~Feature>} features Features.
* @param {Array.<module:ol/Feature>} features Features.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {string} Result.
* @api
@@ -881,7 +881,7 @@ GPX.prototype.writeFeatures;
* LineString geometries are output as routes (`<rte>`), and MultiLineString
* as tracks (`<trk>`).
*
* @param {Array.<module:ol/Feature~Feature>} features Features.
* @param {Array.<module:ol/Feature>} features Features.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Options.
* @return {Node} Node.
* @override

View File

@@ -38,7 +38,7 @@ import {get as getProjection} from '../proj.js';
* Feature format for reading and writing data in the GeoJSON format.
*
* @constructor
* @extends {module:ol/format/JSONFeature~JSONFeature}
* @extends {module:ol/format/JSONFeature}
* @param {module:ol/format/GeoJSON~Options=} opt_options Options.
* @api
*/
@@ -81,7 +81,7 @@ inherits(GeoJSON, JSONFeature);
/**
* @const
* @type {Object.<string, function(GeoJSONObject): module:ol/geom/Geometry~Geometry>}
* @type {Object.<string, function(GeoJSONObject): module:ol/geom/Geometry>}
*/
const GEOMETRY_READERS = {
'Point': readPointGeometry,
@@ -96,7 +96,7 @@ const GEOMETRY_READERS = {
/**
* @const
* @type {Object.<string, function(module:ol/geom/Geometry~Geometry, module:ol/format/Feature~WriteOptions=): (GeoJSONGeometry|GeoJSONGeometryCollection)>}
* @type {Object.<string, function(module:ol/geom/Geometry, module:ol/format/Feature~WriteOptions=): (GeoJSONGeometry|GeoJSONGeometryCollection)>}
*/
const GEOMETRY_WRITERS = {
'Point': writePointGeometry,
@@ -113,15 +113,15 @@ const GEOMETRY_WRITERS = {
/**
* @param {GeoJSONGeometry|GeoJSONGeometryCollection} object Object.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @return {module:ol/geom/Geometry~Geometry} Geometry.
* @return {module:ol/geom/Geometry} Geometry.
*/
function readGeometry(object, opt_options) {
if (!object) {
return null;
}
const geometryReader = GEOMETRY_READERS[object.type];
return /** @type {module:ol/geom/Geometry~Geometry} */ (transformWithOptions(
geometryReader(object), false, opt_options)
return (
/** @type {module:ol/geom/Geometry} */ (transformWithOptions(geometryReader(object), false, opt_options))
);
}
@@ -129,13 +129,13 @@ function readGeometry(object, opt_options) {
/**
* @param {GeoJSONGeometryCollection} object Object.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @return {module:ol/geom/GeometryCollection~GeometryCollection} Geometry collection.
* @return {module:ol/geom/GeometryCollection} Geometry collection.
*/
function readGeometryCollectionGeometry(object, opt_options) {
const geometries = object.geometries.map(
/**
* @param {GeoJSONGeometry} geometry Geometry.
* @return {module:ol/geom/Geometry~Geometry} geometry Geometry.
* @return {module:ol/geom/Geometry} geometry Geometry.
*/
function(geometry) {
return readGeometry(geometry, opt_options);
@@ -146,7 +146,7 @@ function readGeometryCollectionGeometry(object, opt_options) {
/**
* @param {GeoJSONGeometry} object Object.
* @return {module:ol/geom/Point~Point} Point.
* @return {module:ol/geom/Point} Point.
*/
function readPointGeometry(object) {
return new Point(object.coordinates);
@@ -155,7 +155,7 @@ function readPointGeometry(object) {
/**
* @param {GeoJSONGeometry} object Object.
* @return {module:ol/geom/LineString~LineString} LineString.
* @return {module:ol/geom/LineString} LineString.
*/
function readLineStringGeometry(object) {
return new LineString(object.coordinates);
@@ -164,7 +164,7 @@ function readLineStringGeometry(object) {
/**
* @param {GeoJSONGeometry} object Object.
* @return {module:ol/geom/MultiLineString~MultiLineString} MultiLineString.
* @return {module:ol/geom/MultiLineString} MultiLineString.
*/
function readMultiLineStringGeometry(object) {
return new MultiLineString(object.coordinates);
@@ -173,7 +173,7 @@ function readMultiLineStringGeometry(object) {
/**
* @param {GeoJSONGeometry} object Object.
* @return {module:ol/geom/MultiPoint~MultiPoint} MultiPoint.
* @return {module:ol/geom/MultiPoint} MultiPoint.
*/
function readMultiPointGeometry(object) {
return new MultiPoint(object.coordinates);
@@ -182,7 +182,7 @@ function readMultiPointGeometry(object) {
/**
* @param {GeoJSONGeometry} object Object.
* @return {module:ol/geom/MultiPolygon~MultiPolygon} MultiPolygon.
* @return {module:ol/geom/MultiPolygon} MultiPolygon.
*/
function readMultiPolygonGeometry(object) {
return new MultiPolygon(object.coordinates);
@@ -191,7 +191,7 @@ function readMultiPolygonGeometry(object) {
/**
* @param {GeoJSONGeometry} object Object.
* @return {module:ol/geom/Polygon~Polygon} Polygon.
* @return {module:ol/geom/Polygon} Polygon.
*/
function readPolygonGeometry(object) {
return new Polygon(object.coordinates);
@@ -199,19 +199,19 @@ function readPolygonGeometry(object) {
/**
* @param {module:ol/geom/Geometry~Geometry} geometry Geometry.
* @param {module:ol/geom/Geometry} geometry Geometry.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {GeoJSONGeometry|GeoJSONGeometryCollection} GeoJSON geometry.
*/
function writeGeometry(geometry, opt_options) {
const geometryWriter = GEOMETRY_WRITERS[geometry.getType()];
return geometryWriter(/** @type {module:ol/geom/Geometry~Geometry} */ (
return geometryWriter(/** @type {module:ol/geom/Geometry} */ (
transformWithOptions(geometry, true, opt_options)), opt_options);
}
/**
* @param {module:ol/geom/Geometry~Geometry} geometry Geometry.
* @param {module:ol/geom/Geometry} geometry Geometry.
* @return {GeoJSONGeometryCollection} Empty GeoJSON geometry collection.
*/
function writeEmptyGeometryCollectionGeometry(geometry) {
@@ -223,7 +223,7 @@ function writeEmptyGeometryCollectionGeometry(geometry) {
/**
* @param {module:ol/geom/GeometryCollection~GeometryCollection} geometry Geometry.
* @param {module:ol/geom/GeometryCollection} geometry Geometry.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {GeoJSONGeometryCollection} GeoJSON geometry collection.
*/
@@ -241,7 +241,7 @@ function writeGeometryCollectionGeometry(geometry, opt_options) {
/**
* @param {module:ol/geom/LineString~LineString} geometry Geometry.
* @param {module:ol/geom/LineString} geometry Geometry.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {GeoJSONGeometry} GeoJSON geometry.
*/
@@ -254,7 +254,7 @@ function writeLineStringGeometry(geometry, opt_options) {
/**
* @param {module:ol/geom/MultiLineString~MultiLineString} geometry Geometry.
* @param {module:ol/geom/MultiLineString} geometry Geometry.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {GeoJSONGeometry} GeoJSON geometry.
*/
@@ -267,7 +267,7 @@ function writeMultiLineStringGeometry(geometry, opt_options) {
/**
* @param {module:ol/geom/MultiPoint~MultiPoint} geometry Geometry.
* @param {module:ol/geom/MultiPoint} geometry Geometry.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {GeoJSONGeometry} GeoJSON geometry.
*/
@@ -280,7 +280,7 @@ function writeMultiPointGeometry(geometry, opt_options) {
/**
* @param {module:ol/geom/MultiPolygon~MultiPolygon} geometry Geometry.
* @param {module:ol/geom/MultiPolygon} geometry Geometry.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {GeoJSONGeometry} GeoJSON geometry.
*/
@@ -297,7 +297,7 @@ function writeMultiPolygonGeometry(geometry, opt_options) {
/**
* @param {module:ol/geom/Point~Point} geometry Geometry.
* @param {module:ol/geom/Point} geometry Geometry.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {GeoJSONGeometry} GeoJSON geometry.
*/
@@ -310,7 +310,7 @@ function writePointGeometry(geometry, opt_options) {
/**
* @param {module:ol/geom/Polygon~Polygon} geometry Geometry.
* @param {module:ol/geom/Polygon} geometry Geometry.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {GeoJSONGeometry} GeoJSON geometry.
*/
@@ -330,12 +330,12 @@ function writePolygonGeometry(geometry, opt_options) {
* Read a feature from a GeoJSON Feature source. Only works for Feature or
* geometry types. Use {@link ol.format.GeoJSON#readFeatures} to read
* FeatureCollection source. If feature at source has an id, it will be used
* as Feature id by calling {@link module:ol/Feature~Feature#setId} internally.
* as Feature id by calling {@link module:ol/Feature#setId} internally.
*
* @function
* @param {Document|Node|Object|string} source Source.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @return {module:ol/Feature~Feature} Feature.
* @return {module:ol/Feature} Feature.
* @api
*/
GeoJSON.prototype.readFeature;
@@ -349,7 +349,7 @@ GeoJSON.prototype.readFeature;
* @function
* @param {Document|Node|Object|string} source Source.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @return {Array.<module:ol/Feature~Feature>} Features.
* @return {Array.<module:ol/Feature>} Features.
* @api
*/
GeoJSON.prototype.readFeatures;
@@ -395,7 +395,7 @@ GeoJSON.prototype.readFeatureFromObject = function(object, opt_options) {
*/
GeoJSON.prototype.readFeaturesFromObject = function(object, opt_options) {
const geoJSONObject = /** @type {GeoJSONObject} */ (object);
/** @type {Array.<module:ol/Feature~Feature>} */
/** @type {Array.<module:ol/Feature>} */
let features = null;
if (geoJSONObject.type === 'FeatureCollection') {
const geoJSONFeatureCollection = /** @type {GeoJSONFeatureCollection} */ (object);
@@ -417,7 +417,7 @@ GeoJSON.prototype.readFeaturesFromObject = function(object, opt_options) {
* @function
* @param {Document|Node|Object|string} source Source.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @return {module:ol/geom/Geometry~Geometry} Geometry.
* @return {module:ol/geom/Geometry} Geometry.
* @api
*/
GeoJSON.prototype.readGeometry;
@@ -436,7 +436,7 @@ GeoJSON.prototype.readGeometryFromObject = function(object, opt_options) {
*
* @function
* @param {Document|Node|Object|string} source Source.
* @return {module:ol/proj/Projection~Projection} Projection.
* @return {module:ol/proj/Projection} Projection.
* @api
*/
GeoJSON.prototype.readProjection;
@@ -458,7 +458,9 @@ GeoJSON.prototype.readProjectionFromObject = function(object) {
} else {
projection = this.defaultDataProjection;
}
return /** @type {module:ol/proj/Projection~Projection} */ (projection);
return (
/** @type {module:ol/proj/Projection} */ (projection)
);
};
@@ -466,7 +468,7 @@ GeoJSON.prototype.readProjectionFromObject = function(object) {
* Encode a feature as a GeoJSON Feature string.
*
* @function
* @param {module:ol/Feature~Feature} feature Feature.
* @param {module:ol/Feature} feature Feature.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {string} GeoJSON.
* @override
@@ -478,7 +480,7 @@ GeoJSON.prototype.writeFeature;
/**
* Encode a feature as a GeoJSON Feature object.
*
* @param {module:ol/Feature~Feature} feature Feature.
* @param {module:ol/Feature} feature Feature.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {GeoJSONFeature} Object.
* @override
@@ -515,7 +517,7 @@ GeoJSON.prototype.writeFeatureObject = function(feature, opt_options) {
* Encode an array of features as GeoJSON.
*
* @function
* @param {Array.<module:ol/Feature~Feature>} features Features.
* @param {Array.<module:ol/Feature>} features Features.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {string} GeoJSON.
* @api
@@ -526,7 +528,7 @@ GeoJSON.prototype.writeFeatures;
/**
* Encode an array of features as a GeoJSON object.
*
* @param {Array.<module:ol/Feature~Feature>} features Features.
* @param {Array.<module:ol/Feature>} features Features.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {GeoJSONFeatureCollection} GeoJSON Object.
* @override
@@ -549,7 +551,7 @@ GeoJSON.prototype.writeFeaturesObject = function(features, opt_options) {
* Encode a geometry as a GeoJSON string.
*
* @function
* @param {module:ol/geom/Geometry~Geometry} geometry Geometry.
* @param {module:ol/geom/Geometry} geometry Geometry.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {string} GeoJSON.
* @api
@@ -560,7 +562,7 @@ GeoJSON.prototype.writeGeometry;
/**
* Encode a geometry as a GeoJSON object.
*
* @param {module:ol/geom/Geometry~Geometry} geometry Geometry.
* @param {module:ol/geom/Geometry} geometry Geometry.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {GeoJSONGeometry|GeoJSONGeometryCollection} Object.
* @override

View File

@@ -32,7 +32,7 @@ const IGCZ = {
* Feature format for `*.igc` flight recording files.
*
* @constructor
* @extends {module:ol/format/TextFeature~TextFeature}
* @extends {module:ol/format/TextFeature}
* @param {module:ol/format/IGC~Options=} opt_options Options.
* @api
*/
@@ -94,7 +94,7 @@ const NEWLINE_RE = /\r\n|\r|\n/;
* @function
* @param {Document|Node|Object|string} source Source.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @return {module:ol/Feature~Feature} Feature.
* @return {module:ol/Feature} Feature.
* @api
*/
IGC.prototype.readFeature;
@@ -184,7 +184,7 @@ IGC.prototype.readFeatureFromText = function(text, opt_options) {
* @function
* @param {Document|Node|Object|string} source Source.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @return {Array.<module:ol/Feature~Feature>} Features.
* @return {Array.<module:ol/Feature>} Features.
* @api
*/
IGC.prototype.readFeatures;
@@ -208,7 +208,7 @@ IGC.prototype.readFeaturesFromText = function(text, opt_options) {
*
* @function
* @param {Document|Node|Object|string} source Source.
* @return {module:ol/proj/Projection~Projection} Projection.
* @return {module:ol/proj/Projection} Projection.
* @api
*/
IGC.prototype.readProjection;

View File

@@ -13,7 +13,7 @@ import FormatType from '../format/FormatType.js';
*
* @constructor
* @abstract
* @extends {module:ol/format/Feature~FeatureFormat}
* @extends {module:ol/format/Feature}
*/
const JSONFeature = function() {
FeatureFormat.call(this);
@@ -69,7 +69,7 @@ JSONFeature.prototype.readFeatures = function(source, opt_options) {
* @param {Object} object Object.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @protected
* @return {module:ol/Feature~Feature} Feature.
* @return {module:ol/Feature} Feature.
*/
JSONFeature.prototype.readFeatureFromObject = function(object, opt_options) {};
@@ -79,7 +79,7 @@ JSONFeature.prototype.readFeatureFromObject = function(object, opt_options) {};
* @param {Object} object Object.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @protected
* @return {Array.<module:ol/Feature~Feature>} Features.
* @return {Array.<module:ol/Feature>} Features.
*/
JSONFeature.prototype.readFeaturesFromObject = function(object, opt_options) {};
@@ -98,7 +98,7 @@ JSONFeature.prototype.readGeometry = function(source, opt_options) {
* @param {Object} object Object.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @protected
* @return {module:ol/geom/Geometry~Geometry} Geometry.
* @return {module:ol/geom/Geometry} Geometry.
*/
JSONFeature.prototype.readGeometryFromObject = function(object, opt_options) {};
@@ -115,7 +115,7 @@ JSONFeature.prototype.readProjection = function(source) {
* @abstract
* @param {Object} object Object.
* @protected
* @return {module:ol/proj/Projection~Projection} Projection.
* @return {module:ol/proj/Projection} Projection.
*/
JSONFeature.prototype.readProjectionFromObject = function(object) {};
@@ -130,7 +130,7 @@ JSONFeature.prototype.writeFeature = function(feature, opt_options) {
/**
* @abstract
* @param {module:ol/Feature~Feature} feature Feature.
* @param {module:ol/Feature} feature Feature.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {Object} Object.
*/
@@ -147,7 +147,7 @@ JSONFeature.prototype.writeFeatures = function(features, opt_options) {
/**
* @abstract
* @param {Array.<module:ol/Feature~Feature>} features Features.
* @param {Array.<module:ol/Feature>} features Features.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {Object} Object.
*/
@@ -164,7 +164,7 @@ JSONFeature.prototype.writeGeometry = function(geometry, opt_options) {
/**
* @abstract
* @param {module:ol/geom/Geometry~Geometry} geometry Geometry.
* @param {module:ol/geom/Geometry} geometry Geometry.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {Object} Object.
*/

View File

@@ -54,13 +54,13 @@ import {createElementNS, getAllTextContent, isDocument, isNode, makeArrayExtende
let DEFAULT_COLOR;
/**
* @type {module:ol/style/Fill~Fill}
* @type {module:ol/style/Fill}
*/
let DEFAULT_FILL_STYLE = null;
/**
* Get the default fill style (or null if not yet set).
* @return {module:ol/style/Fill~Fill} The default fill style.
* @return {module:ol/style/Fill} The default fill style.
*/
export function getDefaultFillStyle() {
return DEFAULT_FILL_STYLE;
@@ -97,13 +97,13 @@ let DEFAULT_IMAGE_STYLE_SRC;
let DEFAULT_IMAGE_SCALE_MULTIPLIER;
/**
* @type {module:ol/style/Image~ImageStyle}
* @type {module:ol/style/Image}
*/
let DEFAULT_IMAGE_STYLE = null;
/**
* Get the default image style (or null if not yet set).
* @return {module:ol/style/Image~ImageStyle} The default image style.
* @return {module:ol/style/Image} The default image style.
*/
export function getDefaultImageStyle() {
return DEFAULT_IMAGE_STYLE;
@@ -115,57 +115,57 @@ export function getDefaultImageStyle() {
let DEFAULT_NO_IMAGE_STYLE;
/**
* @type {module:ol/style/Stroke~Stroke}
* @type {module:ol/style/Stroke}
*/
let DEFAULT_STROKE_STYLE = null;
/**
* Get the default stroke style (or null if not yet set).
* @return {module:ol/style/Stroke~Stroke} The default stroke style.
* @return {module:ol/style/Stroke} The default stroke style.
*/
export function getDefaultStrokeStyle() {
return DEFAULT_STROKE_STYLE;
}
/**
* @type {module:ol/style/Stroke~Stroke}
* @type {module:ol/style/Stroke}
*/
let DEFAULT_TEXT_STROKE_STYLE;
/**
* @type {module:ol/style/Text~Text}
* @type {module:ol/style/Text}
*/
let DEFAULT_TEXT_STYLE = null;
/**
* Get the default text style (or null if not yet set).
* @return {module:ol/style/Text~Text} The default text style.
* @return {module:ol/style/Text} The default text style.
*/
export function getDefaultTextStyle() {
return DEFAULT_TEXT_STYLE;
}
/**
* @type {module:ol/style/Style~Style}
* @type {module:ol/style/Style}
*/
let DEFAULT_STYLE = null;
/**
* Get the default style (or null if not yet set).
* @return {module:ol/style/Style~Style} The default style.
* @return {module:ol/style/Style} The default style.
*/
export function getDefaultStyle() {
return DEFAULT_STYLE;
}
/**
* @type {Array.<module:ol/style/Style~Style>}
* @type {Array.<module:ol/style/Style>}
*/
let DEFAULT_STYLE_ARRAY = null;
/**
* Get the default style array (or null if not yet set).
* @return {Array.<module:ol/style/Style~Style>} The default style.
* @return {Array.<module:ol/style/Style>} The default style.
*/
export function getDefaultStyleArray() {
return DEFAULT_STYLE_ARRAY;
@@ -234,7 +234,7 @@ function createStyleDefaults() {
/**
* @const
* @type {Array.<module:ol/style/Style~Style>}
* @type {Array.<module:ol/style/Style>}
* @private
*/
DEFAULT_STYLE_ARRAY = [DEFAULT_STYLE];
@@ -246,7 +246,7 @@ function createStyleDefaults() {
* @typedef {Object} Options
* @property {boolean} [extractStyles=true] Extract styles from the KML.
* @property {boolean} [showPointNames=true] Show names as labels for placemarks which contain points.
* @property {Array.<module:ol/style/Style~Style>} [defaultStyle] Default style. The
* @property {Array.<module:ol/style/Style>} [defaultStyle] Default style. The
* default default style is the same as Google Earth.
* @property {boolean} [writeStyles=true] Write styles into KML.
*/
@@ -260,7 +260,7 @@ function createStyleDefaults() {
* which do not support this will need a URL polyfill to be loaded before use.
*
* @constructor
* @extends {module:ol/format/XMLFeature~XMLFeature}
* @extends {module:ol/format/XMLFeature}
* @param {module:ol/format/KML~Options=} opt_options Options.
* @api
*/
@@ -281,7 +281,7 @@ const KML = function(opt_options) {
/**
* @private
* @type {Array.<module:ol/style/Style~Style>}
* @type {Array.<module:ol/style/Style>}
*/
this.defaultStyle_ = options.defaultStyle ?
options.defaultStyle : DEFAULT_STYLE_ARRAY;
@@ -302,7 +302,7 @@ const KML = function(opt_options) {
/**
* @private
* @type {!Object.<string, (Array.<module:ol/style/Style~Style>|string)>}
* @type {!Object.<string, (Array.<module:ol/style/Style>|string)>}
*/
this.sharedStyles_ = {};
@@ -359,9 +359,9 @@ const ICON_ANCHOR_UNITS_MAP = {
/**
* @param {module:ol/style/Style~Style|undefined} foundStyle Style.
* @param {module:ol/style/Style|undefined} foundStyle Style.
* @param {string} name Name.
* @return {module:ol/style/Style~Style} style Style.
* @return {module:ol/style/Style} style Style.
*/
function createNameStyleFunction(foundStyle, name) {
let textStyle = null;
@@ -406,10 +406,10 @@ function createNameStyleFunction(foundStyle, name) {
/**
* @param {Array.<module:ol/style/Style~Style>|undefined} style Style.
* @param {Array.<module:ol/style/Style>|undefined} style Style.
* @param {string} styleUrl Style URL.
* @param {Array.<module:ol/style/Style~Style>} defaultStyle Default style.
* @param {!Object.<string, (Array.<module:ol/style/Style~Style>|string)>} sharedStyles Shared styles.
* @param {Array.<module:ol/style/Style>} defaultStyle Default style.
* @param {!Object.<string, (Array.<module:ol/style/Style>|string)>} sharedStyles Shared styles.
* @param {boolean|undefined} showPointNames true to show names for point placemarks.
* @return {module:ol/style~StyleFunction} Feature style function.
*/
@@ -417,13 +417,13 @@ function createFeatureStyleFunction(style, styleUrl, defaultStyle, sharedStyles,
return (
/**
* @param {module:ol/Feature~Feature} feature feature.
* @param {module:ol/Feature} feature feature.
* @param {number} resolution Resolution.
* @return {Array.<module:ol/style/Style~Style>} Style.
* @return {Array.<module:ol/style/Style>} Style.
*/
function(feature, resolution) {
let drawName = showPointNames;
/** @type {module:ol/style/Style~Style|undefined} */
/** @type {module:ol/style/Style|undefined} */
let nameStyle;
let name = '';
if (drawName) {
@@ -464,11 +464,11 @@ function createFeatureStyleFunction(style, styleUrl, defaultStyle, sharedStyles,
/**
* @param {Array.<module:ol/style/Style~Style>|string|undefined} styleValue Style value.
* @param {Array.<module:ol/style/Style~Style>} defaultStyle Default style.
* @param {!Object.<string, (Array.<module:ol/style/Style~Style>|string)>} sharedStyles
* @param {Array.<module:ol/style/Style>|string|undefined} styleValue Style value.
* @param {Array.<module:ol/style/Style>} defaultStyle Default style.
* @param {!Object.<string, (Array.<module:ol/style/Style>|string)>} sharedStyles
* Shared styles.
* @return {Array.<module:ol/style/Style~Style>} Style.
* @return {Array.<module:ol/style/Style>} Style.
*/
function findStyle(styleValue, defaultStyle, sharedStyles) {
if (Array.isArray(styleValue)) {
@@ -609,7 +609,7 @@ const STYLE_MAP_PARSERS = makeStructureNS(
/**
* @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack.
* @return {Array.<module:ol/style/Style~Style>|string|undefined} StyleMap.
* @return {Array.<module:ol/style/Style>|string|undefined} StyleMap.
*/
function readStyleMapValue(node, objectStack) {
return pushParseAndPop(undefined,
@@ -901,7 +901,7 @@ const GX_MULTITRACK_GEOMETRY_PARSERS = makeStructureNS(
/**
* @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack.
* @return {module:ol/geom/MultiLineString~MultiLineString|undefined} MultiLineString.
* @return {module:ol/geom/MultiLineString|undefined} MultiLineString.
*/
function readGxMultiTrack(node, objectStack) {
const lineStrings = pushParseAndPop([],
@@ -931,7 +931,7 @@ const GX_TRACK_PARSERS = makeStructureNS(
/**
* @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack.
* @return {module:ol/geom/LineString~LineString|undefined} LineString.
* @return {module:ol/geom/LineString|undefined} LineString.
*/
function readGxTrack(node, objectStack) {
const gxTrackObject = pushParseAndPop(
@@ -1021,7 +1021,7 @@ const EXTRUDE_AND_ALTITUDE_MODE_PARSERS = makeStructureNS(
/**
* @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack.
* @return {module:ol/geom/LineString~LineString|undefined} LineString.
* @return {module:ol/geom/LineString|undefined} LineString.
*/
function readLineString(node, objectStack) {
const properties = pushParseAndPop({},
@@ -1043,7 +1043,7 @@ function readLineString(node, objectStack) {
/**
* @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack.
* @return {module:ol/geom/Polygon~Polygon|undefined} Polygon.
* @return {module:ol/geom/Polygon|undefined} Polygon.
*/
function readLinearRing(node, objectStack) {
const properties = pushParseAndPop({},
@@ -1080,7 +1080,7 @@ const MULTI_GEOMETRY_PARSERS = makeStructureNS(
/**
* @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack.
* @return {module:ol/geom/Geometry~Geometry} Geometry.
* @return {module:ol/geom/Geometry} Geometry.
*/
function readMultiGeometry(node, objectStack) {
const geometries = pushParseAndPop([],
@@ -1091,7 +1091,7 @@ function readMultiGeometry(node, objectStack) {
if (geometries.length === 0) {
return new GeometryCollection(geometries);
}
/** @type {module:ol/geom/Geometry~Geometry} */
/** @type {module:ol/geom/Geometry} */
let multiGeometry;
let homogeneous = true;
const type = geometries[0].getType();
@@ -1133,14 +1133,16 @@ function readMultiGeometry(node, objectStack) {
} else {
multiGeometry = new GeometryCollection(geometries);
}
return /** @type {module:ol/geom/Geometry~Geometry} */ (multiGeometry);
return (
/** @type {module:ol/geom/Geometry} */ (multiGeometry)
);
}
/**
* @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack.
* @return {module:ol/geom/Point~Point|undefined} Point.
* @return {module:ol/geom/Point|undefined} Point.
*/
function readPoint(node, objectStack) {
const properties = pushParseAndPop({},
@@ -1173,7 +1175,7 @@ const FLAT_LINEAR_RINGS_PARSERS = makeStructureNS(
/**
* @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack.
* @return {module:ol/geom/Polygon~Polygon|undefined} Polygon.
* @return {module:ol/geom/Polygon|undefined} Polygon.
*/
function readPolygon(node, objectStack) {
const properties = pushParseAndPop(/** @type {Object<string,*>} */ ({}),
@@ -1214,7 +1216,7 @@ const STYLE_PARSERS = makeStructureNS(
/**
* @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack.
* @return {Array.<module:ol/style/Style~Style>} Style.
* @return {Array.<module:ol/style/Style>} Style.
*/
function readStyle(node, objectStack) {
const styleObject = pushParseAndPop(
@@ -1222,23 +1224,23 @@ function readStyle(node, objectStack) {
if (!styleObject) {
return null;
}
let fillStyle = /** @type {module:ol/style/Fill~Fill} */
let fillStyle = /** @type {module:ol/style/Fill} */
('fillStyle' in styleObject ?
styleObject['fillStyle'] : DEFAULT_FILL_STYLE);
const fill = /** @type {boolean|undefined} */ (styleObject['fill']);
if (fill !== undefined && !fill) {
fillStyle = null;
}
let imageStyle = /** @type {module:ol/style/Image~ImageStyle} */
let imageStyle = /** @type {module:ol/style/Image} */
('imageStyle' in styleObject ?
styleObject['imageStyle'] : DEFAULT_IMAGE_STYLE);
if (imageStyle == DEFAULT_NO_IMAGE_STYLE) {
imageStyle = undefined;
}
const textStyle = /** @type {module:ol/style/Text~Text} */
const textStyle = /** @type {module:ol/style/Text} */
('textStyle' in styleObject ?
styleObject['textStyle'] : DEFAULT_TEXT_STYLE);
let strokeStyle = /** @type {module:ol/style/Stroke~Stroke} */
let strokeStyle = /** @type {module:ol/style/Stroke} */
('strokeStyle' in styleObject ?
styleObject['strokeStyle'] : DEFAULT_STROKE_STYLE);
const outline = /** @type {boolean|undefined} */
@@ -1259,9 +1261,9 @@ function readStyle(node, objectStack) {
/**
* Reads an array of geometries and creates arrays for common geometry
* properties. Then sets them to the multi geometry.
* @param {module:ol/geom/MultiPoint~MultiPoint|module:ol/geom/MultiLineString~MultiLineString|module:ol/geom/MultiPolygon~MultiPolygon}
* @param {module:ol/geom/MultiPoint|module:ol/geom/MultiLineString|module:ol/geom/MultiPolygon}
* multiGeometry A multi-geometry.
* @param {Array.<module:ol/geom/Geometry~Geometry>} geometries List of geometries.
* @param {Array.<module:ol/geom/Geometry>} geometries List of geometries.
*/
function setCommonGeometryProperties(multiGeometry, geometries) {
const ii = geometries.length;
@@ -1387,7 +1389,7 @@ function pairDataParser(node, objectStack) {
if (styleUrl) {
objectStack[objectStack.length - 1] = styleUrl;
}
const Style = /** @type {module:ol/style/Style~Style} */
const Style = /** @type {module:ol/style/Style} */
(pairObject['Style']);
if (Style) {
objectStack[objectStack.length - 1] = Style;
@@ -1662,7 +1664,7 @@ const PLACEMARK_PARSERS = makeStructureNS(
* @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack.
* @private
* @return {Array.<module:ol/Feature~Feature>|undefined} Features.
* @return {Array.<module:ol/Feature>|undefined} Features.
*/
KML.prototype.readDocumentOrFolder_ = function(node, objectStack) {
// FIXME use scope somehow
@@ -1674,7 +1676,7 @@ KML.prototype.readDocumentOrFolder_ = function(node, objectStack) {
'Style': this.readSharedStyle_.bind(this),
'StyleMap': this.readSharedStyleMap_.bind(this)
});
/** @type {Array.<module:ol/Feature~Feature>} */
/** @type {Array.<module:ol/Feature>} */
const features = pushParseAndPop([], parsersNS, node, objectStack, this);
if (features) {
return features;
@@ -1688,7 +1690,7 @@ KML.prototype.readDocumentOrFolder_ = function(node, objectStack) {
* @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack.
* @private
* @return {module:ol/Feature~Feature|undefined} Feature.
* @return {module:ol/Feature|undefined} Feature.
*/
KML.prototype.readPlacemark_ = function(node, objectStack) {
const object = pushParseAndPop({'geometry': null},
@@ -1792,7 +1794,7 @@ KML.prototype.readSharedStyleMap_ = function(node, objectStack) {
* @function
* @param {Document|Node|Object|string} source Source.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @return {module:ol/Feature~Feature} Feature.
* @return {module:ol/Feature} Feature.
* @api
*/
KML.prototype.readFeature;
@@ -1823,7 +1825,7 @@ KML.prototype.readFeatureFromNode = function(node, opt_options) {
* @function
* @param {Document|Node|Object|string} source Source.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @return {Array.<module:ol/Feature~Feature>} Features.
* @return {Array.<module:ol/Feature>} Features.
* @api
*/
KML.prototype.readFeatures;
@@ -2071,7 +2073,7 @@ KML.prototype.readRegionFromNode = function(node) {
*
* @function
* @param {Document|Node|Object|string} source Source.
* @return {module:ol/proj/Projection~Projection} Projection.
* @return {module:ol/proj/Projection} Projection.
* @api
*/
KML.prototype.readProjection;
@@ -2215,9 +2217,9 @@ const DOCUMENT_NODE_FACTORY = function(value, objectStack, opt_nodeName) {
/**
* @param {Node} node Node.
* @param {Array.<module:ol/Feature~Feature>} features Features.
* @param {Array.<module:ol/Feature>} features Features.
* @param {Array.<*>} objectStack Object stack.
* @this {module:ol/format/KML~KML}
* @this {module:ol/format/KML}
*/
function writeDocument(node, features, objectStack) {
const /** @type {module:ol/xml~NodeStackItem} */ context = {node: node};
@@ -2341,7 +2343,7 @@ const ICON_STYLE_SERIALIZERS = makeStructureNS(
/**
* @param {Node} node Node.
* @param {module:ol/style/Icon~Icon} style Icon style.
* @param {module:ol/style/Icon} style Icon style.
* @param {Array.<*>} objectStack Object stack.
*/
function writeIconStyle(node, style, objectStack) {
@@ -2419,7 +2421,7 @@ const LABEL_STYLE_SERIALIZERS = makeStructureNS(
/**
* @param {Node} node Node.
* @param {module:ol/style/Text~Text} style style.
* @param {module:ol/style/Text} style style.
* @param {Array.<*>} objectStack Object stack.
*/
function writeLabelStyle(node, style, objectStack) {
@@ -2465,7 +2467,7 @@ const LINE_STYLE_SERIALIZERS = makeStructureNS(
/**
* @param {Node} node Node.
* @param {module:ol/style/Stroke~Stroke} style style.
* @param {module:ol/style/Stroke} style style.
* @param {Array.<*>} objectStack Object stack.
*/
function writeLineStyle(node, style, objectStack) {
@@ -2509,7 +2511,7 @@ const GEOMETRY_NODE_FACTORY = function(value, objectStack, opt_nodeName) {
if (value) {
const parentNode = objectStack[objectStack.length - 1].node;
return createElementNS(parentNode.namespaceURI,
GEOMETRY_TYPE_TO_NODENAME[/** @type {module:ol/geom/Geometry~Geometry} */ (value).getType()]);
GEOMETRY_TYPE_TO_NODENAME[/** @type {module:ol/geom/Geometry} */ (value).getType()]);
}
};
@@ -2564,30 +2566,30 @@ const MULTI_GEOMETRY_SERIALIZERS = makeStructureNS(
/**
* @param {Node} node Node.
* @param {module:ol/geom/Geometry~Geometry} geometry Geometry.
* @param {module:ol/geom/Geometry} geometry Geometry.
* @param {Array.<*>} objectStack Object stack.
*/
function writeMultiGeometry(node, geometry, objectStack) {
/** @type {module:ol/xml~NodeStackItem} */
const context = {node: node};
const type = geometry.getType();
/** @type {Array.<module:ol/geom/Geometry~Geometry>} */
/** @type {Array.<module:ol/geom/Geometry>} */
let geometries;
/** @type {function(*, Array.<*>, string=): (Node|undefined)} */
let factory;
if (type == GeometryType.GEOMETRY_COLLECTION) {
geometries = /** @type {module:ol/geom/GeometryCollection~GeometryCollection} */ (geometry).getGeometries();
geometries = /** @type {module:ol/geom/GeometryCollection} */ (geometry).getGeometries();
factory = GEOMETRY_NODE_FACTORY;
} else if (type == GeometryType.MULTI_POINT) {
geometries = /** @type {module:ol/geom/MultiPoint~MultiPoint} */ (geometry).getPoints();
geometries = /** @type {module:ol/geom/MultiPoint} */ (geometry).getPoints();
factory = POINT_NODE_FACTORY;
} else if (type == GeometryType.MULTI_LINE_STRING) {
geometries =
(/** @type {module:ol/geom/MultiLineString~MultiLineString} */ (geometry)).getLineStrings();
(/** @type {module:ol/geom/MultiLineString} */ (geometry)).getLineStrings();
factory = LINE_STRING_NODE_FACTORY;
} else if (type == GeometryType.MULTI_POLYGON) {
geometries =
(/** @type {module:ol/geom/MultiPolygon~MultiPolygon} */ (geometry)).getPolygons();
(/** @type {module:ol/geom/MultiPolygon} */ (geometry)).getPolygons();
factory = POLYGON_NODE_FACTORY;
} else {
assert(false, 39); // Unknown geometry type
@@ -2611,7 +2613,7 @@ const BOUNDARY_IS_SERIALIZERS = makeStructureNS(
/**
* @param {Node} node Node.
* @param {module:ol/geom/LinearRing~LinearRing} linearRing Linear ring.
* @param {module:ol/geom/LinearRing} linearRing Linear ring.
* @param {Array.<*>} objectStack Object stack.
*/
function writeBoundaryIs(node, linearRing, objectStack) {
@@ -2668,9 +2670,9 @@ const EXTENDEDDATA_NODE_FACTORY = makeSimpleNodeFactory('ExtendedData');
* FIXME currently we do serialize arbitrary/custom feature properties
* (ExtendedData).
* @param {Node} node Node.
* @param {module:ol/Feature~Feature} feature Feature.
* @param {module:ol/Feature} feature Feature.
* @param {Array.<*>} objectStack Object stack.
* @this {module:ol/format/KML~KML}
* @this {module:ol/format/KML}
*/
function writePlacemark(node, feature, objectStack) {
const /** @type {module:ol/xml~NodeStackItem} */ context = {node: node};
@@ -2756,7 +2758,7 @@ const PRIMITIVE_GEOMETRY_SERIALIZERS = makeStructureNS(
/**
* @param {Node} node Node.
* @param {module:ol/geom/SimpleGeometry~SimpleGeometry} geometry Geometry.
* @param {module:ol/geom/SimpleGeometry} geometry Geometry.
* @param {Array.<*>} objectStack Object stack.
*/
function writePrimitiveGeometry(node, geometry, objectStack) {
@@ -2808,7 +2810,7 @@ const OUTER_BOUNDARY_NODE_FACTORY = makeSimpleNodeFactory('outerBoundaryIs');
/**
* @param {Node} node Node.
* @param {module:ol/geom/Polygon~Polygon} polygon Polygon.
* @param {module:ol/geom/Polygon} polygon Polygon.
* @param {Array.<*>} objectStack Object stack.
*/
function writePolygon(node, polygon, objectStack) {
@@ -2848,7 +2850,7 @@ const COLOR_NODE_FACTORY = makeSimpleNodeFactory('color');
/**
* @param {Node} node Node.
* @param {module:ol/style/Fill~Fill} style Style.
* @param {module:ol/style/Fill} style Style.
* @param {Array.<*>} objectStack Object stack.
*/
function writePolyStyle(node, style, objectStack) {
@@ -2894,7 +2896,7 @@ const STYLE_SERIALIZERS = makeStructureNS(
/**
* @param {Node} node Node.
* @param {module:ol/style/Style~Style} style Style.
* @param {module:ol/style/Style} style Style.
* @param {Array.<*>} objectStack Object stack.
*/
function writeStyle(node, style, objectStack) {
@@ -2962,7 +2964,7 @@ const KML_SERIALIZERS = makeStructureNS(
* MultiLineStrings, and MultiPolygons are output as MultiGeometries.
*
* @function
* @param {Array.<module:ol/Feature~Feature>} features Features.
* @param {Array.<module:ol/Feature>} features Features.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Options.
* @return {string} Result.
* @api
@@ -2974,7 +2976,7 @@ KML.prototype.writeFeatures;
* Encode an array of features in the KML format as an XML node. GeometryCollections,
* MultiPoints, MultiLineStrings, and MultiPolygons are output as MultiGeometries.
*
* @param {Array.<module:ol/Feature~Feature>} features Features.
* @param {Array.<module:ol/Feature>} features Features.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Options.
* @return {Node} Node.
* @override

View File

@@ -24,7 +24,7 @@ import RenderFeature from '../render/Feature.js';
/**
* @typedef {Object} Options
* @property {function((module:ol/geom/Geometry~Geometry|Object.<string,*>)=)|function(module:ol/geom/GeometryType,Array.<number>,(Array.<number>|Array.<Array.<number>>),Object.<string,*>,number)} [featureClass]
* @property {function((module:ol/geom/Geometry|Object.<string,*>)=)|function(module:ol/geom/GeometryType,Array.<number>,(Array.<number>|Array.<Array.<number>>),Object.<string,*>,number)} [featureClass]
* Class for features returned by {@link ol.format.MVT#readFeatures}. Set to
* {@link module:ol/Feature~Feature} to get full editing and geometry support at the cost of
* decreased rendering performance. The default is {@link module:ol/render/Feature~RenderFeature},
@@ -43,7 +43,7 @@ import RenderFeature from '../render/Feature.js';
* Feature format for reading data in the Mapbox MVT format.
*
* @constructor
* @extends {module:ol/format/Feature~FeatureFormat}
* @extends {module:ol/format/Feature}
* @param {module:ol/format/MVT~Options=} opt_options Options.
* @api
*/
@@ -54,7 +54,7 @@ const MVT = function(opt_options) {
const options = opt_options ? opt_options : {};
/**
* @type {module:ol/proj/Projection~Projection}
* @type {module:ol/proj/Projection}
*/
this.defaultDataProjection = new Projection({
code: '',
@@ -63,7 +63,7 @@ const MVT = function(opt_options) {
/**
* @private
* @type {function((module:ol/geom/Geometry~Geometry|Object.<string,*>)=)|
* @type {function((module:ol/geom/Geometry|Object.<string,*>)=)|
* function(module:ol/geom/GeometryType,Array.<number>,
* (Array.<number>|Array.<Array.<number>>),Object.<string,*>,number)}
*/
@@ -297,7 +297,7 @@ function getGeometryType(type, numEnds) {
* @param {ol.ext.PBF} pbf PBF
* @param {Object} rawFeature Raw Mapbox feature.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @return {module:ol/Feature~Feature|module:ol/render/Feature~RenderFeature} Feature.
* @return {module:ol/Feature|module:ol/render/Feature} Feature.
*/
MVT.prototype.createFeature_ = function(pbf, rawFeature, opt_options) {
const type = rawFeature.type;
@@ -387,7 +387,7 @@ MVT.prototype.readFeatures = function(source, opt_options) {
const pbf = new PBF(/** @type {ArrayBuffer} */ (source));
const pbfLayers = pbf.readFields(layersPBFReader, {});
/** @type {Array.<module:ol/Feature~Feature|module:ol/render/Feature~RenderFeature>} */
/** @type {Array.<module:ol/Feature|module:ol/render/Feature>} */
const features = [];
for (const name in pbfLayers) {
if (layers && layers.indexOf(name) == -1) {

View File

@@ -21,7 +21,7 @@ import {pushParseAndPop, makeStructureNS} from '../xml.js';
* [OSMXML format](http://wiki.openstreetmap.org/wiki/OSM_XML).
*
* @constructor
* @extends {module:ol/format/XMLFeature~XMLFeature}
* @extends {module:ol/format/XMLFeature}
* @api
*/
const OSMXML = function() {
@@ -146,7 +146,7 @@ function readTag(node, objectStack) {
* @function
* @param {Document|Node|Object|string} source Source.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @return {Array.<module:ol/Feature~Feature>} Features.
* @return {Array.<module:ol/Feature>} Features.
* @api
*/
OSMXML.prototype.readFeatures;
@@ -201,7 +201,7 @@ OSMXML.prototype.readFeaturesFromNode = function(node, opt_options) {
*
* @function
* @param {Document|Node|Object|string} source Source.
* @return {module:ol/proj/Projection~Projection} Projection.
* @return {module:ol/proj/Projection} Projection.
* @api
*/
OSMXML.prototype.readProjection;

View File

@@ -9,7 +9,7 @@ import {makeObjectPropertyPusher, makeObjectPropertySetter, makeStructureNS, pus
/**
* @constructor
* @extends {module:ol/format/XML~XML}
* @extends {module:ol/format/XML}
*/
const OWS = function() {
XML.call(this);

View File

@@ -28,7 +28,7 @@ import {get as getProjection} from '../proj.js';
* Polyline Algorithm Format.
*
* @constructor
* @extends {module:ol/format/TextFeature~TextFeature}
* @extends {module:ol/format/TextFeature}
* @param {module:ol/format/Polyline~Options=} opt_options Optional configuration object.
* @api
*/
@@ -271,7 +271,7 @@ export function encodeUnsignedInteger(num) {
* @function
* @param {Document|Node|Object|string} source Source.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @return {module:ol/Feature~Feature} Feature.
* @return {module:ol/Feature} Feature.
* @api
*/
Polyline.prototype.readFeature;
@@ -293,7 +293,7 @@ Polyline.prototype.readFeatureFromText = function(text, opt_options) {
* @function
* @param {Document|Node|Object|string} source Source.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @return {Array.<module:ol/Feature~Feature>} Features.
* @return {Array.<module:ol/Feature>} Features.
* @api
*/
Polyline.prototype.readFeatures;
@@ -314,7 +314,7 @@ Polyline.prototype.readFeaturesFromText = function(text, opt_options) {
* @function
* @param {Document|Node|Object|string} source Source.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @return {module:ol/geom/Geometry~Geometry} Geometry.
* @return {module:ol/geom/Geometry} Geometry.
* @api
*/
Polyline.prototype.readGeometry;
@@ -329,9 +329,12 @@ Polyline.prototype.readGeometryFromText = function(text, opt_options) {
flipXY(flatCoordinates, 0, flatCoordinates.length, stride, flatCoordinates);
const coordinates = inflateCoordinates(flatCoordinates, 0, flatCoordinates.length, stride);
return /** @type {module:ol/geom/Geometry~Geometry} */ (transformWithOptions(
new LineString(coordinates, this.geometryLayout_), false,
this.adaptOptions(opt_options))
return (
/** @type {module:ol/geom/Geometry} */ (transformWithOptions(
new LineString(coordinates, this.geometryLayout_),
false,
this.adaptOptions(opt_options)
))
);
};
@@ -341,7 +344,7 @@ Polyline.prototype.readGeometryFromText = function(text, opt_options) {
*
* @function
* @param {Document|Node|Object|string} source Source.
* @return {module:ol/proj/Projection~Projection} Projection.
* @return {module:ol/proj/Projection} Projection.
* @api
*/
Polyline.prototype.readProjection;
@@ -373,7 +376,7 @@ Polyline.prototype.writeFeaturesText = function(features, opt_options) {
* Write a single geometry in Polyline format.
*
* @function
* @param {module:ol/geom/Geometry~Geometry} geometry Geometry.
* @param {module:ol/geom/Geometry} geometry Geometry.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {string} Geometry.
* @api
@@ -385,7 +388,7 @@ Polyline.prototype.writeGeometry;
* @inheritDoc
*/
Polyline.prototype.writeGeometryText = function(geometry, opt_options) {
geometry = /** @type {module:ol/geom/LineString~LineString} */
geometry = /** @type {module:ol/geom/LineString} */
(transformWithOptions(geometry, true, this.adaptOptions(opt_options)));
const flatCoordinates = geometry.getFlatCoordinates();
const stride = geometry.getStride();

View File

@@ -13,7 +13,7 @@ import FormatType from '../format/FormatType.js';
*
* @constructor
* @abstract
* @extends {module:ol/format/Feature~FeatureFormat}
* @extends {module:ol/format/Feature}
*/
const TextFeature = function() {
FeatureFormat.call(this);
@@ -56,7 +56,7 @@ TextFeature.prototype.readFeature = function(source, opt_options) {
* @param {string} text Text.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @protected
* @return {module:ol/Feature~Feature} Feature.
* @return {module:ol/Feature} Feature.
*/
TextFeature.prototype.readFeatureFromText = function(text, opt_options) {};
@@ -74,7 +74,7 @@ TextFeature.prototype.readFeatures = function(source, opt_options) {
* @param {string} text Text.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @protected
* @return {Array.<module:ol/Feature~Feature>} Features.
* @return {Array.<module:ol/Feature>} Features.
*/
TextFeature.prototype.readFeaturesFromText = function(text, opt_options) {};
@@ -92,7 +92,7 @@ TextFeature.prototype.readGeometry = function(source, opt_options) {
* @param {string} text Text.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @protected
* @return {module:ol/geom/Geometry~Geometry} Geometry.
* @return {module:ol/geom/Geometry} Geometry.
*/
TextFeature.prototype.readGeometryFromText = function(text, opt_options) {};
@@ -108,7 +108,7 @@ TextFeature.prototype.readProjection = function(source) {
/**
* @param {string} text Text.
* @protected
* @return {module:ol/proj/Projection~Projection} Projection.
* @return {module:ol/proj/Projection} Projection.
*/
TextFeature.prototype.readProjectionFromText = function(text) {
return this.defaultDataProjection;
@@ -125,7 +125,7 @@ TextFeature.prototype.writeFeature = function(feature, opt_options) {
/**
* @abstract
* @param {module:ol/Feature~Feature} feature Features.
* @param {module:ol/Feature} feature Features.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @protected
* @return {string} Text.
@@ -143,7 +143,7 @@ TextFeature.prototype.writeFeatures = function(features, opt_options) {
/**
* @abstract
* @param {Array.<module:ol/Feature~Feature>} features Features.
* @param {Array.<module:ol/Feature>} features Features.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @protected
* @return {string} Text.
@@ -161,7 +161,7 @@ TextFeature.prototype.writeGeometry = function(geometry, opt_options) {
/**
* @abstract
* @param {module:ol/geom/Geometry~Geometry} geometry Geometry.
* @param {module:ol/geom/Geometry} geometry Geometry.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @protected
* @return {string} Text.

View File

@@ -44,7 +44,7 @@ import {get as getProjection} from '../proj.js';
* Feature format for reading data in the TopoJSON format.
*
* @constructor
* @extends {module:ol/format/JSONFeature~JSONFeature}
* @extends {module:ol/format/JSONFeature}
* @param {module:ol/format/TopoJSON~Options=} opt_options Options.
* @api
*/
@@ -80,7 +80,7 @@ inherits(TopoJSON, JSONFeature);
/**
* @const
* @type {Object.<string, function(TopoJSONGeometry, Array, ...Array): module:ol/geom/Geometry~Geometry>}
* @type {Object.<string, function(TopoJSONGeometry, Array, ...Array): module:ol/geom/Geometry>}
*/
const GEOMETRY_READERS = {
'Point': readPointGeometry,
@@ -133,7 +133,7 @@ function concatenateArcs(indices, arcs) {
* @param {TopoJSONGeometry} object TopoJSON object.
* @param {Array.<number>} scale Scale for each dimension.
* @param {Array.<number>} translate Translation for each dimension.
* @return {module:ol/geom/Point~Point} Geometry.
* @return {module:ol/geom/Point} Geometry.
*/
function readPointGeometry(object, scale, translate) {
const coordinates = object.coordinates;
@@ -150,7 +150,7 @@ function readPointGeometry(object, scale, translate) {
* @param {TopoJSONGeometry} object TopoJSON object.
* @param {Array.<number>} scale Scale for each dimension.
* @param {Array.<number>} translate Translation for each dimension.
* @return {module:ol/geom/MultiPoint~MultiPoint} Geometry.
* @return {module:ol/geom/MultiPoint} Geometry.
*/
function readMultiPointGeometry(object, scale, translate) {
const coordinates = object.coordinates;
@@ -168,7 +168,7 @@ function readMultiPointGeometry(object, scale, translate) {
*
* @param {TopoJSONGeometry} object TopoJSON object.
* @param {Array.<Array.<module:ol/coordinate~Coordinate>>} arcs Array of arcs.
* @return {module:ol/geom/LineString~LineString} Geometry.
* @return {module:ol/geom/LineString} Geometry.
*/
function readLineStringGeometry(object, arcs) {
const coordinates = concatenateArcs(object.arcs, arcs);
@@ -181,7 +181,7 @@ function readLineStringGeometry(object, arcs) {
*
* @param {TopoJSONGeometry} object TopoJSON object.
* @param {Array.<Array.<module:ol/coordinate~Coordinate>>} arcs Array of arcs.
* @return {module:ol/geom/MultiLineString~MultiLineString} Geometry.
* @return {module:ol/geom/MultiLineString} Geometry.
*/
function readMultiLineStringGeometry(object, arcs) {
const coordinates = [];
@@ -197,7 +197,7 @@ function readMultiLineStringGeometry(object, arcs) {
*
* @param {TopoJSONGeometry} object TopoJSON object.
* @param {Array.<Array.<module:ol/coordinate~Coordinate>>} arcs Array of arcs.
* @return {module:ol/geom/Polygon~Polygon} Geometry.
* @return {module:ol/geom/Polygon} Geometry.
*/
function readPolygonGeometry(object, arcs) {
const coordinates = [];
@@ -213,7 +213,7 @@ function readPolygonGeometry(object, arcs) {
*
* @param {TopoJSONGeometry} object TopoJSON object.
* @param {Array.<Array.<module:ol/coordinate~Coordinate>>} arcs Array of arcs.
* @return {module:ol/geom/MultiPolygon~MultiPolygon} Geometry.
* @return {module:ol/geom/MultiPolygon} Geometry.
*/
function readMultiPolygonGeometry(object, arcs) {
const coordinates = [];
@@ -243,7 +243,7 @@ function readMultiPolygonGeometry(object, arcs) {
* object to.
* @param {string} name Name of the `Topology`'s child object.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @return {Array.<module:ol/Feature~Feature>} Array of features.
* @return {Array.<module:ol/Feature>} Array of features.
*/
function readFeaturesFromGeometryCollection(collection, arcs, scale, translate, property, name, opt_options) {
const geometries = collection.geometries;
@@ -267,7 +267,7 @@ function readFeaturesFromGeometryCollection(collection, arcs, scale, translate,
* object to.
* @param {string} name Name of the `Topology`'s child object.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @return {module:ol/Feature~Feature} Feature.
* @return {module:ol/Feature} Feature.
*/
function readFeatureFromGeometry(object, arcs, scale, translate, property, name, opt_options) {
let geometry;
@@ -279,7 +279,7 @@ function readFeatureFromGeometry(object, arcs, scale, translate, property, name,
geometry = geometryReader(object, arcs);
}
const feature = new Feature();
feature.setGeometry(/** @type {module:ol/geom/Geometry~Geometry} */ (
feature.setGeometry(/** @type {module:ol/geom/Geometry} */ (
transformWithOptions(geometry, false, opt_options)));
if (object.id !== undefined) {
feature.setId(object.id);
@@ -303,7 +303,7 @@ function readFeatureFromGeometry(object, arcs, scale, translate, property, name,
*
* @function
* @param {Document|Node|Object|string} source Source.
* @return {Array.<module:ol/Feature~Feature>} Features.
* @return {Array.<module:ol/Feature>} Features.
* @api
*/
TopoJSON.prototype.readFeatures;
@@ -325,7 +325,7 @@ TopoJSON.prototype.readFeaturesFromObject = function(object, opt_options) {
if (transform) {
transformArcs(arcs, scale, translate);
}
/** @type {Array.<module:ol/Feature~Feature>} */
/** @type {Array.<module:ol/Feature>} */
const features = [];
const topoJSONFeatures = topoJSONTopology.objects;
const property = this.layerName_;
@@ -405,7 +405,7 @@ function transformVertex(vertex, scale, translate) {
* Read the projection from a TopoJSON source.
*
* @param {Document|Node|Object|string} object Source.
* @return {module:ol/proj/Projection~Projection} Projection.
* @return {module:ol/proj/Projection} Projection.
* @override
* @api
*/

View File

@@ -21,7 +21,7 @@ import {createElementNS, isDocument, isNode, makeArrayPusher, makeChildAppender,
* @typedef {Object} Options
* @property {Object.<string, string>|string} [featureNS] The namespace URI used for features.
* @property {Array.<string>|string} [featureType] The feature type to parse. Only used for read operations.
* @property {module:ol/format/GMLBase~GMLBase} [gmlFormat] The GML format to use to parse the response. Default is `ol.format.GML3`.
* @property {module:ol/format/GMLBase} [gmlFormat] The GML format to use to parse the response. Default is `ol.format.GML3`.
* @property {string} [schemaLocation] Optional schemaLocation to use for serialization, this will override the default.
*/
@@ -44,7 +44,7 @@ import {createElementNS, isDocument, isNode, makeArrayPusher, makeChildAppender,
* WFS 2.0 feature backported to WFS 1.1.0 by some Web Feature Services. Please note that some
* Web Feature Services have repurposed `maxfeatures` instead.
* @property {module:ol/extent~Extent} [bbox] Extent to use for the BBOX filter.
* @property {module:ol/format/filter/Filter~Filter} [filter] Filter condition. See
* @property {module:ol/format/filter/Filter} [filter] Filter condition. See
* {@link ol.format.filter} for more information.
* @property {string} [resultType] Indicates what response should be returned,
* E.g. `hits` only includes the `numberOfFeatures` attribute in the response and no features.
@@ -140,7 +140,7 @@ const DEFAULT_VERSION = '1.1.0';
*
* @constructor
* @param {module:ol/format/WFS~Options=} opt_options Optional configuration object.
* @extends {module:ol/format/XMLFeature~XMLFeature}
* @extends {module:ol/format/XMLFeature}
* @api
*/
const WFS = function(opt_options) {
@@ -160,7 +160,7 @@ const WFS = function(opt_options) {
/**
* @private
* @type {module:ol/format/GMLBase~GMLBase}
* @type {module:ol/format/GMLBase}
*/
this.gmlFormat_ = options.gmlFormat ?
options.gmlFormat : new GML3();
@@ -200,7 +200,7 @@ WFS.prototype.setFeatureType = function(featureType) {
* @function
* @param {Document|Node|Object|string} source Source.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @return {Array.<module:ol/Feature~Feature>} Features.
* @return {Array.<module:ol/Feature>} Features.
* @api
*/
WFS.prototype.readFeatures;
@@ -437,7 +437,7 @@ const QUERY_SERIALIZERS = {
/**
* @param {Node} node Node.
* @param {module:ol/Feature~Feature} feature Feature.
* @param {module:ol/Feature} feature Feature.
* @param {Array.<*>} objectStack Node stack.
*/
function writeFeature(node, feature, objectStack) {
@@ -488,7 +488,7 @@ function getTypeName(featurePrefix, featureType) {
/**
* @param {Node} node Node.
* @param {module:ol/Feature~Feature} feature Feature.
* @param {module:ol/Feature} feature Feature.
* @param {Array.<*>} objectStack Node stack.
*/
function writeDelete(node, feature, objectStack) {
@@ -523,7 +523,7 @@ const TRANSACTION_SERIALIZERS = {
/**
* @param {Node} node Node.
* @param {module:ol/Feature~Feature} feature Feature.
* @param {module:ol/Feature} feature Feature.
* @param {Array.<*>} objectStack Node stack.
*/
function writeUpdate(node, feature, objectStack) {
@@ -680,7 +680,7 @@ function writeQuery(node, featureType, objectStack) {
/**
* @param {Node} node Node.
* @param {module:ol/format/filter/Filter~Filter} filter Filter.
* @param {module:ol/format/filter/Filter} filter Filter.
* @param {Array.<*>} objectStack Node stack.
*/
function writeFilterCondition(node, filter, objectStack) {
@@ -695,7 +695,7 @@ function writeFilterCondition(node, filter, objectStack) {
/**
* @param {Node} node Node.
* @param {module:ol/format/filter/Bbox~Bbox} filter Filter.
* @param {module:ol/format/filter/Bbox} filter Filter.
* @param {Array.<*>} objectStack Node stack.
*/
function writeBboxFilter(node, filter, objectStack) {
@@ -709,7 +709,7 @@ function writeBboxFilter(node, filter, objectStack) {
/**
* @param {Node} node Node.
* @param {module:ol/format/filter/Contains~Contains} filter Filter.
* @param {module:ol/format/filter/Contains} filter Filter.
* @param {Array.<*>} objectStack Node stack.
*/
function writeContainsFilter(node, filter, objectStack) {
@@ -723,7 +723,7 @@ function writeContainsFilter(node, filter, objectStack) {
/**
* @param {Node} node Node.
* @param {module:ol/format/filter/Intersects~Intersects} filter Filter.
* @param {module:ol/format/filter/Intersects} filter Filter.
* @param {Array.<*>} objectStack Node stack.
*/
function writeIntersectsFilter(node, filter, objectStack) {
@@ -737,7 +737,7 @@ function writeIntersectsFilter(node, filter, objectStack) {
/**
* @param {Node} node Node.
* @param {module:ol/format/filter/Within~Within} filter Filter.
* @param {module:ol/format/filter/Within} filter Filter.
* @param {Array.<*>} objectStack Node stack.
*/
function writeWithinFilter(node, filter, objectStack) {
@@ -751,7 +751,7 @@ function writeWithinFilter(node, filter, objectStack) {
/**
* @param {Node} node Node.
* @param {module:ol/format/filter/During~During} filter Filter.
* @param {module:ol/format/filter/During} filter Filter.
* @param {Array.<*>} objectStack Node stack.
*/
function writeDuringFilter(node, filter, objectStack) {
@@ -776,7 +776,7 @@ function writeDuringFilter(node, filter, objectStack) {
/**
* @param {Node} node Node.
* @param {module:ol/format/filter/LogicalNary~LogicalNary} filter Filter.
* @param {module:ol/format/filter/LogicalNary} filter Filter.
* @param {Array.<*>} objectStack Node stack.
*/
function writeLogicalFilter(node, filter, objectStack) {
@@ -795,7 +795,7 @@ function writeLogicalFilter(node, filter, objectStack) {
/**
* @param {Node} node Node.
* @param {module:ol/format/filter/Not~Not} filter Filter.
* @param {module:ol/format/filter/Not} filter Filter.
* @param {Array.<*>} objectStack Node stack.
*/
function writeNotFilter(node, filter, objectStack) {
@@ -811,7 +811,7 @@ function writeNotFilter(node, filter, objectStack) {
/**
* @param {Node} node Node.
* @param {module:ol/format/filter/ComparisonBinary~ComparisonBinary} filter Filter.
* @param {module:ol/format/filter/ComparisonBinary} filter Filter.
* @param {Array.<*>} objectStack Node stack.
*/
function writeComparisonFilter(node, filter, objectStack) {
@@ -825,7 +825,7 @@ function writeComparisonFilter(node, filter, objectStack) {
/**
* @param {Node} node Node.
* @param {module:ol/format/filter/IsNull~IsNull} filter Filter.
* @param {module:ol/format/filter/IsNull} filter Filter.
* @param {Array.<*>} objectStack Node stack.
*/
function writeIsNullFilter(node, filter, objectStack) {
@@ -835,7 +835,7 @@ function writeIsNullFilter(node, filter, objectStack) {
/**
* @param {Node} node Node.
* @param {module:ol/format/filter/IsBetween~IsBetween} filter Filter.
* @param {module:ol/format/filter/IsBetween} filter Filter.
* @param {Array.<*>} objectStack Node stack.
*/
function writeIsBetweenFilter(node, filter, objectStack) {
@@ -853,7 +853,7 @@ function writeIsBetweenFilter(node, filter, objectStack) {
/**
* @param {Node} node Node.
* @param {module:ol/format/filter/IsLike~IsLike} filter Filter.
* @param {module:ol/format/filter/IsLike} filter Filter.
* @param {Array.<*>} objectStack Node stack.
*/
function writeIsLikeFilter(node, filter, objectStack) {
@@ -915,7 +915,7 @@ function writeTimeInstant(node, time) {
/**
* Encode filter as WFS `Filter` and return the Node.
*
* @param {module:ol/format/filter/Filter~Filter} filter Filter.
* @param {module:ol/format/filter/Filter} filter Filter.
* @return {Node} Result.
* @api
*/
@@ -1008,9 +1008,9 @@ WFS.prototype.writeGetFeature = function(options) {
/**
* Encode format as WFS `Transaction` and return the Node.
*
* @param {Array.<module:ol/Feature~Feature>} inserts The features to insert.
* @param {Array.<module:ol/Feature~Feature>} updates The features to update.
* @param {Array.<module:ol/Feature~Feature>} deletes The features to delete.
* @param {Array.<module:ol/Feature>} inserts The features to insert.
* @param {Array.<module:ol/Feature>} updates The features to update.
* @param {Array.<module:ol/Feature>} deletes The features to delete.
* @param {module:ol/format/WFS~WriteTransactionOptions} options Write options.
* @return {Node} Result.
* @api
@@ -1079,7 +1079,7 @@ WFS.prototype.writeTransaction = function(inserts, updates, deletes, options) {
*
* @function
* @param {Document|Node|Object|string} source Source.
* @return {?module:ol/proj/Projection~Projection} Projection.
* @return {?module:ol/proj/Projection} Projection.
* @api
*/
WFS.prototype.readProjection;

View File

@@ -271,7 +271,7 @@ Parser.prototype.match = function(type) {
/**
* Try to parse the tokens provided by the lexer.
* @return {module:ol/geom/Geometry~Geometry} The geometry.
* @return {module:ol/geom/Geometry} The geometry.
*/
Parser.prototype.parse = function() {
this.consume_();
@@ -306,7 +306,7 @@ Parser.prototype.parseGeometryLayout_ = function() {
/**
* @return {!Array.<module:ol/geom/Geometry~Geometry>} A collection of geometries.
* @return {!Array.<module:ol/geom/Geometry>} A collection of geometries.
* @private
*/
Parser.prototype.parseGeometryCollectionText_ = function() {
@@ -538,7 +538,7 @@ Parser.prototype.formatErrorMessage_ = function() {
* format.
*
* @constructor
* @extends {module:ol/format/TextFeature~TextFeature}
* @extends {module:ol/format/TextFeature}
* @param {module:ol/format/WKT~Options=} opt_options Options.
* @api
*/
@@ -562,7 +562,7 @@ inherits(WKT, TextFeature);
/**
* @param {module:ol/geom/Point~Point} geom Point geometry.
* @param {module:ol/geom/Point} geom Point geometry.
* @return {string} Coordinates part of Point as WKT.
*/
function encodePointGeometry(geom) {
@@ -575,7 +575,7 @@ function encodePointGeometry(geom) {
/**
* @param {module:ol/geom/MultiPoint~MultiPoint} geom MultiPoint geometry.
* @param {module:ol/geom/MultiPoint} geom MultiPoint geometry.
* @return {string} Coordinates part of MultiPoint as WKT.
*/
function encodeMultiPointGeometry(geom) {
@@ -589,7 +589,7 @@ function encodeMultiPointGeometry(geom) {
/**
* @param {module:ol/geom/GeometryCollection~GeometryCollection} geom GeometryCollection geometry.
* @param {module:ol/geom/GeometryCollection} geom GeometryCollection geometry.
* @return {string} Coordinates part of GeometryCollection as WKT.
*/
function encodeGeometryCollectionGeometry(geom) {
@@ -603,7 +603,7 @@ function encodeGeometryCollectionGeometry(geom) {
/**
* @param {module:ol/geom/LineString~LineString|module:ol/geom/LinearRing~LinearRing} geom LineString geometry.
* @param {module:ol/geom/LineString|module:ol/geom/LinearRing} geom LineString geometry.
* @return {string} Coordinates part of LineString as WKT.
*/
function encodeLineStringGeometry(geom) {
@@ -617,7 +617,7 @@ function encodeLineStringGeometry(geom) {
/**
* @param {module:ol/geom/MultiLineString~MultiLineString} geom MultiLineString geometry.
* @param {module:ol/geom/MultiLineString} geom MultiLineString geometry.
* @return {string} Coordinates part of MultiLineString as WKT.
*/
function encodeMultiLineStringGeometry(geom) {
@@ -631,7 +631,7 @@ function encodeMultiLineStringGeometry(geom) {
/**
* @param {module:ol/geom/Polygon~Polygon} geom Polygon geometry.
* @param {module:ol/geom/Polygon} geom Polygon geometry.
* @return {string} Coordinates part of Polygon as WKT.
*/
function encodePolygonGeometry(geom) {
@@ -645,7 +645,7 @@ function encodePolygonGeometry(geom) {
/**
* @param {module:ol/geom/MultiPolygon~MultiPolygon} geom MultiPolygon geometry.
* @param {module:ol/geom/MultiPolygon} geom MultiPolygon geometry.
* @return {string} Coordinates part of MultiPolygon as WKT.
*/
function encodeMultiPolygonGeometry(geom) {
@@ -658,7 +658,7 @@ function encodeMultiPolygonGeometry(geom) {
}
/**
* @param {module:ol/geom/SimpleGeometry~SimpleGeometry} geom SimpleGeometry geometry.
* @param {module:ol/geom/SimpleGeometry} geom SimpleGeometry geometry.
* @return {string} Potential dimensional information for WKT type.
*/
function encodeGeometryLayout(geom) {
@@ -676,7 +676,7 @@ function encodeGeometryLayout(geom) {
/**
* @const
* @type {Object.<string, function(module:ol/geom/Geometry~Geometry): string>}
* @type {Object.<string, function(module:ol/geom/Geometry): string>}
*/
const GeometryEncoder = {
'Point': encodePointGeometry,
@@ -691,7 +691,7 @@ const GeometryEncoder = {
/**
* Encode a geometry as WKT.
* @param {module:ol/geom/Geometry~Geometry} geom The geometry to encode.
* @param {module:ol/geom/Geometry} geom The geometry to encode.
* @return {string} WKT string for the geometry.
*/
function encode(geom) {
@@ -715,7 +715,7 @@ function encode(geom) {
/**
* Parse a WKT string.
* @param {string} wkt WKT string.
* @return {module:ol/geom/Geometry~Geometry|undefined}
* @return {module:ol/geom/Geometry|undefined}
* The geometry created.
* @private
*/
@@ -732,7 +732,7 @@ WKT.prototype.parse_ = function(wkt) {
* @function
* @param {Document|Node|Object|string} source Source.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @return {module:ol/Feature~Feature} Feature.
* @return {module:ol/Feature} Feature.
* @api
*/
WKT.prototype.readFeature;
@@ -758,7 +758,7 @@ WKT.prototype.readFeatureFromText = function(text, opt_options) {
* @function
* @param {Document|Node|Object|string} source Source.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @return {Array.<module:ol/Feature~Feature>} Features.
* @return {Array.<module:ol/Feature>} Features.
* @api
*/
WKT.prototype.readFeatures;
@@ -772,7 +772,7 @@ WKT.prototype.readFeaturesFromText = function(text, opt_options) {
const geometry = this.readGeometryFromText(text, opt_options);
if (this.splitCollection_ &&
geometry.getType() == GeometryType.GEOMETRY_COLLECTION) {
geometries = (/** @type {module:ol/geom/GeometryCollection~GeometryCollection} */ (geometry))
geometries = (/** @type {module:ol/geom/GeometryCollection} */ (geometry))
.getGeometriesArray();
} else {
geometries = [geometry];
@@ -793,7 +793,7 @@ WKT.prototype.readFeaturesFromText = function(text, opt_options) {
* @function
* @param {Document|Node|Object|string} source Source.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @return {module:ol/geom/Geometry~Geometry} Geometry.
* @return {module:ol/geom/Geometry} Geometry.
* @api
*/
WKT.prototype.readGeometry;
@@ -805,7 +805,9 @@ WKT.prototype.readGeometry;
WKT.prototype.readGeometryFromText = function(text, opt_options) {
const geometry = this.parse_(text);
if (geometry) {
return /** @type {module:ol/geom/Geometry~Geometry} */ (transformWithOptions(geometry, false, opt_options));
return (
/** @type {module:ol/geom/Geometry} */ (transformWithOptions(geometry, false, opt_options))
);
} else {
return null;
}
@@ -813,7 +815,7 @@ WKT.prototype.readGeometryFromText = function(text, opt_options) {
/**
* @enum {function (new:module:ol/geom/Geometry~Geometry, Array, module:ol/geom/GeometryLayout~GeometryLayout)}
* @enum {function (new:module:ol/geom/Geometry, Array, module:ol/geom/GeometryLayout~GeometryLayout)}
*/
const GeometryConstructor = {
'POINT': Point,
@@ -839,7 +841,7 @@ const GeometryParser = {
/**
* @return {!module:ol/geom/Geometry~Geometry} The geometry.
* @return {!module:ol/geom/Geometry} The geometry.
* @private
*/
Parser.prototype.parseGeometry_ = function() {
@@ -868,7 +870,7 @@ Parser.prototype.parseGeometry_ = function() {
* Encode a feature as a WKT string.
*
* @function
* @param {module:ol/Feature~Feature} feature Feature.
* @param {module:ol/Feature} feature Feature.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {string} WKT string.
* @api
@@ -892,7 +894,7 @@ WKT.prototype.writeFeatureText = function(feature, opt_options) {
* Encode an array of features as a WKT string.
*
* @function
* @param {Array.<module:ol/Feature~Feature>} features Features.
* @param {Array.<module:ol/Feature>} features Features.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {string} WKT string.
* @api
@@ -920,7 +922,7 @@ WKT.prototype.writeFeaturesText = function(features, opt_options) {
* Write a single geometry as a WKT string.
*
* @function
* @param {module:ol/geom/Geometry~Geometry} geometry Geometry.
* @param {module:ol/geom/Geometry} geometry Geometry.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {string} WKT string.
* @api
@@ -932,7 +934,7 @@ WKT.prototype.writeGeometry;
* @inheritDoc
*/
WKT.prototype.writeGeometryText = function(geometry, opt_options) {
return encode(/** @type {module:ol/geom/Geometry~Geometry} */ (
return encode(/** @type {module:ol/geom/Geometry} */ (
transformWithOptions(geometry, true, opt_options)));
};

View File

@@ -14,7 +14,7 @@ import {makeArrayPusher, makeObjectPropertyPusher, makeObjectPropertySetter,
* Format for reading WMS capabilities data
*
* @constructor
* @extends {module:ol/format/XML~XML}
* @extends {module:ol/format/XML}
* @api
*/
const WMSCapabilities = function() {

View File

@@ -21,7 +21,7 @@ import {makeArrayPusher, makeStructureNS, pushParseAndPop} from '../xml.js';
* {@link module:ol/format/GML2~GML2} to read features.
*
* @constructor
* @extends {module:ol/format/XMLFeature~XMLFeature}
* @extends {module:ol/format/XMLFeature}
* @param {module:ol/format/WMSGetFeatureInfo~Options=} opt_options Options.
* @api
*/
@@ -38,7 +38,7 @@ const WMSGetFeatureInfo = function(opt_options) {
/**
* @private
* @type {module:ol/format/GML2~GML2}
* @type {module:ol/format/GML2}
*/
this.gmlFormat_ = new GML2();
@@ -88,13 +88,13 @@ WMSGetFeatureInfo.prototype.setLayers = function(layers) {
/**
* @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack.
* @return {Array.<module:ol/Feature~Feature>} Features.
* @return {Array.<module:ol/Feature>} Features.
* @private
*/
WMSGetFeatureInfo.prototype.readFeatures_ = function(node, objectStack) {
node.setAttribute('namespaceURI', this.featureNS_);
const localName = node.localName;
/** @type {Array.<module:ol/Feature~Feature>} */
/** @type {Array.<module:ol/Feature>} */
let features = [];
if (node.childNodes.length === 0) {
return features;
@@ -151,7 +151,7 @@ WMSGetFeatureInfo.prototype.readFeatures_ = function(node, objectStack) {
* @function
* @param {Document|Node|Object|string} source Source.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Options.
* @return {Array.<module:ol/Feature~Feature>} Features.
* @return {Array.<module:ol/Feature>} Features.
* @api
*/
WMSGetFeatureInfo.prototype.readFeatures;

View File

@@ -15,14 +15,14 @@ import {pushParseAndPop, makeStructureNS,
* Format for reading WMTS capabilities data.
*
* @constructor
* @extends {module:ol/format/XML~XML}
* @extends {module:ol/format/XML}
* @api
*/
const WMTSCapabilities = function() {
XML.call(this);
/**
* @type {module:ol/format/OWS~OWS}
* @type {module:ol/format/OWS}
* @private
*/
this.owsParser_ = new OWS();

View File

@@ -15,7 +15,7 @@ import {isDocument, isNode, parse} from '../xml.js';
*
* @constructor
* @abstract
* @extends {module:ol/format/Feature~FeatureFormat}
* @extends {module:ol/format/Feature}
*/
const XMLFeature = function() {
@@ -59,7 +59,7 @@ XMLFeature.prototype.readFeature = function(source, opt_options) {
/**
* @param {Document} doc Document.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Options.
* @return {module:ol/Feature~Feature} Feature.
* @return {module:ol/Feature} Feature.
*/
XMLFeature.prototype.readFeatureFromDocument = function(doc, opt_options) {
const features = this.readFeaturesFromDocument(doc, opt_options);
@@ -74,7 +74,7 @@ XMLFeature.prototype.readFeatureFromDocument = function(doc, opt_options) {
/**
* @param {Node} node Node.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Options.
* @return {module:ol/Feature~Feature} Feature.
* @return {module:ol/Feature} Feature.
*/
XMLFeature.prototype.readFeatureFromNode = function(node, opt_options) {
return null; // not implemented
@@ -103,10 +103,10 @@ XMLFeature.prototype.readFeatures = function(source, opt_options) {
* @param {Document} doc Document.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Options.
* @protected
* @return {Array.<module:ol/Feature~Feature>} Features.
* @return {Array.<module:ol/Feature>} Features.
*/
XMLFeature.prototype.readFeaturesFromDocument = function(doc, opt_options) {
/** @type {Array.<module:ol/Feature~Feature>} */
/** @type {Array.<module:ol/Feature>} */
const features = [];
for (let n = doc.firstChild; n; n = n.nextSibling) {
if (n.nodeType == Node.ELEMENT_NODE) {
@@ -122,7 +122,7 @@ XMLFeature.prototype.readFeaturesFromDocument = function(doc, opt_options) {
* @param {Node} node Node.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Options.
* @protected
* @return {Array.<module:ol/Feature~Feature>} Features.
* @return {Array.<module:ol/Feature>} Features.
*/
XMLFeature.prototype.readFeaturesFromNode = function(node, opt_options) {};
@@ -149,7 +149,7 @@ XMLFeature.prototype.readGeometry = function(source, opt_options) {
* @param {Document} doc Document.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Options.
* @protected
* @return {module:ol/geom/Geometry~Geometry} Geometry.
* @return {module:ol/geom/Geometry} Geometry.
*/
XMLFeature.prototype.readGeometryFromDocument = function(doc, opt_options) {
return null; // not implemented
@@ -160,7 +160,7 @@ XMLFeature.prototype.readGeometryFromDocument = function(doc, opt_options) {
* @param {Node} node Node.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Options.
* @protected
* @return {module:ol/geom/Geometry~Geometry} Geometry.
* @return {module:ol/geom/Geometry} Geometry.
*/
XMLFeature.prototype.readGeometryFromNode = function(node, opt_options) {
return null; // not implemented
@@ -187,7 +187,7 @@ XMLFeature.prototype.readProjection = function(source) {
/**
* @param {Document} doc Document.
* @protected
* @return {module:ol/proj/Projection~Projection} Projection.
* @return {module:ol/proj/Projection} Projection.
*/
XMLFeature.prototype.readProjectionFromDocument = function(doc) {
return this.defaultDataProjection;
@@ -197,7 +197,7 @@ XMLFeature.prototype.readProjectionFromDocument = function(doc) {
/**
* @param {Node} node Node.
* @protected
* @return {module:ol/proj/Projection~Projection} Projection.
* @return {module:ol/proj/Projection} Projection.
*/
XMLFeature.prototype.readProjectionFromNode = function(node) {
return this.defaultDataProjection;
@@ -214,7 +214,7 @@ XMLFeature.prototype.writeFeature = function(feature, opt_options) {
/**
* @param {module:ol/Feature~Feature} feature Feature.
* @param {module:ol/Feature} feature Feature.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Options.
* @protected
* @return {Node} Node.
@@ -234,7 +234,7 @@ XMLFeature.prototype.writeFeatures = function(features, opt_options) {
/**
* @param {Array.<module:ol/Feature~Feature>} features Features.
* @param {Array.<module:ol/Feature>} features Features.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Options.
* @return {Node} Node.
*/
@@ -253,7 +253,7 @@ XMLFeature.prototype.writeGeometry = function(geometry, opt_options) {
/**
* @param {module:ol/geom/Geometry~Geometry} geometry Geometry.
* @param {module:ol/geom/Geometry} geometry Geometry.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Options.
* @return {Node} Node.
*/

View File

@@ -23,8 +23,8 @@ import Within from '../format/filter/Within.js';
/**
* Create a logical `<And>` operator between two or more filter conditions.
*
* @param {...module:ol/format/filter/Filter~Filter} conditions Filter conditions.
* @returns {!module:ol/format/filter/And~And} `<And>` operator.
* @param {...module:ol/format/filter/Filter} conditions Filter conditions.
* @returns {!module:ol/format/filter/And} `<And>` operator.
* @api
*/
export function and(conditions) {
@@ -36,8 +36,8 @@ export function and(conditions) {
/**
* Create a logical `<Or>` operator between two or more filter conditions.
*
* @param {...module:ol/format/filter/Filter~Filter} conditions Filter conditions.
* @returns {!module:ol/format/filter/Or~Or} `<Or>` operator.
* @param {...module:ol/format/filter/Filter} conditions Filter conditions.
* @returns {!module:ol/format/filter/Or} `<Or>` operator.
* @api
*/
export function or(conditions) {
@@ -49,8 +49,8 @@ export function or(conditions) {
/**
* Represents a logical `<Not>` operator for a filter condition.
*
* @param {!module:ol/format/filter/Filter~Filter} condition Filter condition.
* @returns {!module:ol/format/filter/Not~Not} `<Not>` operator.
* @param {!module:ol/format/filter/Filter} condition Filter condition.
* @returns {!module:ol/format/filter/Not} `<Not>` operator.
* @api
*/
export function not(condition) {
@@ -66,7 +66,7 @@ export function not(condition) {
* @param {!module:ol/extent~Extent} extent Extent.
* @param {string=} opt_srsName SRS name. No srsName attribute will be
* set on geometries when this is not provided.
* @returns {!module:ol/format/filter/Bbox~Bbox} `<BBOX>` operator.
* @returns {!module:ol/format/filter/Bbox} `<BBOX>` operator.
* @api
*/
export function bbox(geometryName, extent, opt_srsName) {
@@ -78,10 +78,10 @@ export function bbox(geometryName, extent, opt_srsName) {
* contains a given geometry.
*
* @param {!string} geometryName Geometry name to use.
* @param {!module:ol/geom/Geometry~Geometry} geometry Geometry.
* @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.
* @returns {!module:ol/format/filter/Contains~Contains} `<Contains>` operator.
* @returns {!module:ol/format/filter/Contains} `<Contains>` operator.
* @api
*/
export function contains(geometryName, geometry, opt_srsName) {
@@ -93,10 +93,10 @@ export function contains(geometryName, geometry, opt_srsName) {
* intersects a given geometry.
*
* @param {!string} geometryName Geometry name to use.
* @param {!module:ol/geom/Geometry~Geometry} geometry Geometry.
* @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.
* @returns {!module:ol/format/filter/Intersects~Intersects} `<Intersects>` operator.
* @returns {!module:ol/format/filter/Intersects} `<Intersects>` operator.
* @api
*/
export function intersects(geometryName, geometry, opt_srsName) {
@@ -108,10 +108,10 @@ export function intersects(geometryName, geometry, opt_srsName) {
* is within a given geometry.
*
* @param {!string} geometryName Geometry name to use.
* @param {!module:ol/geom/Geometry~Geometry} geometry Geometry.
* @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.
* @returns {!module:ol/format/filter/Within~Within} `<Within>` operator.
* @returns {!module:ol/format/filter/Within} `<Within>` operator.
* @api
*/
export function within(geometryName, geometry, opt_srsName) {
@@ -125,7 +125,7 @@ export function within(geometryName, geometry, opt_srsName) {
* @param {!string} propertyName Name of the context property to compare.
* @param {!(string|number)} expression The value to compare.
* @param {boolean=} opt_matchCase Case-sensitive?
* @returns {!module:ol/format/filter/EqualTo~EqualTo} `<PropertyIsEqualTo>` operator.
* @returns {!module:ol/format/filter/EqualTo} `<PropertyIsEqualTo>` operator.
* @api
*/
export function equalTo(propertyName, expression, opt_matchCase) {
@@ -139,7 +139,7 @@ export function equalTo(propertyName, expression, opt_matchCase) {
* @param {!string} propertyName Name of the context property to compare.
* @param {!(string|number)} expression The value to compare.
* @param {boolean=} opt_matchCase Case-sensitive?
* @returns {!module:ol/format/filter/NotEqualTo~NotEqualTo} `<PropertyIsNotEqualTo>` operator.
* @returns {!module:ol/format/filter/NotEqualTo} `<PropertyIsNotEqualTo>` operator.
* @api
*/
export function notEqualTo(propertyName, expression, opt_matchCase) {
@@ -152,7 +152,7 @@ export function notEqualTo(propertyName, expression, opt_matchCase) {
*
* @param {!string} propertyName Name of the context property to compare.
* @param {!number} expression The value to compare.
* @returns {!module:ol/format/filter/LessThan~LessThan} `<PropertyIsLessThan>` operator.
* @returns {!module:ol/format/filter/LessThan} `<PropertyIsLessThan>` operator.
* @api
*/
export function lessThan(propertyName, expression) {
@@ -165,7 +165,7 @@ export function lessThan(propertyName, expression) {
*
* @param {!string} propertyName Name of the context property to compare.
* @param {!number} expression The value to compare.
* @returns {!module:ol/format/filter/LessThanOrEqualTo~LessThanOrEqualTo} `<PropertyIsLessThanOrEqualTo>` operator.
* @returns {!module:ol/format/filter/LessThanOrEqualTo} `<PropertyIsLessThanOrEqualTo>` operator.
* @api
*/
export function lessThanOrEqualTo(propertyName, expression) {
@@ -178,7 +178,7 @@ export function lessThanOrEqualTo(propertyName, expression) {
*
* @param {!string} propertyName Name of the context property to compare.
* @param {!number} expression The value to compare.
* @returns {!module:ol/format/filter/GreaterThan~GreaterThan} `<PropertyIsGreaterThan>` operator.
* @returns {!module:ol/format/filter/GreaterThan} `<PropertyIsGreaterThan>` operator.
* @api
*/
export function greaterThan(propertyName, expression) {
@@ -191,7 +191,7 @@ export function greaterThan(propertyName, expression) {
*
* @param {!string} propertyName Name of the context property to compare.
* @param {!number} expression The value to compare.
* @returns {!module:ol/format/filter/GreaterThanOrEqualTo~GreaterThanOrEqualTo} `<PropertyIsGreaterThanOrEqualTo>` operator.
* @returns {!module:ol/format/filter/GreaterThanOrEqualTo} `<PropertyIsGreaterThanOrEqualTo>` operator.
* @api
*/
export function greaterThanOrEqualTo(propertyName, expression) {
@@ -204,7 +204,7 @@ export function greaterThanOrEqualTo(propertyName, expression) {
* is null.
*
* @param {!string} propertyName Name of the context property to compare.
* @returns {!module:ol/format/filter/IsNull~IsNull} `<PropertyIsNull>` operator.
* @returns {!module:ol/format/filter/IsNull} `<PropertyIsNull>` operator.
* @api
*/
export function isNull(propertyName) {
@@ -219,7 +219,7 @@ export function isNull(propertyName) {
* @param {!string} propertyName Name of the context property to compare.
* @param {!number} lowerBoundary The lower bound of the range.
* @param {!number} upperBoundary The upper bound of the range.
* @returns {!module:ol/format/filter/IsBetween~IsBetween} `<PropertyIsBetween>` operator.
* @returns {!module:ol/format/filter/IsBetween} `<PropertyIsBetween>` operator.
* @api
*/
export function between(propertyName, lowerBoundary, upperBoundary) {
@@ -240,7 +240,7 @@ export function between(propertyName, lowerBoundary, upperBoundary) {
* @param {string=} opt_escapeChar Escape character which can be used to escape
* the pattern characters. Default is '!'.
* @param {boolean=} opt_matchCase Case-sensitive?
* @returns {!module:ol/format/filter/IsLike~IsLike} `<PropertyIsLike>` operator.
* @returns {!module:ol/format/filter/IsLike} `<PropertyIsLike>` operator.
* @api
*/
export function like(propertyName, pattern,
@@ -256,7 +256,7 @@ export function like(propertyName, pattern,
* @param {!string} propertyName Name of the context property to compare.
* @param {!string} begin The begin date in ISO-8601 format.
* @param {!string} end The end date in ISO-8601 format.
* @returns {!module:ol/format/filter/During~During} `<During>` operator.
* @returns {!module:ol/format/filter/During} `<During>` operator.
* @api
*/
export function during(propertyName, begin, end) {

View File

@@ -10,8 +10,8 @@ import LogicalNary from '../filter/LogicalNary.js';
*
* @constructor
* @abstract
* @param {...module:ol/format/filter/Filter~Filter} conditions Conditions.
* @extends {module:ol/format/filter/LogicalNary~LogicalNary}
* @param {...module:ol/format/filter/Filter} conditions Conditions.
* @extends {module:ol/format/filter/LogicalNary}
*/
const And = function(conditions) {
const params = ['And'].concat(Array.prototype.slice.call(arguments));

View File

@@ -14,7 +14,7 @@ import Filter from '../filter/Filter.js';
* @param {!module:ol/extent~Extent} extent Extent.
* @param {string=} opt_srsName SRS name. No srsName attribute will be
* set on geometries when this is not provided.
* @extends {module:ol/format/filter/Filter~Filter}
* @extends {module:ol/format/filter/Filter}
* @api
*/
const Bbox = function(geometryName, extent, opt_srsName) {

View File

@@ -13,7 +13,7 @@ import Filter from '../filter/Filter.js';
* @abstract
* @param {!string} tagName The XML tag name for this filter.
* @param {!string} propertyName Name of the context property to compare.
* @extends {module:ol/format/filter/Filter~Filter}
* @extends {module:ol/format/filter/Filter}
*/
const Comparison = function(tagName, propertyName) {

View File

@@ -15,7 +15,7 @@ import Comparison from '../filter/Comparison.js';
* @param {!string} propertyName Name of the context property to compare.
* @param {!(string|number)} expression The value to compare.
* @param {boolean=} opt_matchCase Case-sensitive?
* @extends {module:ol/format/filter/Comparison~Comparison}
* @extends {module:ol/format/filter/Comparison}
*/
const ComparisonBinary = function(tagName, propertyName, expression, opt_matchCase) {

View File

@@ -11,10 +11,10 @@ import Spatial from '../filter/Spatial.js';
*
* @constructor
* @param {!string} geometryName Geometry name to use.
* @param {!module:ol/geom/Geometry~Geometry} geometry Geometry.
* @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.
* @extends {module:ol/format/filter/Spatial~Spatial}
* @extends {module:ol/format/filter/Spatial}
* @api
*/
const Contains = function(geometryName, geometry, opt_srsName) {

View File

@@ -12,7 +12,7 @@ import Comparison from '../filter/Comparison.js';
* @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.
* @extends {module:ol/format/filter/Comparison~Comparison}
* @extends {module:ol/format/filter/Comparison}
* @api
*/
const During = function(propertyName, begin, end) {

View File

@@ -12,7 +12,7 @@ import ComparisonBinary from '../filter/ComparisonBinary.js';
* @param {!string} propertyName Name of the context property to compare.
* @param {!(string|number)} expression The value to compare.
* @param {boolean=} opt_matchCase Case-sensitive?
* @extends {module:ol/format/filter/ComparisonBinary~ComparisonBinary}
* @extends {module:ol/format/filter/ComparisonBinary}
* @api
*/
const EqualTo = function(propertyName, expression, opt_matchCase) {

View File

@@ -11,7 +11,7 @@ import ComparisonBinary from '../filter/ComparisonBinary.js';
* @constructor
* @param {!string} propertyName Name of the context property to compare.
* @param {!number} expression The value to compare.
* @extends {module:ol/format/filter/ComparisonBinary~ComparisonBinary}
* @extends {module:ol/format/filter/ComparisonBinary}
* @api
*/
const GreaterThan = function(propertyName, expression) {

View File

@@ -11,7 +11,7 @@ import ComparisonBinary from '../filter/ComparisonBinary.js';
* @constructor
* @param {!string} propertyName Name of the context property to compare.
* @param {!number} expression The value to compare.
* @extends {module:ol/format/filter/ComparisonBinary~ComparisonBinary}
* @extends {module:ol/format/filter/ComparisonBinary}
* @api
*/
const GreaterThanOrEqualTo = function(propertyName, expression) {

View File

@@ -11,10 +11,10 @@ import Spatial from '../filter/Spatial.js';
*
* @constructor
* @param {!string} geometryName Geometry name to use.
* @param {!module:ol/geom/Geometry~Geometry} geometry Geometry.
* @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.
* @extends {module:ol/format/filter/Spatial~Spatial}
* @extends {module:ol/format/filter/Spatial}
* @api
*/
const Intersects = function(geometryName, geometry, opt_srsName) {

View File

@@ -12,7 +12,7 @@ import Comparison from '../filter/Comparison.js';
* @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.
* @extends {module:ol/format/filter/Comparison~Comparison}
* @extends {module:ol/format/filter/Comparison}
* @api
*/
const IsBetween = function(propertyName, lowerBoundary, upperBoundary) {

View File

@@ -18,7 +18,7 @@ import Comparison from '../filter/Comparison.js';
* @param {string=} opt_escapeChar Escape character which can be used to escape
* the pattern characters. Default is '!'.
* @param {boolean=} opt_matchCase Case-sensitive?
* @extends {module:ol/format/filter/Comparison~Comparison}
* @extends {module:ol/format/filter/Comparison}
* @api
*/
const IsLike = function(propertyName, pattern, opt_wildCard, opt_singleChar, opt_escapeChar, opt_matchCase) {

View File

@@ -10,7 +10,7 @@ import Comparison from '../filter/Comparison.js';
*
* @constructor
* @param {!string} propertyName Name of the context property to compare.
* @extends {module:ol/format/filter/Comparison~Comparison}
* @extends {module:ol/format/filter/Comparison}
* @api
*/
const IsNull = function(propertyName) {

View File

@@ -11,7 +11,7 @@ import ComparisonBinary from '../filter/ComparisonBinary.js';
* @constructor
* @param {!string} propertyName Name of the context property to compare.
* @param {!number} expression The value to compare.
* @extends {module:ol/format/filter/ComparisonBinary~ComparisonBinary}
* @extends {module:ol/format/filter/ComparisonBinary}
* @api
*/
const LessThan = function(propertyName, expression) {

View File

@@ -11,7 +11,7 @@ import ComparisonBinary from '../filter/ComparisonBinary.js';
* @constructor
* @param {!string} propertyName Name of the context property to compare.
* @param {!number} expression The value to compare.
* @extends {module:ol/format/filter/ComparisonBinary~ComparisonBinary}
* @extends {module:ol/format/filter/ComparisonBinary}
* @api
*/
const LessThanOrEqualTo = function(propertyName, expression) {

View File

@@ -13,15 +13,15 @@ import Filter from '../filter/Filter.js';
* @constructor
* @abstract
* @param {!string} tagName The XML tag name for this filter.
* @param {...module:ol/format/filter/Filter~Filter} conditions Conditions.
* @extends {module:ol/format/filter/Filter~Filter}
* @param {...module:ol/format/filter/Filter} conditions Conditions.
* @extends {module:ol/format/filter/Filter}
*/
const LogicalNary = function(tagName, conditions) {
Filter.call(this, tagName);
/**
* @type {Array.<module:ol/format/filter/Filter~Filter>}
* @type {Array.<module:ol/format/filter/Filter>}
*/
this.conditions = Array.prototype.slice.call(arguments, 1);
assert(this.conditions.length >= 2, 57); // At least 2 conditions are required.

View File

@@ -9,8 +9,8 @@ import Filter from '../filter/Filter.js';
* Represents a logical `<Not>` operator for a filter condition.
*
* @constructor
* @param {!module:ol/format/filter/Filter~Filter} condition Filter condition.
* @extends {module:ol/format/filter/Filter~Filter}
* @param {!module:ol/format/filter/Filter} condition Filter condition.
* @extends {module:ol/format/filter/Filter}
* @api
*/
const Not = function(condition) {
@@ -18,7 +18,7 @@ const Not = function(condition) {
Filter.call(this, 'Not');
/**
* @type {!module:ol/format/filter/Filter~Filter}
* @type {!module:ol/format/filter/Filter}
*/
this.condition = condition;
};

View File

@@ -12,7 +12,7 @@ import ComparisonBinary from '../filter/ComparisonBinary.js';
* @param {!string} propertyName Name of the context property to compare.
* @param {!(string|number)} expression The value to compare.
* @param {boolean=} opt_matchCase Case-sensitive?
* @extends {module:ol/format/filter/ComparisonBinary~ComparisonBinary}
* @extends {module:ol/format/filter/ComparisonBinary}
* @api
*/
const NotEqualTo = function(propertyName, expression, opt_matchCase) {

View File

@@ -9,8 +9,8 @@ import LogicalNary from '../filter/LogicalNary.js';
* Represents a logical `<Or>` operator between two ore more filter conditions.
*
* @constructor
* @param {...module:ol/format/filter/Filter~Filter} conditions Conditions.
* @extends {module:ol/format/filter/LogicalNary~LogicalNary}
* @param {...module:ol/format/filter/Filter} conditions Conditions.
* @extends {module:ol/format/filter/LogicalNary}
* @api
*/
const Or = function(conditions) {

View File

@@ -14,10 +14,10 @@ import Filter from '../filter/Filter.js';
* @abstract
* @param {!string} tagName The XML tag name for this filter.
* @param {!string} geometryName Geometry name to use.
* @param {!module:ol/geom/Geometry~Geometry} geometry Geometry.
* @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.
* @extends {module:ol/format/filter/Filter~Filter}
* @extends {module:ol/format/filter/Filter}
*/
const Spatial = function(tagName, geometryName, geometry, opt_srsName) {
@@ -29,7 +29,7 @@ const Spatial = function(tagName, geometryName, geometry, opt_srsName) {
this.geometryName = geometryName || 'the_geom';
/**
* @type {module:ol/geom/Geometry~Geometry}
* @type {module:ol/geom/Geometry}
*/
this.geometry = geometry;

View File

@@ -11,10 +11,10 @@ import Spatial from '../filter/Spatial.js';
*
* @constructor
* @param {!string} geometryName Geometry name to use.
* @param {!module:ol/geom/Geometry~Geometry} geometry Geometry.
* @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.
* @extends {module:ol/format/filter/Spatial~Spatial}
* @extends {module:ol/format/filter/Spatial}
* @api
*/
const Within = function(geometryName, geometry, opt_srsName) {

View File

@@ -13,7 +13,7 @@ import {deflateCoordinate} from '../geom/flat/deflate.js';
* Circle geometry.
*
* @constructor
* @extends {module:ol/geom/SimpleGeometry~SimpleGeometry}
* @extends {module:ol/geom/SimpleGeometry}
* @param {module:ol/coordinate~Coordinate} center Center.
* @param {number=} opt_radius Radius.
* @param {module:ol/geom/GeometryLayout~GeometryLayout=} opt_layout Layout.
@@ -30,7 +30,7 @@ inherits(Circle, SimpleGeometry);
/**
* Make a complete copy of the geometry.
* @return {!module:ol/geom/Circle~Circle} Clone.
* @return {!module:ol/geom/Circle} Clone.
* @override
* @api
*/
@@ -254,7 +254,7 @@ Circle.prototype.setRadius = function(radius) {
* string identifier or a {@link module:ol/proj/Projection~Projection} object.
* @param {module:ol/proj~ProjectionLike} destination The desired projection. Can be a
* string identifier or a {@link module:ol/proj/Projection~Projection} object.
* @return {module:ol/geom/Circle~Circle} This geometry. Note that original geometry is
* @return {module:ol/geom/Circle} This geometry. Note that original geometry is
* modified in place.
* @function
* @api

View File

@@ -22,7 +22,7 @@ import {create as createTransform, compose as composeTransform} from '../transfo
*
* @constructor
* @abstract
* @extends {module:ol/Object~BaseObject}
* @extends {module:ol/Object}
* @api
*/
const Geometry = function() {
@@ -43,7 +43,7 @@ const Geometry = function() {
/**
* @protected
* @type {Object.<string, module:ol/geom/Geometry~Geometry>}
* @type {Object.<string, module:ol/geom/Geometry>}
*/
this.simplifiedGeometryCache = {};
@@ -73,7 +73,7 @@ const tmpTransform = createTransform();
/**
* Make a complete copy of the geometry.
* @abstract
* @return {!module:ol/geom/Geometry~Geometry} Clone.
* @return {!module:ol/geom/Geometry} Clone.
*/
Geometry.prototype.clone = function() {};
@@ -181,7 +181,7 @@ Geometry.prototype.scale = function(sx, opt_sy, opt_anchor) {};
* simplification is used to preserve topology.
* @function
* @param {number} tolerance The tolerance distance for simplification.
* @return {module:ol/geom/Geometry~Geometry} A new, simplified version of the original
* @return {module:ol/geom/Geometry} A new, simplified version of the original
* geometry.
* @api
*/
@@ -196,7 +196,7 @@ Geometry.prototype.simplify = function(tolerance) {
* @see https://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm
* @abstract
* @param {number} squaredTolerance Squared tolerance.
* @return {module:ol/geom/Geometry~Geometry} Simplified geometry.
* @return {module:ol/geom/Geometry} Simplified geometry.
*/
Geometry.prototype.getSimplifiedGeometry = function(squaredTolerance) {};
@@ -250,7 +250,7 @@ Geometry.prototype.translate = function(deltaX, deltaY) {};
* string identifier or a {@link module:ol/proj/Projection~Projection} object.
* @param {module:ol/proj~ProjectionLike} destination The desired projection. Can be a
* string identifier or a {@link module:ol/proj/Projection~Projection} object.
* @return {module:ol/geom/Geometry~Geometry} This geometry. Note that original geometry is
* @return {module:ol/geom/Geometry} This geometry. Note that original geometry is
* modified in place.
* @api
*/

View File

@@ -11,11 +11,11 @@ import {clear} from '../obj.js';
/**
* @classdesc
* An array of {@link module:ol/geom/Geometry~Geometry} objects.
* An array of {@link module:ol/geom/Geometry} objects.
*
* @constructor
* @extends {module:ol/geom/Geometry~Geometry}
* @param {Array.<module:ol/geom/Geometry~Geometry>=} opt_geometries Geometries.
* @extends {module:ol/geom/Geometry}
* @param {Array.<module:ol/geom/Geometry>=} opt_geometries Geometries.
* @api
*/
const GeometryCollection = function(opt_geometries) {
@@ -24,7 +24,7 @@ const GeometryCollection = function(opt_geometries) {
/**
* @private
* @type {Array.<module:ol/geom/Geometry~Geometry>}
* @type {Array.<module:ol/geom/Geometry>}
*/
this.geometries_ = opt_geometries ? opt_geometries : null;
@@ -35,8 +35,8 @@ inherits(GeometryCollection, Geometry);
/**
* @param {Array.<module:ol/geom/Geometry~Geometry>} geometries Geometries.
* @return {Array.<module:ol/geom/Geometry~Geometry>} Cloned geometries.
* @param {Array.<module:ol/geom/Geometry>} geometries Geometries.
* @return {Array.<module:ol/geom/Geometry>} Cloned geometries.
*/
function cloneGeometries(geometries) {
const clonedGeometries = [];
@@ -79,7 +79,7 @@ GeometryCollection.prototype.listenGeometriesChange_ = function() {
/**
* Make a complete copy of the geometry.
* @return {!module:ol/geom/GeometryCollection~GeometryCollection} Clone.
* @return {!module:ol/geom/GeometryCollection} Clone.
* @override
* @api
*/
@@ -135,7 +135,7 @@ GeometryCollection.prototype.computeExtent = function(extent) {
/**
* Return the geometries that make up this geometry collection.
* @return {Array.<module:ol/geom/Geometry~Geometry>} Geometries.
* @return {Array.<module:ol/geom/Geometry>} Geometries.
* @api
*/
GeometryCollection.prototype.getGeometries = function() {
@@ -144,7 +144,7 @@ GeometryCollection.prototype.getGeometries = function() {
/**
* @return {Array.<module:ol/geom/Geometry~Geometry>} Geometries.
* @return {Array.<module:ol/geom/Geometry>} Geometries.
*/
GeometryCollection.prototype.getGeometriesArray = function() {
return this.geometries_;
@@ -257,7 +257,7 @@ GeometryCollection.prototype.scale = function(sx, opt_sy, opt_anchor) {
/**
* Set the geometries that make up this geometry collection.
* @param {Array.<module:ol/geom/Geometry~Geometry>} geometries Geometries.
* @param {Array.<module:ol/geom/Geometry>} geometries Geometries.
* @api
*/
GeometryCollection.prototype.setGeometries = function(geometries) {
@@ -266,7 +266,7 @@ GeometryCollection.prototype.setGeometries = function(geometries) {
/**
* @param {Array.<module:ol/geom/Geometry~Geometry>} geometries Geometries.
* @param {Array.<module:ol/geom/Geometry>} geometries Geometries.
*/
GeometryCollection.prototype.setGeometriesArray = function(geometries) {
this.unlistenGeometriesChange_();

View File

@@ -21,7 +21,7 @@ import {douglasPeucker} from '../geom/flat/simplify.js';
* Linestring geometry.
*
* @constructor
* @extends {module:ol/geom/SimpleGeometry~SimpleGeometry}
* @extends {module:ol/geom/SimpleGeometry}
* @param {Array.<module:ol/coordinate~Coordinate>} coordinates Coordinates.
* @param {module:ol/geom/GeometryLayout~GeometryLayout=} opt_layout Layout.
* @api
@@ -78,7 +78,7 @@ LineString.prototype.appendCoordinate = function(coordinate) {
/**
* Make a complete copy of the geometry.
* @return {!module:ol/geom/LineString~LineString} Clone.
* @return {!module:ol/geom/LineString} Clone.
* @override
* @api
*/

View File

@@ -18,7 +18,7 @@ import {douglasPeucker} from '../geom/flat/simplify.js';
* on its own.
*
* @constructor
* @extends {module:ol/geom/SimpleGeometry~SimpleGeometry}
* @extends {module:ol/geom/SimpleGeometry}
* @param {Array.<module:ol/coordinate~Coordinate>} coordinates Coordinates.
* @param {module:ol/geom/GeometryLayout~GeometryLayout=} opt_layout Layout.
* @api
@@ -48,7 +48,7 @@ inherits(LinearRing, SimpleGeometry);
/**
* Make a complete copy of the geometry.
* @return {!module:ol/geom/LinearRing~LinearRing} Clone.
* @return {!module:ol/geom/LinearRing} Clone.
* @override
* @api
*/

View File

@@ -20,7 +20,7 @@ import {douglasPeuckerArray} from '../geom/flat/simplify.js';
* Multi-linestring geometry.
*
* @constructor
* @extends {module:ol/geom/SimpleGeometry~SimpleGeometry}
* @extends {module:ol/geom/SimpleGeometry}
* @param {Array.<Array.<module:ol/coordinate~Coordinate>>} coordinates Coordinates.
* @param {module:ol/geom/GeometryLayout~GeometryLayout=} opt_layout Layout.
* @api
@@ -56,7 +56,7 @@ inherits(MultiLineString, SimpleGeometry);
/**
* Append the passed linestring to the multilinestring.
* @param {module:ol/geom/LineString~LineString} lineString LineString.
* @param {module:ol/geom/LineString} lineString LineString.
* @api
*/
MultiLineString.prototype.appendLineString = function(lineString) {
@@ -72,7 +72,7 @@ MultiLineString.prototype.appendLineString = function(lineString) {
/**
* Make a complete copy of the geometry.
* @return {!module:ol/geom/MultiLineString~MultiLineString} Clone.
* @return {!module:ol/geom/MultiLineString} Clone.
* @override
* @api
*/
@@ -160,7 +160,7 @@ MultiLineString.prototype.getEnds = function() {
/**
* Return the linestring at the specified index.
* @param {number} index Index.
* @return {module:ol/geom/LineString~LineString} LineString.
* @return {module:ol/geom/LineString} LineString.
* @api
*/
MultiLineString.prototype.getLineString = function(index) {
@@ -176,14 +176,14 @@ MultiLineString.prototype.getLineString = function(index) {
/**
* Return the linestrings of this multilinestring.
* @return {Array.<module:ol/geom/LineString~LineString>} LineStrings.
* @return {Array.<module:ol/geom/LineString>} LineStrings.
* @api
*/
MultiLineString.prototype.getLineStrings = function() {
const flatCoordinates = this.flatCoordinates;
const ends = this.ends_;
const layout = this.layout;
/** @type {Array.<module:ol/geom/LineString~LineString>} */
/** @type {Array.<module:ol/geom/LineString>} */
const lineStrings = [];
let offset = 0;
for (let i = 0, ii = ends.length; i < ii; ++i) {
@@ -288,7 +288,7 @@ MultiLineString.prototype.setFlatCoordinates = function(layout, flatCoordinates,
/**
* @param {Array.<module:ol/geom/LineString~LineString>} lineStrings LineStrings.
* @param {Array.<module:ol/geom/LineString>} lineStrings LineStrings.
*/
MultiLineString.prototype.setLineStrings = function(lineStrings) {
let layout = this.getLayout();

View File

@@ -17,7 +17,7 @@ import {squaredDistance as squaredDx} from '../math.js';
* Multi-point geometry.
*
* @constructor
* @extends {module:ol/geom/SimpleGeometry~SimpleGeometry}
* @extends {module:ol/geom/SimpleGeometry}
* @param {Array.<module:ol/coordinate~Coordinate>} coordinates Coordinates.
* @param {module:ol/geom/GeometryLayout~GeometryLayout=} opt_layout Layout.
* @api
@@ -32,7 +32,7 @@ inherits(MultiPoint, SimpleGeometry);
/**
* Append the passed point to this multipoint.
* @param {module:ol/geom/Point~Point} point Point.
* @param {module:ol/geom/Point} point Point.
* @api
*/
MultiPoint.prototype.appendPoint = function(point) {
@@ -47,7 +47,7 @@ MultiPoint.prototype.appendPoint = function(point) {
/**
* Make a complete copy of the geometry.
* @return {!module:ol/geom/MultiPoint~MultiPoint} Clone.
* @return {!module:ol/geom/MultiPoint} Clone.
* @override
* @api
*/
@@ -97,7 +97,7 @@ MultiPoint.prototype.getCoordinates = function() {
/**
* Return the point at the specified index.
* @param {number} index Index.
* @return {module:ol/geom/Point~Point} Point.
* @return {module:ol/geom/Point} Point.
* @api
*/
MultiPoint.prototype.getPoint = function(index) {
@@ -114,14 +114,14 @@ MultiPoint.prototype.getPoint = function(index) {
/**
* Return the points of this multipoint.
* @return {Array.<module:ol/geom/Point~Point>} Points.
* @return {Array.<module:ol/geom/Point>} Points.
* @api
*/
MultiPoint.prototype.getPoints = function() {
const flatCoordinates = this.flatCoordinates;
const layout = this.layout;
const stride = this.stride;
/** @type {Array.<module:ol/geom/Point~Point>} */
/** @type {Array.<module:ol/geom/Point>} */
const points = [];
for (let i = 0, ii = flatCoordinates.length; i < ii; i += stride) {
const point = new Point(null);

View File

@@ -25,7 +25,7 @@ import {quantizeMultiArray} from '../geom/flat/simplify.js';
* Multi-polygon geometry.
*
* @constructor
* @extends {module:ol/geom/SimpleGeometry~SimpleGeometry}
* @extends {module:ol/geom/SimpleGeometry}
* @param {Array.<Array.<Array.<module:ol/coordinate~Coordinate>>>} coordinates Coordinates.
* @param {module:ol/geom/GeometryLayout~GeometryLayout=} opt_layout Layout.
* @api
@@ -85,7 +85,7 @@ inherits(MultiPolygon, SimpleGeometry);
/**
* Append the passed polygon to this multipolygon.
* @param {module:ol/geom/Polygon~Polygon} polygon Polygon.
* @param {module:ol/geom/Polygon} polygon Polygon.
* @api
*/
MultiPolygon.prototype.appendPolygon = function(polygon) {
@@ -110,7 +110,7 @@ MultiPolygon.prototype.appendPolygon = function(polygon) {
/**
* Make a complete copy of the geometry.
* @return {!module:ol/geom/MultiPolygon~MultiPolygon} Clone.
* @return {!module:ol/geom/MultiPolygon} Clone.
* @override
* @api
*/
@@ -219,8 +219,8 @@ MultiPolygon.prototype.getFlatInteriorPoints = function() {
/**
* Return the interior points as {@link module:ol/geom/MultiPoint~MultiPoint multipoint}.
* @return {module:ol/geom/MultiPoint~MultiPoint} Interior points as XYM coordinates, where M is
* Return the interior points as {@link module:ol/geom/MultiPoint multipoint}.
* @return {module:ol/geom/MultiPoint} Interior points as XYM coordinates, where M is
* the length of the horizontal intersection that the point belongs to.
* @api
*/
@@ -273,7 +273,7 @@ MultiPolygon.prototype.getSimplifiedGeometryInternal = function(squaredTolerance
/**
* Return the polygon at the specified index.
* @param {number} index Index.
* @return {module:ol/geom/Polygon~Polygon} Polygon.
* @return {module:ol/geom/Polygon} Polygon.
* @api
*/
MultiPolygon.prototype.getPolygon = function(index) {
@@ -303,7 +303,7 @@ MultiPolygon.prototype.getPolygon = function(index) {
/**
* Return the polygons of this multipolygon.
* @return {Array.<module:ol/geom/Polygon~Polygon>} Polygons.
* @return {Array.<module:ol/geom/Polygon>} Polygons.
* @api
*/
MultiPolygon.prototype.getPolygons = function() {
@@ -391,7 +391,7 @@ MultiPolygon.prototype.setFlatCoordinates = function(layout, flatCoordinates, en
/**
* @param {Array.<module:ol/geom/Polygon~Polygon>} polygons Polygons.
* @param {Array.<module:ol/geom/Polygon>} polygons Polygons.
*/
MultiPolygon.prototype.setPolygons = function(polygons) {
let layout = this.getLayout();

View File

@@ -14,7 +14,7 @@ import {squaredDistance as squaredDx} from '../math.js';
* Point geometry.
*
* @constructor
* @extends {module:ol/geom/SimpleGeometry~SimpleGeometry}
* @extends {module:ol/geom/SimpleGeometry}
* @param {module:ol/coordinate~Coordinate} coordinates Coordinates.
* @param {module:ol/geom/GeometryLayout~GeometryLayout=} opt_layout Layout.
* @api
@@ -29,7 +29,7 @@ inherits(Point, SimpleGeometry);
/**
* Make a complete copy of the geometry.
* @return {!module:ol/geom/Point~Point} Clone.
* @return {!module:ol/geom/Point} Clone.
* @override
* @api
*/

View File

@@ -26,7 +26,7 @@ import {modulo} from '../math.js';
* Polygon geometry.
*
* @constructor
* @extends {module:ol/geom/SimpleGeometry~SimpleGeometry}
* @extends {module:ol/geom/SimpleGeometry}
* @param {Array.<Array.<module:ol/coordinate~Coordinate>>} coordinates Array of linear
* rings that define the polygon. The first linear ring of the array
* defines the outer-boundary or surface of the polygon. Each subsequent
@@ -91,7 +91,7 @@ inherits(Polygon, SimpleGeometry);
/**
* Append the passed linear ring to this polygon.
* @param {module:ol/geom/LinearRing~LinearRing} linearRing Linear ring.
* @param {module:ol/geom/LinearRing} linearRing Linear ring.
* @api
*/
Polygon.prototype.appendLinearRing = function(linearRing) {
@@ -107,7 +107,7 @@ Polygon.prototype.appendLinearRing = function(linearRing) {
/**
* Make a complete copy of the geometry.
* @return {!module:ol/geom/Polygon~Polygon} Clone.
* @return {!module:ol/geom/Polygon} Clone.
* @override
* @api
*/
@@ -209,7 +209,7 @@ Polygon.prototype.getFlatInteriorPoint = function() {
/**
* Return an interior point of the polygon.
* @return {module:ol/geom/Point~Point} Interior point as XYM coordinate, where M is the
* @return {module:ol/geom/Point} Interior point as XYM coordinate, where M is the
* length of the horizontal intersection that the point belongs to.
* @api
*/
@@ -237,7 +237,7 @@ Polygon.prototype.getLinearRingCount = function() {
* at index `1` and beyond.
*
* @param {number} index Index.
* @return {module:ol/geom/LinearRing~LinearRing} Linear ring.
* @return {module:ol/geom/LinearRing} Linear ring.
* @api
*/
Polygon.prototype.getLinearRing = function(index) {
@@ -253,7 +253,7 @@ Polygon.prototype.getLinearRing = function(index) {
/**
* Return the linear rings of the polygon.
* @return {Array.<module:ol/geom/LinearRing~LinearRing>} Linear rings.
* @return {Array.<module:ol/geom/LinearRing>} Linear rings.
* @api
*/
Polygon.prototype.getLinearRings = function() {
@@ -376,7 +376,7 @@ export default Polygon;
* polygon. Default is `32`.
* @param {number=} opt_sphereRadius Optional radius for the sphere (defaults to
* the Earth's mean radius using the WGS84 ellipsoid).
* @return {module:ol/geom/Polygon~Polygon} The "circular" polygon.
* @return {module:ol/geom/Polygon} The "circular" polygon.
* @api
*/
export function circular(center, radius, opt_n, opt_sphereRadius) {
@@ -396,7 +396,7 @@ export function circular(center, radius, opt_n, opt_sphereRadius) {
/**
* Create a polygon from an extent. The layout used is `XY`.
* @param {module:ol/extent~Extent} extent The extent.
* @return {module:ol/geom/Polygon~Polygon} The polygon.
* @return {module:ol/geom/Polygon} The polygon.
* @api
*/
export function fromExtent(extent) {
@@ -415,11 +415,11 @@ export function fromExtent(extent) {
/**
* Create a regular polygon from a circle.
* @param {module:ol/geom/Circle~Circle} circle Circle geometry.
* @param {module:ol/geom/Circle} circle Circle geometry.
* @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
* radians. Default is 0.
* @return {module:ol/geom/Polygon~Polygon} Polygon geometry.
* @return {module:ol/geom/Polygon} Polygon geometry.
* @api
*/
export function fromCircle(circle, opt_sides, opt_angle) {
@@ -441,7 +441,7 @@ export function fromCircle(circle, opt_sides, opt_angle) {
/**
* Modify the coordinates of a polygon to make it a regular polygon.
* @param {module:ol/geom/Polygon~Polygon} polygon Polygon geometry.
* @param {module:ol/geom/Polygon} polygon Polygon geometry.
* @param {module:ol/coordinate~Coordinate} center Center 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

View File

@@ -16,7 +16,7 @@ import {clear} from '../obj.js';
*
* @constructor
* @abstract
* @extends {module:ol/geom/Geometry~Geometry}
* @extends {module:ol/geom/Geometry}
* @api
*/
const SimpleGeometry = function() {
@@ -59,7 +59,9 @@ function getLayoutForStride(stride) {
} else if (stride == 4) {
layout = GeometryLayout.XYZM;
}
return /** @type {module:ol/geom/GeometryLayout~GeometryLayout} */ (layout);
return (
/** @type {module:ol/geom/GeometryLayout~GeometryLayout} */ (layout)
);
}
@@ -182,7 +184,7 @@ SimpleGeometry.prototype.getSimplifiedGeometry = function(squaredTolerance) {
/**
* @param {number} squaredTolerance Squared tolerance.
* @return {module:ol/geom/SimpleGeometry~SimpleGeometry} Simplified geometry.
* @return {module:ol/geom/SimpleGeometry} Simplified geometry.
* @protected
*/
SimpleGeometry.prototype.getSimplifiedGeometryInternal = function(squaredTolerance) {
@@ -316,7 +318,7 @@ SimpleGeometry.prototype.translate = function(deltaX, deltaY) {
/**
* @param {module:ol/geom/SimpleGeometry~SimpleGeometry} simpleGeometry Simple geometry.
* @param {module:ol/geom/SimpleGeometry} simpleGeometry Simple geometry.
* @param {module:ol/transform~Transform} transform Transform.
* @param {Array.<number>=} opt_dest Destination.
* @return {Array.<number>} Transformed flat coordinates.

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