diff --git a/examples/canvas-gradient-pattern.js b/examples/canvas-gradient-pattern.js index 6e2e1018ae..1b91b8593d 100644 --- a/examples/canvas-gradient-pattern.js +++ b/examples/canvas-gradient-pattern.js @@ -61,8 +61,8 @@ const style = new Style({ * The styling function for the vector layer, will return an array of styles * which either contains the aboove gradient or pattern. * - * @param {module:ol/Feature~Feature} feature The feature to style. - * @return {module:ol/style/Style} The style to use for the feature. + * @param {import("../src/ol/Feature.js").default} feature The feature to style. + * @return {Style} The style to use for the feature. */ const getStackedStyle = function(feature) { const id = feature.getId(); diff --git a/examples/center.js b/examples/center.js index 5eb1acced5..48602a94df 100644 --- a/examples/center.js +++ b/examples/center.js @@ -50,7 +50,7 @@ const map = new Map({ const zoomtoswitzerlandbest = document.getElementById('zoomtoswitzerlandbest'); zoomtoswitzerlandbest.addEventListener('click', function() { const feature = source.getFeatures()[0]; - const polygon = /** @type {module:ol/geom/SimpleGeometry~SimpleGeometry} */ (feature.getGeometry()); + const polygon = /** @type {import("../src/ol/geom/SimpleGeometry.js").default} */ (feature.getGeometry()); view.fit(polygon, {padding: [170, 50, 30, 150], constrainResolution: false}); }, false); @@ -58,7 +58,7 @@ const zoomtoswitzerlandconstrained = document.getElementById('zoomtoswitzerlandconstrained'); zoomtoswitzerlandconstrained.addEventListener('click', function() { const feature = source.getFeatures()[0]; - const polygon = /** @type {module:ol/geom/SimpleGeometry~SimpleGeometry} */ (feature.getGeometry()); + const polygon = /** @type {import("../src/ol/geom/SimpleGeometry.js").default} */ (feature.getGeometry()); view.fit(polygon, {padding: [170, 50, 30, 150]}); }, false); @@ -66,21 +66,21 @@ const zoomtoswitzerlandnearest = document.getElementById('zoomtoswitzerlandnearest'); zoomtoswitzerlandnearest.addEventListener('click', function() { const feature = source.getFeatures()[0]; - const polygon = /** @type {module:ol/geom/SimpleGeometry~SimpleGeometry} */ (feature.getGeometry()); + const polygon = /** @type {import("../src/ol/geom/SimpleGeometry.js").default} */ (feature.getGeometry()); view.fit(polygon, {padding: [170, 50, 30, 150], nearest: true}); }, false); const zoomtolausanne = document.getElementById('zoomtolausanne'); zoomtolausanne.addEventListener('click', function() { const feature = source.getFeatures()[1]; - const point = /** @type {module:ol/geom/SimpleGeometry~SimpleGeometry} */ (feature.getGeometry()); + const point = /** @type {import("../src/ol/geom/SimpleGeometry.js").default} */ (feature.getGeometry()); view.fit(point, {padding: [170, 50, 30, 150], minResolution: 50}); }, false); const centerlausanne = document.getElementById('centerlausanne'); centerlausanne.addEventListener('click', function() { const feature = source.getFeatures()[1]; - const point = /** @type {module:ol/geom/Point~Point} */ (feature.getGeometry()); - const size = /** @type {module:ol/size~Size} */ (map.getSize()); + const point = /** @type {import("../src/ol/geom/Point.js").default} */ (feature.getGeometry()); + const size = map.getSize(); view.centerOn(point.getCoordinates(), size, [570, 500]); }, false); diff --git a/examples/custom-controls.js b/examples/custom-controls.js index b9c610af47..f39be07a83 100644 --- a/examples/custom-controls.js +++ b/examples/custom-controls.js @@ -9,14 +9,11 @@ import OSM from '../src/ol/source/OSM.js'; // Define rotate to north control. // - -/** - * @constructor - * @extends {module:ol/control/Control~Control} - * @param {Object=} opt_options Control options. - */ class RotateNorthControl extends Control { + /** + * @param {Object=} opt_options Control options. + */ constructor(opt_options) { const options = opt_options || {}; diff --git a/examples/custom-interactions.js b/examples/custom-interactions.js index ce411e676d..5ec87c854b 100644 --- a/examples/custom-interactions.js +++ b/examples/custom-interactions.js @@ -8,10 +8,6 @@ import {TileJSON, Vector as VectorSource} from '../src/ol/source.js'; import {Fill, Icon, Stroke, Style} from '../src/ol/style.js'; -/** - * @constructor - * @extends {module:ol/interaction/Pointer} - */ class Drag extends PointerInteraction { constructor() { super({ @@ -22,7 +18,7 @@ class Drag extends PointerInteraction { }); /** - * @type {module:ol/pixel~Pixel} + * @type {import("../src/ol/coordinate.js").Coordinate} * @private */ this.coordinate_ = null; @@ -34,7 +30,7 @@ class Drag extends PointerInteraction { this.cursor_ = 'pointer'; /** - * @type {module:ol/Feature~Feature} + * @type {Feature} * @private */ this.feature_ = null; @@ -49,7 +45,7 @@ class Drag extends PointerInteraction { /** - * @param {module:ol/MapBrowserEvent~MapBrowserEvent} evt Map browser event. + * @param {import("../src/ol/MapBrowserEvent.js").default} evt Map browser event. * @return {boolean} `true` to start the drag sequence. */ function handleDownEvent(evt) { @@ -70,7 +66,7 @@ function handleDownEvent(evt) { /** - * @param {module:ol/MapBrowserEvent~MapBrowserEvent} evt Map browser event. + * @param {import("../src/ol/MapBrowserEvent.js").default} evt Map browser event. */ function handleDragEvent(evt) { const deltaX = evt.coordinate[0] - this.coordinate_[0]; @@ -85,7 +81,7 @@ function handleDragEvent(evt) { /** - * @param {module:ol/MapBrowserEvent~MapBrowserEvent} evt Event. + * @param {import("../src/ol/MapBrowserEvent.js").default} evt Event. */ function handleMoveEvent(evt) { if (this.cursor_) { diff --git a/examples/export-pdf.js b/examples/export-pdf.js index 2e94b73224..f4dd040ee4 100644 --- a/examples/export-pdf.js +++ b/examples/export-pdf.js @@ -53,7 +53,7 @@ exportButton.addEventListener('click', function() { const dim = dims[format]; const width = Math.round(dim[0] * resolution / 25.4); const height = Math.round(dim[1] * resolution / 25.4); - const size = /** @type {module:ol/size~Size} */ (map.getSize()); + const size = map.getSize(); const extent = map.getView().calculateExtent(size); map.once('rendercomplete', function(event) { diff --git a/examples/feature-move-animation.js b/examples/feature-move-animation.js index 50a38c7f8f..e25b0da3c3 100644 --- a/examples/feature-move-animation.js +++ b/examples/feature-move-animation.js @@ -53,7 +53,7 @@ const polyline = [ '~@ym@yjA??a@cFd@kBrCgDbAUnAcBhAyAdk@et@??kF}D??OL' ].join(''); -const route = /** @type {module:ol/geom/LineString~LineString} */ (new Polyline({ +const route = /** @type {import("../src/ol/geom/LineString.js").default} */ (new Polyline({ factor: 1e6 }).readGeometry(polyline, { dataProjection: 'EPSG:4326', @@ -192,8 +192,8 @@ function stopAnimation(ended) { // if animation cancelled set the marker at the beginning const coord = ended ? routeCoords[routeLength - 1] : routeCoords[0]; - /** @type {module:ol/geom/Point~Point} */ (geoMarker.getGeometry()) - .setCoordinates(coord); + const geometry = /** @type {import("../src/ol/geom/Point").default} */ (geoMarker.getGeometry()); + geometry.setCoordinates(coord); //remove listener vectorLayer.un('postrender', moveFeature); } diff --git a/examples/igc.js b/examples/igc.js index 5dc8cd6ace..261108f59a 100644 --- a/examples/igc.js +++ b/examples/igc.js @@ -183,7 +183,7 @@ document.getElementById('time').addEventListener('input', function() { const value = parseInt(this.value, 10) / 100; const m = time.start + (time.duration * value); vectorSource.forEachFeature(function(feature) { - const geometry = /** @type {module:ol/geom/LineString~LineString} */ (feature.getGeometry()); + const geometry = /** @type {import("../src/ol/geom/LineString.js").default} */ (feature.getGeometry()); const coordinate = geometry.getCoordinateAtM(m, true); let highlight = feature.get('highlight'); if (highlight === undefined) { diff --git a/examples/image-load-events.js b/examples/image-load-events.js index a26f724436..5d2518da22 100644 --- a/examples/image-load-events.js +++ b/examples/image-load-events.js @@ -6,7 +6,7 @@ import ImageWMS from '../src/ol/source/ImageWMS.js'; /** * Renders a progress bar. - * @param {Element} el The target element. + * @param {HTMLElement} el The target element. * @constructor */ function Progress(el) { diff --git a/examples/measure.js b/examples/measure.js index dd79dbaa66..3ba57c9096 100644 --- a/examples/measure.js +++ b/examples/measure.js @@ -38,35 +38,35 @@ const vector = new VectorLayer({ /** * Currently drawn feature. - * @type {module:ol/Feature~Feature} + * @type {import("../src/ol/Feature.js").default} */ let sketch; /** * The help tooltip element. - * @type {Element} + * @type {HTMLElement} */ let helpTooltipElement; /** * Overlay to show the help messages. - * @type {module:ol/Overlay} + * @type {Overlay} */ let helpTooltip; /** * The measure tooltip element. - * @type {Element} + * @type {HTMLElement} */ let measureTooltipElement; /** * Overlay to show the measurement. - * @type {module:ol/Overlay} + * @type {Overlay} */ let measureTooltip; @@ -87,7 +87,7 @@ const continueLineMsg = 'Click to continue drawing the line'; /** * Handle pointer move. - * @param {module:ol/MapBrowserEvent~MapBrowserEvent} evt The event. + * @param {import("../src/ol/MapBrowserEvent").default} evt The event. */ const pointerMoveHandler = function(evt) { if (evt.dragging) { @@ -97,7 +97,7 @@ const pointerMoveHandler = function(evt) { let helpMsg = 'Click to start drawing'; if (sketch) { - const geom = (sketch.getGeometry()); + const geom = sketch.getGeometry(); if (geom instanceof Polygon) { helpMsg = continuePolygonMsg; } else if (geom instanceof LineString) { @@ -134,7 +134,7 @@ let draw; // global so we can remove it later /** * Format length output. - * @param {module:ol/geom/LineString~LineString} line The line. + * @param {LineString} line The line. * @return {string} The formatted length. */ const formatLength = function(line) { @@ -153,7 +153,7 @@ const formatLength = function(line) { /** * Format area output. - * @param {module:ol/geom/Polygon~Polygon} polygon The polygon. + * @param {Polygon} polygon The polygon. * @return {string} Formatted area. */ const formatArea = function(polygon) { @@ -205,7 +205,7 @@ function addInteraction() { // set sketch sketch = evt.feature; - /** @type {module:ol/coordinate~Coordinate|undefined} */ + /** @type {import("../src/ol/coordinate.js").Coordinate|undefined} */ let tooltipCoord = evt.coordinate; listener = sketch.getGeometry().on('change', function(evt) { diff --git a/examples/tile-load-events.js b/examples/tile-load-events.js index 40a2c93da0..c87e410c5a 100644 --- a/examples/tile-load-events.js +++ b/examples/tile-load-events.js @@ -6,7 +6,7 @@ import TileJSON from '../src/ol/source/TileJSON.js'; /** * Renders a progress bar. - * @param {Element} el The target element. + * @param {HTMLElement} el The target element. * @constructor */ function Progress(el) { diff --git a/examples/zoomslider.js b/examples/zoomslider.js index b020b2f444..1e8f3b0ba9 100644 --- a/examples/zoomslider.js +++ b/examples/zoomslider.js @@ -9,7 +9,7 @@ import OSM from '../src/ol/source/OSM.js'; * Helper method for map-creation. * * @param {string} divId The id of the div for the map. - * @return {module:ol/PluggableMap} The map instance. + * @return {Map} The map instance. */ function createMap(divId) { const source = new OSM();