Merge pull request #7971 from tschaub/module-types

Use module syntax for type annotations
This commit is contained in:
Tim Schaub
2018-03-12 08:39:48 -06:00
committed by GitHub
119 changed files with 1021 additions and 1021 deletions
+1 -1
View File
@@ -43,7 +43,7 @@ Unknown `serverType` configured.
### 10 ### 10
The default `geometryFunction` can only handle `ol.geom.Point` geometries. The default `geometryFunction` can only handle `ol/geom/Point` geometries.
### 11 ### 11
+1 -1
View File
@@ -70,7 +70,7 @@ const style = new Style({
* The styling function for the vector layer, will return an array of styles * The styling function for the vector layer, will return an array of styles
* which either contains the aboove gradient or pattern. * which either contains the aboove gradient or pattern.
* *
* @param {ol.Feature} feature The feature to style. * @param {module:ol/Feature~Feature} feature The feature to style.
* @param {number} resolution Resolution. * @param {number} resolution Resolution.
* @return {ol.style.Style} The style to use for the feature. * @return {ol.style.Style} The style to use for the feature.
*/ */
+5 -5
View File
@@ -61,7 +61,7 @@ const map = new Map({
const zoomtoswitzerlandbest = document.getElementById('zoomtoswitzerlandbest'); const zoomtoswitzerlandbest = document.getElementById('zoomtoswitzerlandbest');
zoomtoswitzerlandbest.addEventListener('click', function() { zoomtoswitzerlandbest.addEventListener('click', function() {
const feature = source.getFeatures()[0]; const feature = source.getFeatures()[0];
const polygon = /** @type {ol.geom.SimpleGeometry} */ (feature.getGeometry()); const polygon = /** @type {module:ol/geom/SimpleGeometry~SimpleGeometry} */ (feature.getGeometry());
view.fit(polygon, {padding: [170, 50, 30, 150], constrainResolution: false}); view.fit(polygon, {padding: [170, 50, 30, 150], constrainResolution: false});
}, false); }, false);
@@ -69,7 +69,7 @@ const zoomtoswitzerlandconstrained =
document.getElementById('zoomtoswitzerlandconstrained'); document.getElementById('zoomtoswitzerlandconstrained');
zoomtoswitzerlandconstrained.addEventListener('click', function() { zoomtoswitzerlandconstrained.addEventListener('click', function() {
const feature = source.getFeatures()[0]; const feature = source.getFeatures()[0];
const polygon = /** @type {ol.geom.SimpleGeometry} */ (feature.getGeometry()); const polygon = /** @type {module:ol/geom/SimpleGeometry~SimpleGeometry} */ (feature.getGeometry());
view.fit(polygon, {padding: [170, 50, 30, 150]}); view.fit(polygon, {padding: [170, 50, 30, 150]});
}, false); }, false);
@@ -77,21 +77,21 @@ const zoomtoswitzerlandnearest =
document.getElementById('zoomtoswitzerlandnearest'); document.getElementById('zoomtoswitzerlandnearest');
zoomtoswitzerlandnearest.addEventListener('click', function() { zoomtoswitzerlandnearest.addEventListener('click', function() {
const feature = source.getFeatures()[0]; const feature = source.getFeatures()[0];
const polygon = /** @type {ol.geom.SimpleGeometry} */ (feature.getGeometry()); const polygon = /** @type {module:ol/geom/SimpleGeometry~SimpleGeometry} */ (feature.getGeometry());
view.fit(polygon, {padding: [170, 50, 30, 150], nearest: true}); view.fit(polygon, {padding: [170, 50, 30, 150], nearest: true});
}, false); }, false);
const zoomtolausanne = document.getElementById('zoomtolausanne'); const zoomtolausanne = document.getElementById('zoomtolausanne');
zoomtolausanne.addEventListener('click', function() { zoomtolausanne.addEventListener('click', function() {
const feature = source.getFeatures()[1]; const feature = source.getFeatures()[1];
const point = /** @type {ol.geom.SimpleGeometry} */ (feature.getGeometry()); const point = /** @type {module:ol/geom/SimpleGeometry~SimpleGeometry} */ (feature.getGeometry());
view.fit(point, {padding: [170, 50, 30, 150], minResolution: 50}); view.fit(point, {padding: [170, 50, 30, 150], minResolution: 50});
}, false); }, false);
const centerlausanne = document.getElementById('centerlausanne'); const centerlausanne = document.getElementById('centerlausanne');
centerlausanne.addEventListener('click', function() { centerlausanne.addEventListener('click', function() {
const feature = source.getFeatures()[1]; const feature = source.getFeatures()[1];
const point = /** @type {ol.geom.Point} */ (feature.getGeometry()); const point = /** @type {module:ol/geom/Point~Point} */ (feature.getGeometry());
const size = /** @type {ol.Size} */ (map.getSize()); const size = /** @type {ol.Size} */ (map.getSize());
view.centerOn(point.getCoordinates(), size, [570, 500]); view.centerOn(point.getCoordinates(), size, [570, 500]);
}, false); }, false);
+4 -4
View File
@@ -49,7 +49,7 @@ app.Drag = function() {
this.cursor_ = 'pointer'; this.cursor_ = 'pointer';
/** /**
* @type {ol.Feature} * @type {module:ol/Feature~Feature}
* @private * @private
*/ */
this.feature_ = null; this.feature_ = null;
@@ -65,7 +65,7 @@ inherits(app.Drag, PointerInteraction);
/** /**
* @param {ol.MapBrowserEvent} evt Map browser event. * @param {module:ol/MapBrowserEvent~MapBrowserEvent} evt Map browser event.
* @return {boolean} `true` to start the drag sequence. * @return {boolean} `true` to start the drag sequence.
*/ */
app.Drag.prototype.handleDownEvent = function(evt) { app.Drag.prototype.handleDownEvent = function(evt) {
@@ -86,7 +86,7 @@ app.Drag.prototype.handleDownEvent = function(evt) {
/** /**
* @param {ol.MapBrowserEvent} evt Map browser event. * @param {module:ol/MapBrowserEvent~MapBrowserEvent} evt Map browser event.
*/ */
app.Drag.prototype.handleDragEvent = function(evt) { app.Drag.prototype.handleDragEvent = function(evt) {
const deltaX = evt.coordinate[0] - this.coordinate_[0]; const deltaX = evt.coordinate[0] - this.coordinate_[0];
@@ -101,7 +101,7 @@ app.Drag.prototype.handleDragEvent = function(evt) {
/** /**
* @param {ol.MapBrowserEvent} evt Event. * @param {module:ol/MapBrowserEvent~MapBrowserEvent} evt Event.
*/ */
app.Drag.prototype.handleMoveEvent = function(evt) { app.Drag.prototype.handleMoveEvent = function(evt) {
if (this.cursor_) { if (this.cursor_) {
+1 -1
View File
@@ -37,7 +37,7 @@ d3.json('data/topojson/us.json', function(error, us) {
* @param {number} resolution Resolution. * @param {number} resolution Resolution.
* @param {number} pixelRatio Pixel ratio. * @param {number} pixelRatio Pixel ratio.
* @param {ol.Size} size Size. * @param {ol.Size} size Size.
* @param {ol.proj.Projection} projection Projection. * @param {module:ol/proj/Projection~Projection} projection Projection.
* @return {HTMLCanvasElement} A canvas element. * @return {HTMLCanvasElement} A canvas element.
*/ */
const canvasFunction = function(extent, resolution, pixelRatio, size, projection) { const canvasFunction = function(extent, resolution, pixelRatio, size, projection) {
+2 -2
View File
@@ -57,7 +57,7 @@ const polyline = [
'~@ym@yjA??a@cFd@kBrCgDbAUnAcBhAyAdk@et@??kF}D??OL' '~@ym@yjA??a@cFd@kBrCgDbAUnAcBhAyAdk@et@??kF}D??OL'
].join(''); ].join('');
const route = /** @type {ol.geom.LineString} */ (new Polyline({ const route = /** @type {module:ol/geom/LineString~LineString} */ (new Polyline({
factor: 1e6 factor: 1e6
}).readGeometry(polyline, { }).readGeometry(polyline, {
dataProjection: 'EPSG:4326', dataProjection: 'EPSG:4326',
@@ -197,7 +197,7 @@ function stopAnimation(ended) {
// if animation cancelled set the marker at the beginning // if animation cancelled set the marker at the beginning
const coord = ended ? routeCoords[routeLength - 1] : routeCoords[0]; const coord = ended ? routeCoords[routeLength - 1] : routeCoords[0];
/** @type {ol.geom.Point} */ (geoMarker.getGeometry()) /** @type {module:ol/geom/Point~Point} */ (geoMarker.getGeometry())
.setCoordinates(coord); .setCoordinates(coord);
//remove listener //remove listener
map.un('postcompose', moveFeature); map.un('postcompose', moveFeature);
+1 -1
View File
@@ -43,7 +43,7 @@ map.addOverlay(marker);
// is time aware. // is time aware.
// The Z dimension is actually used to store the rotation (heading). // The Z dimension is actually used to store the rotation (heading).
const positions = new LineString([], const positions = new LineString([],
/** @type {ol.geom.GeometryLayout} */ ('XYZM')); /** @type {module:ol/geom/GeometryLayout~GeometryLayout} */ ('XYZM'));
// Geolocation Control // Geolocation Control
const geolocation = new Geolocation({ const geolocation = new Geolocation({
+1 -1
View File
@@ -192,7 +192,7 @@ document.getElementById('time').addEventListener('input', function() {
const value = parseInt(this.value, 10) / 100; const value = parseInt(this.value, 10) / 100;
const m = time.start + (time.duration * value); const m = time.start + (time.duration * value);
vectorSource.forEachFeature(function(feature) { vectorSource.forEachFeature(function(feature) {
const geometry = /** @type {ol.geom.LineString} */ (feature.getGeometry()); const geometry = /** @type {module:ol/geom/LineString~LineString} */ (feature.getGeometry());
const coordinate = geometry.getCoordinateAtM(m, true); const coordinate = geometry.getCoordinateAtM(m, true);
let highlight = feature.get('highlight'); let highlight = feature.get('highlight');
if (highlight === undefined) { if (highlight === undefined) {
+4 -4
View File
@@ -44,7 +44,7 @@ const vector = new VectorLayer({
/** /**
* Currently drawn feature. * Currently drawn feature.
* @type {ol.Feature} * @type {module:ol/Feature~Feature}
*/ */
let sketch; let sketch;
@@ -93,7 +93,7 @@ const continueLineMsg = 'Click to continue drawing the line';
/** /**
* Handle pointer move. * Handle pointer move.
* @param {ol.MapBrowserEvent} evt The event. * @param {module:ol/MapBrowserEvent~MapBrowserEvent} evt The event.
*/ */
const pointerMoveHandler = function(evt) { const pointerMoveHandler = function(evt) {
if (evt.dragging) { if (evt.dragging) {
@@ -140,7 +140,7 @@ let draw; // global so we can remove it later
/** /**
* Format length output. * Format length output.
* @param {ol.geom.LineString} line The line. * @param {module:ol/geom/LineString~LineString} line The line.
* @return {string} The formatted length. * @return {string} The formatted length.
*/ */
const formatLength = function(line) { const formatLength = function(line) {
@@ -159,7 +159,7 @@ const formatLength = function(line) {
/** /**
* Format area output. * Format area output.
* @param {ol.geom.Polygon} polygon The polygon. * @param {module:ol/geom/Polygon~Polygon} polygon The polygon.
* @return {string} Formatted area. * @return {string} Formatted area.
*/ */
const formatArea = function(polygon) { const formatArea = function(polygon) {
+2 -2
View File
@@ -10,7 +10,7 @@ import TileWMS from '../src/ol/source/TileWMS.js';
// By default OpenLayers does not know about the EPSG:21781 (Swiss) projection. // By default OpenLayers does not know about the EPSG:21781 (Swiss) projection.
// So we create a projection instance for EPSG:21781 and pass it to // So we create a projection instance for EPSG:21781 and pass it to
// ol.proj.addProjection to make it available to the library for lookup by its // ol/proj~addProjection to make it available to the library for lookup by its
// code. // code.
const projection = new Projection({ const projection = new Projection({
@@ -23,7 +23,7 @@ const projection = new Projection({
addProjection(projection); addProjection(projection);
// We also declare EPSG:21781/EPSG:4326 transform functions. These functions // We also declare EPSG:21781/EPSG:4326 transform functions. These functions
// are necessary for the ScaleLine control and when calling ol.proj.transform // are necessary for the ScaleLine control and when calling ol/proj~transform
// for setting the view's initial center (see below). // for setting the view's initial center (see below).
addCoordinateTransforms('EPSG:4326', projection, addCoordinateTransforms('EPSG:4326', projection,
+1 -1
View File
@@ -18,7 +18,7 @@ common.getRendererFromQueryString = function(opt_default) {};
* @param {function(new:ol.style.Stroke, olx.style.StrokeOptions=)} Stroke Stroke constructor. * @param {function(new:ol.style.Stroke, olx.style.StrokeOptions=)} Stroke Stroke constructor.
* @param {function(new:ol.style.Icon, olx.style.IconOptions=)} Icon Icon constructor. * @param {function(new:ol.style.Icon, olx.style.IconOptions=)} Icon Icon constructor.
* @param {function(new:ol.style.Text, olx.style.TextOptions=)} Text Text constructor. * @param {function(new:ol.style.Text, olx.style.TextOptions=)} Text Text constructor.
* @return {function((ol.Feature|ol.render.Feature), number): * @return {function((module:ol/Feature~Feature|ol.render.Feature), number):
* Array.<ol.style.Style>} * Array.<ol.style.Style>}
*/ */
var createMapboxStreetsV6Style = function(Style, Fill, Stroke, Icon, Text) {}; var createMapboxStreetsV6Style = function(Style, Fill, Stroke, Icon, Text) {};
+11 -11
View File
@@ -74,7 +74,7 @@ oli.DragBoxEvent.prototype.coordinate;
/** /**
* @type {ol.MapBrowserEvent} * @type {module:ol/MapBrowserEvent~MapBrowserEvent}
*/ */
oli.DragBoxEvent.prototype.mapBrowserEvent; oli.DragBoxEvent.prototype.mapBrowserEvent;
@@ -86,7 +86,7 @@ oli.DrawEvent = function() {};
/** /**
* @type {ol.Feature} * @type {module:ol/Feature~Feature}
*/ */
oli.DrawEvent.prototype.feature; oli.DrawEvent.prototype.feature;
@@ -109,13 +109,13 @@ oli.ModifyEvent = function() {};
/** /**
* @type {ol.Collection.<ol.Feature>} * @type {ol.Collection.<module:ol/Feature~Feature>}
*/ */
oli.ModifyEvent.prototype.features; oli.ModifyEvent.prototype.features;
/** /**
* @type {ol.MapBrowserEvent} * @type {module:ol/MapBrowserEvent~MapBrowserEvent}
*/ */
oli.ModifyEvent.prototype.mapBrowserEvent; oli.ModifyEvent.prototype.mapBrowserEvent;
@@ -199,19 +199,19 @@ oli.SelectEvent = function() {};
/** /**
* @type {Array.<ol.Feature>} * @type {Array.<module:ol/Feature~Feature>}
*/ */
oli.SelectEvent.prototype.deselected; oli.SelectEvent.prototype.deselected;
/** /**
* @type {Array.<ol.Feature>} * @type {Array.<module:ol/Feature~Feature>}
*/ */
oli.SelectEvent.prototype.selected; oli.SelectEvent.prototype.selected;
/** /**
* @type {ol.MapBrowserEvent} * @type {module:ol/MapBrowserEvent~MapBrowserEvent}
*/ */
oli.SelectEvent.prototype.mapBrowserEvent; oli.SelectEvent.prototype.mapBrowserEvent;
@@ -248,13 +248,13 @@ oli.interaction.DragAndDropEvent = function() {};
/** /**
* @type {Array.<ol.Feature>|undefined} * @type {Array.<module:ol/Feature~Feature>|undefined}
*/ */
oli.interaction.DragAndDropEvent.prototype.features; oli.interaction.DragAndDropEvent.prototype.features;
/** /**
* @type {ol.proj.Projection|undefined} * @type {module:ol/proj/Projection~Projection|undefined}
*/ */
oli.interaction.DragAndDropEvent.prototype.projection; oli.interaction.DragAndDropEvent.prototype.projection;
@@ -272,7 +272,7 @@ oli.interaction.TranslateEvent = function() {};
/** /**
* @type {ol.Collection.<ol.Feature>} * @type {ol.Collection.<module:ol/Feature~Feature>}
*/ */
oli.interaction.TranslateEvent.prototype.features; oli.interaction.TranslateEvent.prototype.features;
@@ -380,6 +380,6 @@ oli.source.Vector.Event = function() {};
/** /**
* @type {ol.Feature|undefined} * @type {module:ol/Feature~Feature|undefined}
*/ */
oli.source.Vector.Event.prototype.feature; oli.source.Vector.Event.prototype.feature;
+57 -57
View File
@@ -91,7 +91,7 @@ olx.interaction.DragBoxOptions.prototype.className;
/** /**
* A function that takes an {@link ol.MapBrowserEvent} and returns a boolean * A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
* to indicate whether that event should be handled. * to indicate whether that event should be handled.
* Default is {@link ol.events.condition.always}. * Default is {@link ol.events.condition.always}.
* @type {ol.EventsConditionType|undefined} * @type {ol.EventsConditionType|undefined}
@@ -110,7 +110,7 @@ olx.interaction.DragBoxOptions.prototype.minArea;
/** /**
* A function that takes a {@link ol.MapBrowserEvent} and two * A function that takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and two
* {@link ol.Pixel}s to indicate whether a `boxend` event should be fired. * {@link ol.Pixel}s to indicate whether a `boxend` event should be fired.
* Default is `true` if the area of the box is bigger than the `minArea` option. * Default is `true` if the area of the box is bigger than the `minArea` option.
* @type {ol.DragBoxEndConditionType|undefined} * @type {ol.DragBoxEndConditionType|undefined}
@@ -127,7 +127,7 @@ olx.interaction.DragPanOptions;
/** /**
* A function that takes an {@link ol.MapBrowserEvent} and returns a boolean * A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
* to indicate whether that event should be handled. * to indicate whether that event should be handled.
* Default is {@link ol.events.condition.noModifierKeys}. * Default is {@link ol.events.condition.noModifierKeys}.
* @type {ol.EventsConditionType|undefined} * @type {ol.EventsConditionType|undefined}
@@ -152,7 +152,7 @@ olx.interaction.DragRotateAndZoomOptions;
/** /**
* A function that takes an {@link ol.MapBrowserEvent} and returns a boolean * A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
* to indicate whether that event should be handled. * to indicate whether that event should be handled.
* Default is {@link ol.events.condition.shiftKeyOnly}. * Default is {@link ol.events.condition.shiftKeyOnly}.
* @type {ol.EventsConditionType|undefined} * @type {ol.EventsConditionType|undefined}
@@ -177,7 +177,7 @@ olx.interaction.DragRotateOptions;
/** /**
* A function that takes an {@link ol.MapBrowserEvent} and returns a boolean * A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
* to indicate whether that event should be handled. * to indicate whether that event should be handled.
* Default is {@link ol.events.condition.altShiftKeysOnly}. * Default is {@link ol.events.condition.altShiftKeysOnly}.
* @type {ol.EventsConditionType|undefined} * @type {ol.EventsConditionType|undefined}
@@ -212,7 +212,7 @@ olx.interaction.DragZoomOptions.prototype.className;
/** /**
* A function that takes an {@link ol.MapBrowserEvent} and returns a boolean * A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
* to indicate whether that event should be handled. * to indicate whether that event should be handled.
* Default is {@link ol.events.condition.shiftKeyOnly}. * Default is {@link ol.events.condition.shiftKeyOnly}.
* @type {ol.EventsConditionType|undefined} * @type {ol.EventsConditionType|undefined}
@@ -239,11 +239,11 @@ olx.interaction.DragZoomOptions.prototype.out;
/** /**
* @typedef {{clickTolerance: (number|undefined), * @typedef {{clickTolerance: (number|undefined),
* features: (ol.Collection.<ol.Feature>|undefined), * features: (ol.Collection.<module:ol/Feature~Feature>|undefined),
* source: (ol.source.Vector|undefined), * source: (ol.source.Vector|undefined),
* dragVertexDelay: (number|undefined), * dragVertexDelay: (number|undefined),
* snapTolerance: (number|undefined), * snapTolerance: (number|undefined),
* type: (ol.geom.GeometryType|string), * type: (module:ol/geom/GeometryType~GeometryType|string),
* stopClick: (boolean|undefined), * stopClick: (boolean|undefined),
* maxPoints: (number|undefined), * maxPoints: (number|undefined),
* minPoints: (number|undefined), * minPoints: (number|undefined),
@@ -273,7 +273,7 @@ olx.interaction.DrawOptions.prototype.clickTolerance;
/** /**
* Destination collection for the drawn features. * Destination collection for the drawn features.
* @type {ol.Collection.<ol.Feature>|undefined} * @type {ol.Collection.<module:ol/Feature~Feature>|undefined}
* @api * @api
*/ */
olx.interaction.DrawOptions.prototype.features; olx.interaction.DrawOptions.prototype.features;
@@ -306,7 +306,7 @@ olx.interaction.DrawOptions.prototype.snapTolerance;
/** /**
* Drawing type ('Point', 'LineString', 'Polygon', 'MultiPoint', * Drawing type ('Point', 'LineString', 'Polygon', 'MultiPoint',
* 'MultiLineString', 'MultiPolygon' or 'Circle'). * 'MultiLineString', 'MultiPolygon' or 'Circle').
* @type {ol.geom.GeometryType|string} * @type {module:ol/geom/GeometryType~GeometryType|string}
* @api * @api
*/ */
olx.interaction.DrawOptions.prototype.type; olx.interaction.DrawOptions.prototype.type;
@@ -340,7 +340,7 @@ olx.interaction.DrawOptions.prototype.minPoints;
/** /**
* A function that takes an {@link ol.MapBrowserEvent} and returns a boolean * A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
* to indicate whether the drawing can be finished. * to indicate whether the drawing can be finished.
* @type {ol.EventsConditionType|undefined} * @type {ol.EventsConditionType|undefined}
* @api * @api
@@ -373,7 +373,7 @@ olx.interaction.DrawOptions.prototype.geometryName;
/** /**
* A function that takes an {@link ol.MapBrowserEvent} and returns a boolean * A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
* to indicate whether that event should be handled. * to indicate whether that event should be handled.
* By default {@link ol.events.condition.noModifierKeys}, i.e. a click, adds a * By default {@link ol.events.condition.noModifierKeys}, i.e. a click, adds a
* vertex or deactivates freehand drawing. * vertex or deactivates freehand drawing.
@@ -395,7 +395,7 @@ olx.interaction.DrawOptions.prototype.freehand;
/** /**
* Condition that activates freehand drawing for lines and polygons. This * Condition that activates freehand drawing for lines and polygons. This
* function takes an {@link ol.MapBrowserEvent} and returns a boolean to * function takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean to
* indicate whether that event should be handled. The default is * indicate whether that event should be handled. The default is
* {@link ol.events.condition.shiftKeyOnly}, meaning that the Shift key * {@link ol.events.condition.shiftKeyOnly}, meaning that the Shift key
* activates freehand drawing. * activates freehand drawing.
@@ -432,7 +432,7 @@ olx.interaction.ExtentOptions.prototype.extent;
/** /**
* Style for the drawn extent box. * Style for the drawn extent box.
* Defaults to ol.style.Style.createDefaultEditing()[ol.geom.GeometryType.POLYGON] * Defaults to ol.style.Style.createDefaultEditing()[module:ol/geom/GeometryType~GeometryType.POLYGON]
* @type {ol.style.Style|Array.<ol.style.Style>|ol.StyleFunction|undefined} * @type {ol.style.Style|Array.<ol.style.Style>|ol.StyleFunction|undefined}
* @api * @api
*/ */
@@ -448,7 +448,7 @@ olx.interaction.ExtentOptions.prototype.pixelTolerance;
/** /**
* Style for the cursor used to draw the extent. * Style for the cursor used to draw the extent.
* Defaults to ol.style.Style.createDefaultEditing()[ol.geom.GeometryType.POINT] * Defaults to ol.style.Style.createDefaultEditing()[module:ol/geom/GeometryType~GeometryType.POINT]
* @type {ol.style.Style|Array.<ol.style.Style>|ol.StyleFunction|undefined} * @type {ol.style.Style|Array.<ol.style.Style>|ol.StyleFunction|undefined}
* @api * @api
*/ */
@@ -465,7 +465,7 @@ olx.interaction.ExtentOptions.prototype.wrapX;
/** /**
* @typedef {{ * @typedef {{
* features: (ol.Collection.<ol.Feature>|undefined), * features: (ol.Collection.<module:ol/Feature~Feature>|undefined),
* layers: (undefined|Array.<ol.layer.Layer>|function(ol.layer.Layer): boolean), * layers: (undefined|Array.<ol.layer.Layer>|function(ol.layer.Layer): boolean),
* hitTolerance: (number|undefined) * hitTolerance: (number|undefined)
* }} * }}
@@ -476,7 +476,7 @@ olx.interaction.TranslateOptions;
/** /**
* Only features contained in this collection will be able to be translated. If * Only features contained in this collection will be able to be translated. If
* not specified, all features on the map will be able to be translated. * not specified, all features on the map will be able to be translated.
* @type {ol.Collection.<ol.Feature>|undefined} * @type {ol.Collection.<module:ol/Feature~Feature>|undefined}
* @api * @api
*/ */
olx.interaction.TranslateOptions.prototype.features; olx.interaction.TranslateOptions.prototype.features;
@@ -513,7 +513,7 @@ olx.interaction.KeyboardPanOptions;
/** /**
* A function that takes an {@link ol.MapBrowserEvent} and returns a boolean * A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
* to indicate whether that event should be handled. * to indicate whether that event should be handled.
* Default is {@link ol.events.condition.noModifierKeys} and * Default is {@link ol.events.condition.noModifierKeys} and
* {@link ol.events.condition.targetNotEditable}. * {@link ol.events.condition.targetNotEditable}.
@@ -556,7 +556,7 @@ olx.interaction.KeyboardZoomOptions.prototype.duration;
/** /**
* A function that takes an {@link ol.MapBrowserEvent} and returns a boolean * A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
* to indicate whether that event should be handled. * to indicate whether that event should be handled.
* Default is {@link ol.events.condition.targetNotEditable}. * Default is {@link ol.events.condition.targetNotEditable}.
* @type {ol.EventsConditionType|undefined} * @type {ol.EventsConditionType|undefined}
@@ -581,7 +581,7 @@ olx.interaction.KeyboardZoomOptions.prototype.delta;
* pixelTolerance: (number|undefined), * pixelTolerance: (number|undefined),
* style: (ol.style.Style|Array.<ol.style.Style>|ol.StyleFunction|undefined), * style: (ol.style.Style|Array.<ol.style.Style>|ol.StyleFunction|undefined),
* source: (ol.source.Vector|undefined), * source: (ol.source.Vector|undefined),
* features: (ol.Collection.<ol.Feature>|undefined), * features: (ol.Collection.<module:ol/Feature~Feature>|undefined),
* wrapX: (boolean|undefined) * wrapX: (boolean|undefined)
* }} * }}
*/ */
@@ -589,7 +589,7 @@ olx.interaction.ModifyOptions;
/** /**
* A function that takes an {@link ol.MapBrowserEvent} and returns a boolean * A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
* to indicate whether that event will be considered to add or move a vertex * to indicate whether that event will be considered to add or move a vertex
* to the sketch. * to the sketch.
* Default is {@link ol.events.condition.primaryAction}. * Default is {@link ol.events.condition.primaryAction}.
@@ -600,7 +600,7 @@ olx.interaction.ModifyOptions.prototype.condition;
/** /**
* A function that takes an {@link ol.MapBrowserEvent} and returns a boolean * A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
* to indicate whether that event should be handled. * to indicate whether that event should be handled.
* By default, {@link ol.events.condition.singleClick} with * By default, {@link ol.events.condition.singleClick} with
* {@link ol.events.condition.altKeyOnly} results in a vertex deletion. * {@link ol.events.condition.altKeyOnly} results in a vertex deletion.
@@ -611,7 +611,7 @@ olx.interaction.ModifyOptions.prototype.deleteCondition;
/** /**
* A function that takes an {@link ol.MapBrowserEvent} and returns a boolean * A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
* to indicate whether a new vertex can be added to the sketch features. * to indicate whether a new vertex can be added to the sketch features.
* Default is {@link ol.events.condition.always} * Default is {@link ol.events.condition.always}
* @type {ol.EventsConditionType|undefined} * @type {ol.EventsConditionType|undefined}
@@ -650,7 +650,7 @@ olx.interaction.ModifyOptions.prototype.source;
/** /**
* The features the interaction works on. If a feature collection is not * The features the interaction works on. If a feature collection is not
* provided, a vector source must be provided with the source option. * provided, a vector source must be provided with the source option.
* @type {ol.Collection.<ol.Feature>|undefined} * @type {ol.Collection.<module:ol/Feature~Feature>|undefined}
* @api * @api
*/ */
olx.interaction.ModifyOptions.prototype.features; olx.interaction.ModifyOptions.prototype.features;
@@ -675,7 +675,7 @@ olx.interaction.MouseWheelZoomOptions;
/** /**
* A function that takes an {@link ol.MapBrowserEvent} and returns a boolean * A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
* to indicate whether that event should be handled. Default is {@link ol.events.condition.always}. * to indicate whether that event should be handled. Default is {@link ol.events.condition.always}.
* @type {ol.EventsConditionType|undefined} * @type {ol.EventsConditionType|undefined}
* @api * @api
@@ -769,7 +769,7 @@ olx.interaction.PinchZoomOptions.prototype.constrainResolution;
/** /**
* @typedef {{handleDownEvent: (function(ol.MapBrowserPointerEvent):boolean|undefined), * @typedef {{handleDownEvent: (function(ol.MapBrowserPointerEvent):boolean|undefined),
* handleDragEvent: (function(ol.MapBrowserPointerEvent)|undefined), * handleDragEvent: (function(ol.MapBrowserPointerEvent)|undefined),
* handleEvent: (function(ol.MapBrowserEvent):boolean|undefined), * handleEvent: (function(module:ol/MapBrowserEvent~MapBrowserEvent):boolean|undefined),
* handleMoveEvent: (function(ol.MapBrowserPointerEvent)|undefined), * handleMoveEvent: (function(ol.MapBrowserPointerEvent)|undefined),
* handleUpEvent: (function(ol.MapBrowserPointerEvent):boolean|undefined)}} * handleUpEvent: (function(ol.MapBrowserPointerEvent):boolean|undefined)}}
*/ */
@@ -799,7 +799,7 @@ olx.interaction.PointerOptions.prototype.handleDragEvent;
* dispatched to the map. The function may return `false` to prevent the * dispatched to the map. The function may return `false` to prevent the
* propagation of the event to other interactions in the map's interactions * propagation of the event to other interactions in the map's interactions
* chain. * chain.
* @type {(function(ol.MapBrowserEvent):boolean|undefined)} * @type {(function(module:ol/MapBrowserEvent~MapBrowserEvent):boolean|undefined)}
* @api * @api
*/ */
olx.interaction.PointerOptions.prototype.handleEvent; olx.interaction.PointerOptions.prototype.handleEvent;
@@ -832,7 +832,7 @@ olx.interaction.PointerOptions.prototype.handleUpEvent;
* removeCondition: (ol.EventsConditionType|undefined), * removeCondition: (ol.EventsConditionType|undefined),
* toggleCondition: (ol.EventsConditionType|undefined), * toggleCondition: (ol.EventsConditionType|undefined),
* multi: (boolean|undefined), * multi: (boolean|undefined),
* features: (ol.Collection.<ol.Feature>|undefined), * features: (ol.Collection.<module:ol/Feature~Feature>|undefined),
* filter: (ol.SelectFilterFunction|undefined), * filter: (ol.SelectFilterFunction|undefined),
* wrapX: (boolean|undefined), * wrapX: (boolean|undefined),
* hitTolerance: (number|undefined)}} * hitTolerance: (number|undefined)}}
@@ -841,7 +841,7 @@ olx.interaction.SelectOptions;
/** /**
* A function that takes an {@link ol.MapBrowserEvent} and returns a boolean * A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
* to indicate whether that event should be handled. * to indicate whether that event should be handled.
* By default, this is {@link ol.events.condition.never}. Use this if you want * By default, this is {@link ol.events.condition.never}. Use this if you want
* to use different events for add and remove instead of `toggle`. * to use different events for add and remove instead of `toggle`.
@@ -852,7 +852,7 @@ olx.interaction.SelectOptions.prototype.addCondition;
/** /**
* A function that takes an {@link ol.MapBrowserEvent} and returns a boolean * A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
* to indicate whether that event should be handled. * to indicate whether that event should be handled.
* This is the event for the selected features as a whole. By default, this is * This is the event for the selected features as a whole. By default, this is
* {@link ol.events.condition.singleClick}. Clicking on a feature selects that * {@link ol.events.condition.singleClick}. Clicking on a feature selects that
@@ -888,7 +888,7 @@ olx.interaction.SelectOptions.prototype.style;
/** /**
* A function that takes an {@link ol.MapBrowserEvent} and returns a boolean * A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
* to indicate whether that event should be handled. * to indicate whether that event should be handled.
* By default, this is {@link ol.events.condition.never}. Use this if you want * By default, this is {@link ol.events.condition.never}. Use this if you want
* to use different events for add and remove instead of `toggle`. * to use different events for add and remove instead of `toggle`.
@@ -899,7 +899,7 @@ olx.interaction.SelectOptions.prototype.removeCondition;
/** /**
* A function that takes an {@link ol.MapBrowserEvent} and returns a boolean * A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
* to indicate whether that event should be handled. * to indicate whether that event should be handled.
* This is in addition to the `condition` event. By default, * This is in addition to the `condition` event. By default,
* {@link ol.events.condition.shiftKeyOnly}, i.e. pressing `shift` as well as * {@link ol.events.condition.shiftKeyOnly}, i.e. pressing `shift` as well as
@@ -927,13 +927,13 @@ olx.interaction.SelectOptions.prototype.multi;
* not set the interaction will create a collection. In any case the collection * not set the interaction will create a collection. In any case the collection
* used by the interaction is returned by * used by the interaction is returned by
* {@link ol.interaction.Select#getFeatures}. * {@link ol.interaction.Select#getFeatures}.
* @type {ol.Collection.<ol.Feature>|undefined} * @type {ol.Collection.<module:ol/Feature~Feature>|undefined}
* @api * @api
*/ */
olx.interaction.SelectOptions.prototype.features; olx.interaction.SelectOptions.prototype.features;
/** /**
* A function that takes an {@link ol.Feature} and an {@link ol.layer.Layer} and * A function that takes an {@link module:ol/Feature~Feature} and an {@link ol.layer.Layer} and
* returns `true` if the feature may be selected or `false` otherwise. * returns `true` if the feature may be selected or `false` otherwise.
* @type {ol.SelectFilterFunction|undefined} * @type {ol.SelectFilterFunction|undefined}
* @api * @api
@@ -962,7 +962,7 @@ olx.interaction.SelectOptions.prototype.hitTolerance;
/** /**
* Options for snap * Options for snap
* @typedef {{ * @typedef {{
* features: (ol.Collection.<ol.Feature>|undefined), * features: (ol.Collection.<module:ol/Feature~Feature>|undefined),
* pixelTolerance: (number|undefined), * pixelTolerance: (number|undefined),
* source: (ol.source.Vector|undefined), * source: (ol.source.Vector|undefined),
* edge: (boolean|undefined), * edge: (boolean|undefined),
@@ -974,7 +974,7 @@ olx.interaction.SnapOptions;
/** /**
* Snap to these features. Either this option or source should be provided. * Snap to these features. Either this option or source should be provided.
* @type {ol.Collection.<ol.Feature>|undefined} * @type {ol.Collection.<module:ol/Feature~Feature>|undefined}
* @api * @api
*/ */
olx.interaction.SnapOptions.prototype.features; olx.interaction.SnapOptions.prototype.features;
@@ -1220,7 +1220,7 @@ olx.layer.GroupOptions.prototype.layers;
* radius: (number|undefined), * radius: (number|undefined),
* blur: (number|undefined), * blur: (number|undefined),
* shadow: (number|undefined), * shadow: (number|undefined),
* weight: (string|function(ol.Feature):number|undefined), * weight: (string|function(module:ol/Feature~Feature):number|undefined),
* extent: (ol.Extent|undefined), * extent: (ol.Extent|undefined),
* minResolution: (number|undefined), * minResolution: (number|undefined),
* maxResolution: (number|undefined), * maxResolution: (number|undefined),
@@ -1269,7 +1269,7 @@ olx.layer.HeatmapOptions.prototype.shadow;
* The feature attribute to use for the weight or a function that returns a * The feature attribute to use for the weight or a function that returns a
* weight from a feature. Weight values should range from 0 to 1 (and values * weight from a feature. Weight values should range from 0 to 1 (and values
* outside will be clamped to that range). Default is `weight`. * outside will be clamped to that range). Default is `weight`.
* @type {string|function(ol.Feature):number|undefined} * @type {string|function(module:ol/Feature~Feature):number|undefined}
* @api * @api
*/ */
olx.layer.HeatmapOptions.prototype.weight; olx.layer.HeatmapOptions.prototype.weight;
@@ -1867,8 +1867,8 @@ olx.layer.VectorTileOptions.prototype.zIndex;
/** /**
* @typedef {{context: CanvasRenderingContext2D, * @typedef {{context: CanvasRenderingContext2D,
* feature: (ol.Feature|ol.render.Feature), * feature: (module:ol/Feature~Feature|ol.render.Feature),
* geometry: ol.geom.SimpleGeometry, * geometry: module:ol/geom/SimpleGeometry~SimpleGeometry,
* pixelRatio: number, * pixelRatio: number,
* resolution: number, * resolution: number,
* rotation: number}} * rotation: number}}
@@ -2017,7 +2017,7 @@ olx.source.BingMapsOptions.prototype.transition;
* distance: (number|undefined), * distance: (number|undefined),
* extent: (ol.Extent|undefined), * extent: (ol.Extent|undefined),
* format: (ol.format.Feature|undefined), * format: (ol.format.Feature|undefined),
* geometryFunction: (undefined|function(ol.Feature):ol.geom.Point), * geometryFunction: (undefined|function(module:ol/Feature~Feature):module:ol/geom/Point~Point),
* projection: ol.ProjectionLike, * projection: ol.ProjectionLike,
* source: ol.source.Vector, * source: ol.source.Vector,
* wrapX: (boolean|undefined)}} * wrapX: (boolean|undefined)}}
@@ -2050,8 +2050,8 @@ olx.source.ClusterOptions.prototype.extent;
/** /**
* Function that takes an {@link ol.Feature} as argument and returns an * Function that takes an {@link module:ol/Feature~Feature} as argument and returns an
* {@link ol.geom.Point} as cluster calculation point for the feature. When a * {@link module:ol/geom/Point~Point} as cluster calculation point for the feature. When a
* feature should not be considered for clustering, the function should return * feature should not be considered for clustering, the function should return
* `null`. The default, which works when the underyling source contains point * `null`. The default, which works when the underyling source contains point
* features only, is * features only, is
@@ -2060,9 +2060,9 @@ olx.source.ClusterOptions.prototype.extent;
* return feature.getGeometry(); * return feature.getGeometry();
* } * }
* ``` * ```
* See {@link ol.geom.Polygon#getInteriorPoint} for a way to get a cluster * See {@link module:ol/geom/Polygon~Polygon#getInteriorPoint} for a way to get a cluster
* calculation point for polygons. * calculation point for polygons.
* @type {undefined|function(ol.Feature):ol.geom.Point} * @type {undefined|function(module:ol/Feature~Feature):module:ol/geom/Point~Point}
* @api * @api
*/ */
olx.source.ClusterOptions.prototype.geometryFunction; olx.source.ClusterOptions.prototype.geometryFunction;
@@ -2885,7 +2885,7 @@ olx.source.ImageCanvasOptions.prototype.attributions;
* Canvas function. The function returning the canvas element used by the source * Canvas function. The function returning the canvas element used by the source
* as an image. The arguments passed to the function are: `{ol.Extent}` the * as an image. The arguments passed to the function are: `{ol.Extent}` the
* image extent, `{number}` the image resolution, `{number}` the device pixel * image extent, `{number}` the image resolution, `{number}` the device pixel
* ratio, `{ol.Size}` the image size, and `{ol.proj.Projection}` the image * ratio, `{ol.Size}` the image size, and `{module:ol/proj/Projection~Projection}` the image
* projection. The canvas returned by this function is cached by the source. If * projection. The canvas returned by this function is cached by the source. If
* the value returned by the function is later changed then * the value returned by the function is later changed then
* `dispatchChangeEvent` should be called on the source for the source to * `dispatchChangeEvent` should be called on the source for the source to
@@ -3693,12 +3693,12 @@ olx.source.TileWMSOptions.prototype.transition;
/** /**
* @typedef {{attributions: (ol.AttributionLike|undefined), * @typedef {{attributions: (ol.AttributionLike|undefined),
* features: (Array.<ol.Feature>|ol.Collection.<ol.Feature>|undefined), * features: (Array.<module:ol/Feature~Feature>|ol.Collection.<module:ol/Feature~Feature>|undefined),
* format: (ol.format.Feature|undefined), * format: (ol.format.Feature|undefined),
* loader: (ol.FeatureLoader|undefined), * loader: (module:ol/Feature~FeatureLoader|undefined),
* overlaps: (boolean|undefined), * overlaps: (boolean|undefined),
* strategy: (ol.LoadingStrategy|undefined), * strategy: (ol.LoadingStrategy|undefined),
* url: (string|ol.FeatureUrlFunction|undefined), * url: (string|module:ol/Feature~FeatureUrlFunction|undefined),
* useSpatialIndex: (boolean|undefined), * useSpatialIndex: (boolean|undefined),
* wrapX: (boolean|undefined)}} * wrapX: (boolean|undefined)}}
*/ */
@@ -3716,7 +3716,7 @@ olx.source.VectorOptions.prototype.attributions;
/** /**
* Features. If provided as {@link ol.Collection}, the features in the source * Features. If provided as {@link ol.Collection}, the features in the source
* and the collection will stay in sync. * and the collection will stay in sync.
* @type {Array.<ol.Feature>|ol.Collection.<ol.Feature>|undefined} * @type {Array.<module:ol/Feature~Feature>|ol.Collection.<module:ol/Feature~Feature>|undefined}
* @api * @api
*/ */
olx.source.VectorOptions.prototype.features; olx.source.VectorOptions.prototype.features;
@@ -3766,7 +3766,7 @@ olx.source.VectorOptions.prototype.format;
* strategy: ol.loadingstrategy.bbox * strategy: ol.loadingstrategy.bbox
* }); * });
* ``` * ```
* @type {ol.FeatureLoader|undefined} * @type {module:ol/Feature~FeatureLoader|undefined}
* @api * @api
*/ */
olx.source.VectorOptions.prototype.loader; olx.source.VectorOptions.prototype.loader;
@@ -3796,7 +3796,7 @@ olx.source.VectorOptions.prototype.strategy;
* Setting this option instructs the source to load features using an XHR loader * Setting this option instructs the source to load features using an XHR loader
* (see {@link ol.featureloader.xhr}). Use a `string` and an * (see {@link ol.featureloader.xhr}). Use a `string` and an
* {@link ol.loadingstrategy.all} for a one-off download of all features from * {@link ol.loadingstrategy.all} for a one-off download of all features from
* the given URL. Use a {@link ol.FeatureUrlFunction} to generate the url with * the given URL. Use a {@link module:ol/Feature~FeatureUrlFunction} to generate the url with
* other loading strategies. * other loading strategies.
* Requires `format` to be set as well. * Requires `format` to be set as well.
* When default XHR feature loader is provided, the features will * When default XHR feature loader is provided, the features will
@@ -3807,7 +3807,7 @@ olx.source.VectorOptions.prototype.strategy;
* defaultDataProjection constructor option on the format. * defaultDataProjection constructor option on the format.
* Note that if a source contains non-feature data, such as a GeoJSON geometry * Note that if a source contains non-feature data, such as a GeoJSON geometry
* or a KML NetworkLink, these will be ignored. Use a custom loader to load these. * or a KML NetworkLink, these will be ignored. Use a custom loader to load these.
* @type {string|ol.FeatureUrlFunction|undefined} * @type {string|module:ol/Feature~FeatureUrlFunction|undefined}
* @api * @api
*/ */
olx.source.VectorOptions.prototype.url; olx.source.VectorOptions.prototype.url;
@@ -5079,7 +5079,7 @@ olx.style.TextOptions.prototype.padding;
/** /**
* @typedef {{geometry: (undefined|string|ol.geom.Geometry|ol.StyleGeometryFunction), * @typedef {{geometry: (undefined|string|module:ol/geom/Geometry~Geometry|ol.StyleGeometryFunction),
* fill: (ol.style.Fill|undefined), * fill: (ol.style.Fill|undefined),
* image: (ol.style.Image|undefined), * image: (ol.style.Image|undefined),
* renderer: (ol.StyleRenderFunction|undefined), * renderer: (ol.StyleRenderFunction|undefined),
@@ -5093,7 +5093,7 @@ olx.style.StyleOptions;
/** /**
* Feature property or geometry or function returning a geometry to render for * Feature property or geometry or function returning a geometry to render for
* this style. * this style.
* @type {undefined|string|ol.geom.Geometry|ol.StyleGeometryFunction} * @type {undefined|string|module:ol/geom/Geometry~Geometry|ol.StyleGeometryFunction}
* @api * @api
*/ */
olx.style.StyleOptions.prototype.geometry; olx.style.StyleOptions.prototype.geometry;
@@ -5385,7 +5385,7 @@ olx.tilegrid.XYZOptions.prototype.tileSize;
/** /**
* @typedef {{center: ol.Coordinate, * @typedef {{center: ol.Coordinate,
* projection: ol.proj.Projection, * projection: module:ol/proj/Projection~Projection,
* resolution: number, * resolution: number,
* rotation: number, * rotation: number,
* zoom: number}} * zoom: number}}
@@ -5401,7 +5401,7 @@ olx.ViewState.prototype.center;
/** /**
* @type {ol.proj.Projection} * @type {module:ol/proj/Projection~Projection}
* @api * @api
*/ */
olx.ViewState.prototype.projection; olx.ViewState.prototype.projection;
+40 -40
View File
@@ -22,12 +22,12 @@
/** /**
* @typedef {Object} interaction_DragBoxOptions * @typedef {Object} interaction_DragBoxOptions
* @property {string|undefined} className CSS class name for styling the box. The default is `ol-dragbox`. * @property {string|undefined} className CSS class name for styling the box. The default is `ol-dragbox`.
* @property {ol.EventsConditionType|undefined} condition A function that takes an {@link ol.MapBrowserEvent} and returns a boolean * @property {ol.EventsConditionType|undefined} condition A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
* to indicate whether that event should be handled. * to indicate whether that event should be handled.
* Default is {@link ol.events.condition.always}. * Default is {@link ol.events.condition.always}.
* @property {number|undefined} minArea The minimum area of the box in pixel, this value is used by the default * @property {number|undefined} minArea The minimum area of the box in pixel, this value is used by the default
* `boxEndCondition` function. Default is `64`. * `boxEndCondition` function. Default is `64`.
* @property {ol.DragBoxEndConditionType|undefined} boxEndCondition A function that takes a {@link ol.MapBrowserEvent} and two * @property {ol.DragBoxEndConditionType|undefined} boxEndCondition A function that takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and two
* {@link ol.Pixel}s to indicate whether a `boxend` event should be fired. * {@link ol.Pixel}s to indicate whether a `boxend` event should be fired.
* Default is `true` if the area of the box is bigger than the `minArea` option. * Default is `true` if the area of the box is bigger than the `minArea` option.
*/ */
@@ -35,7 +35,7 @@
/** /**
* @typedef {Object} interaction_DragPanOptions * @typedef {Object} interaction_DragPanOptions
* @property {ol.EventsConditionType|undefined} condition A function that takes an {@link ol.MapBrowserEvent} and returns a boolean * @property {ol.EventsConditionType|undefined} condition A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
* to indicate whether that event should be handled. * to indicate whether that event should be handled.
* Default is {@link ol.events.condition.noModifierKeys}. * Default is {@link ol.events.condition.noModifierKeys}.
* @property {ol.Kinetic|undefined} kinetic Kinetic inertia to apply to the pan. * @property {ol.Kinetic|undefined} kinetic Kinetic inertia to apply to the pan.
@@ -44,7 +44,7 @@
/** /**
* @typedef {Object} interaction_DragRotateAndZoomOptions * @typedef {Object} interaction_DragRotateAndZoomOptions
* @property {ol.EventsConditionType|undefined} condition A function that takes an {@link ol.MapBrowserEvent} and returns a boolean * @property {ol.EventsConditionType|undefined} condition A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
* to indicate whether that event should be handled. * to indicate whether that event should be handled.
* Default is {@link ol.events.condition.shiftKeyOnly}. * Default is {@link ol.events.condition.shiftKeyOnly}.
* @property {number|undefined} duration Animation duration in milliseconds. Default is `400`. * @property {number|undefined} duration Animation duration in milliseconds. Default is `400`.
@@ -53,7 +53,7 @@
/** /**
* @typedef {Object} interaction_DragRotateOptions * @typedef {Object} interaction_DragRotateOptions
* @property {ol.EventsConditionType|undefined} condition A function that takes an {@link ol.MapBrowserEvent} and returns a boolean * @property {ol.EventsConditionType|undefined} condition A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
* to indicate whether that event should be handled. * to indicate whether that event should be handled.
* Default is {@link ol.events.condition.altShiftKeysOnly}. * Default is {@link ol.events.condition.altShiftKeysOnly}.
* @property {number|undefined} duration Animation duration in milliseconds. Default is `250`. * @property {number|undefined} duration Animation duration in milliseconds. Default is `250`.
@@ -63,7 +63,7 @@
/** /**
* @typedef {Object} interaction_DragZoomOptions * @typedef {Object} interaction_DragZoomOptions
* @property {string|undefined} className CSS class name for styling the box. The default is `ol-dragzoom`. * @property {string|undefined} className CSS class name for styling the box. The default is `ol-dragzoom`.
* @property {ol.EventsConditionType|undefined} condition A function that takes an {@link ol.MapBrowserEvent} and returns a boolean * @property {ol.EventsConditionType|undefined} condition A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
* to indicate whether that event should be handled. * to indicate whether that event should be handled.
* Default is {@link ol.events.condition.shiftKeyOnly}. * Default is {@link ol.events.condition.shiftKeyOnly}.
* @property {number|undefined} duration Animation duration in milliseconds. Default is `200`. * @property {number|undefined} duration Animation duration in milliseconds. Default is `200`.
@@ -78,12 +78,12 @@
* geometry being drawn. Default is 6 pixels. That value was chosen for * geometry being drawn. Default is 6 pixels. That value was chosen for
* the draw interaction to behave correctly on mouse as well as on touch * the draw interaction to behave correctly on mouse as well as on touch
* devices. * devices.
* @property {ol.Collection.<ol.Feature>|undefined} features Destination collection for the drawn features. * @property {ol.Collection.<module:ol/Feature~Feature>|undefined} features Destination collection for the drawn features.
* @property {ol.source.Vector|undefined} source Destination source for the drawn features. * @property {ol.source.Vector|undefined} source Destination source for the drawn features.
* @property {number|undefined} dragVertexDelay Delay in milliseconds after pointerdown before the current vertex can be * @property {number|undefined} dragVertexDelay Delay in milliseconds after pointerdown before the current vertex can be
* dragged to its exact position. Default is 500 ms. * dragged to its exact position. Default is 500 ms.
* @property {number|undefined} snapTolerance Pixel distance for snapping to the drawing finish. Default is `12`. * @property {number|undefined} snapTolerance Pixel distance for snapping to the drawing finish. Default is `12`.
* @property {ol.geom.GeometryType|string} type Drawing type ('Point', 'LineString', 'Polygon', 'MultiPoint', * @property {module:ol/geom/GeometryType~GeometryType|string} type Drawing type ('Point', 'LineString', 'Polygon', 'MultiPoint',
* 'MultiLineString', 'MultiPolygon' or 'Circle'). * 'MultiLineString', 'MultiPolygon' or 'Circle').
* @property {boolean|undefined} stopClick Stop click, singleclick, and doubleclick events from firing during drawing. * @property {boolean|undefined} stopClick Stop click, singleclick, and doubleclick events from firing during drawing.
* Default is `false`. * Default is `false`.
@@ -91,12 +91,12 @@
* is finished. The default is no restriction. * is finished. The default is no restriction.
* @property {number|undefined} minPoints The number of points that must be drawn before a polygon ring or line string * @property {number|undefined} minPoints The number of points that must be drawn before a polygon ring or line string
* can be finished. Default is `3` for polygon rings and `2` for line strings. * can be finished. Default is `3` for polygon rings and `2` for line strings.
* @property {ol.EventsConditionType|undefined} finishCondition A function that takes an {@link ol.MapBrowserEvent} and returns a boolean * @property {ol.EventsConditionType|undefined} finishCondition A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
* to indicate whether the drawing can be finished. * to indicate whether the drawing can be finished.
* @property {ol.style.Style|Array.<ol.style.Style>|ol.StyleFunction|undefined} style Style for sketch features. * @property {ol.style.Style|Array.<ol.style.Style>|ol.StyleFunction|undefined} style Style for sketch features.
* @property {ol.DrawGeometryFunctionType|undefined} geometryFunction Function that is called when a geometry's coordinates are updated. * @property {ol.DrawGeometryFunctionType|undefined} geometryFunction Function that is called when a geometry's coordinates are updated.
* @property {string|undefined} geometryName Geometry name to use for features created by the draw interaction. * @property {string|undefined} geometryName Geometry name to use for features created by the draw interaction.
* @property {ol.EventsConditionType|undefined} condition A function that takes an {@link ol.MapBrowserEvent} and returns a boolean * @property {ol.EventsConditionType|undefined} condition A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
* to indicate whether that event should be handled. * to indicate whether that event should be handled.
* By default {@link ol.events.condition.noModifierKeys}, i.e. a click, adds a * By default {@link ol.events.condition.noModifierKeys}, i.e. a click, adds a
* vertex or deactivates freehand drawing. * vertex or deactivates freehand drawing.
@@ -104,7 +104,7 @@
* interaction always operate in freehand mode and takes precedence over any * interaction always operate in freehand mode and takes precedence over any
* `freehandCondition` option. * `freehandCondition` option.
* @property {ol.EventsConditionType|undefined} freehandCondition Condition that activates freehand drawing for lines and polygons. This * @property {ol.EventsConditionType|undefined} freehandCondition Condition that activates freehand drawing for lines and polygons. This
* function takes an {@link ol.MapBrowserEvent} and returns a boolean to * function takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean to
* indicate whether that event should be handled. The default is * indicate whether that event should be handled. The default is
* {@link ol.events.condition.shiftKeyOnly}, meaning that the Shift key * {@link ol.events.condition.shiftKeyOnly}, meaning that the Shift key
* activates freehand drawing. * activates freehand drawing.
@@ -116,11 +116,11 @@
* @typedef {Object} interaction_ExtentOptions * @typedef {Object} interaction_ExtentOptions
* @property {ol.Extent|undefined} extent Initial extent. Defaults to no initial extent * @property {ol.Extent|undefined} extent Initial extent. Defaults to no initial extent
* @property {ol.style.Style|Array.<ol.style.Style>|ol.StyleFunction|undefined} boxStyle Style for the drawn extent box. * @property {ol.style.Style|Array.<ol.style.Style>|ol.StyleFunction|undefined} boxStyle Style for the drawn extent box.
* Defaults to ol.style.Style.createDefaultEditing()[ol.geom.GeometryType.POLYGON] * Defaults to ol.style.Style.createDefaultEditing()[module:ol/geom/GeometryType~GeometryType.POLYGON]
* @property {number|undefined} pixelTolerance Pixel tolerance for considering the pointer close enough to a segment or * @property {number|undefined} pixelTolerance Pixel tolerance for considering the pointer close enough to a segment or
* vertex for editing. Default is `10`. * vertex for editing. Default is `10`.
* @property {ol.style.Style|Array.<ol.style.Style>|ol.StyleFunction|undefined} pointerStyle Style for the cursor used to draw the extent. * @property {ol.style.Style|Array.<ol.style.Style>|ol.StyleFunction|undefined} pointerStyle Style for the cursor used to draw the extent.
* Defaults to ol.style.Style.createDefaultEditing()[ol.geom.GeometryType.POINT] * Defaults to ol.style.Style.createDefaultEditing()[module:ol/geom/GeometryType~GeometryType.POINT]
* @property {boolean|undefined} wrapX Wrap the drawn extent across multiple maps in the X direction? * @property {boolean|undefined} wrapX Wrap the drawn extent across multiple maps in the X direction?
* Only affects visuals, not functionality. Defaults to false. * Only affects visuals, not functionality. Defaults to false.
*/ */
@@ -128,7 +128,7 @@
/** /**
* @typedef {Object} interaction_TranslateOptions * @typedef {Object} interaction_TranslateOptions
* @property {ol.Collection.<ol.Feature>|undefined} features Only features contained in this collection will be able to be translated. If * @property {ol.Collection.<module:ol/Feature~Feature>|undefined} features Only features contained in this collection will be able to be translated. If
* not specified, all features on the map will be able to be translated. * not specified, all features on the map will be able to be translated.
* @property {undefined|Array.<ol.layer.Layer>|function(ol.layer.Layer): boolean} layers A list of layers from which features should be * @property {undefined|Array.<ol.layer.Layer>|function(ol.layer.Layer): boolean} layers A list of layers from which features should be
* translated. Alternatively, a filter function can be provided. The * translated. Alternatively, a filter function can be provided. The
@@ -143,7 +143,7 @@
/** /**
* @typedef {Object} interaction_KeyboardPanOptions * @typedef {Object} interaction_KeyboardPanOptions
* @property {ol.EventsConditionType|undefined} condition A function that takes an {@link ol.MapBrowserEvent} and returns a boolean * @property {ol.EventsConditionType|undefined} condition A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
* to indicate whether that event should be handled. * to indicate whether that event should be handled.
* Default is {@link ol.events.condition.noModifierKeys} and * Default is {@link ol.events.condition.noModifierKeys} and
* {@link ol.events.condition.targetNotEditable}. * {@link ol.events.condition.targetNotEditable}.
@@ -155,7 +155,7 @@
/** /**
* @typedef {Object} interaction_KeyboardZoomOptions * @typedef {Object} interaction_KeyboardZoomOptions
* @property {number|undefined} duration Animation duration in milliseconds. Default is `100`. * @property {number|undefined} duration Animation duration in milliseconds. Default is `100`.
* @property {ol.EventsConditionType|undefined} condition A function that takes an {@link ol.MapBrowserEvent} and returns a boolean * @property {ol.EventsConditionType|undefined} condition A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
* to indicate whether that event should be handled. * to indicate whether that event should be handled.
* Default is {@link ol.events.condition.targetNotEditable}. * Default is {@link ol.events.condition.targetNotEditable}.
* @property {number|undefined} delta The amount to zoom on each key press. Default is `1`. * @property {number|undefined} delta The amount to zoom on each key press. Default is `1`.
@@ -164,15 +164,15 @@
/** /**
* @typedef {Object} interaction_ModifyOptions * @typedef {Object} interaction_ModifyOptions
* @property {ol.EventsConditionType|undefined} condition A function that takes an {@link ol.MapBrowserEvent} and returns a boolean * @property {ol.EventsConditionType|undefined} condition A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
* to indicate whether that event will be considered to add or move a vertex * to indicate whether that event will be considered to add or move a vertex
* to the sketch. * to the sketch.
* Default is {@link ol.events.condition.primaryAction}. * Default is {@link ol.events.condition.primaryAction}.
* @property {ol.EventsConditionType|undefined} deleteCondition A function that takes an {@link ol.MapBrowserEvent} and returns a boolean * @property {ol.EventsConditionType|undefined} deleteCondition A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
* to indicate whether that event should be handled. * to indicate whether that event should be handled.
* By default, {@link ol.events.condition.singleClick} with * By default, {@link ol.events.condition.singleClick} with
* {@link ol.events.condition.altKeyOnly} results in a vertex deletion. * {@link ol.events.condition.altKeyOnly} results in a vertex deletion.
* @property {ol.EventsConditionType|undefined} insertVertexCondition A function that takes an {@link ol.MapBrowserEvent} and returns a boolean * @property {ol.EventsConditionType|undefined} insertVertexCondition A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
* to indicate whether a new vertex can be added to the sketch features. * to indicate whether a new vertex can be added to the sketch features.
* Default is {@link ol.events.condition.always} * Default is {@link ol.events.condition.always}
* @property {number|undefined} pixelTolerance Pixel tolerance for considering the pointer close enough to a segment or * @property {number|undefined} pixelTolerance Pixel tolerance for considering the pointer close enough to a segment or
@@ -181,7 +181,7 @@
* style is used (see {@link ol.style}). * style is used (see {@link ol.style}).
* @property {ol.source.Vector|undefined} source The vector source with features to modify. If a vector source is not * @property {ol.source.Vector|undefined} source The vector source with features to modify. If a vector source is not
* provided, a feature collection must be provided with the features option. * provided, a feature collection must be provided with the features option.
* @property {ol.Collection.<ol.Feature>|undefined} features The features the interaction works on. If a feature collection is not * @property {ol.Collection.<module:ol/Feature~Feature>|undefined} features The features the interaction works on. If a feature collection is not
* provided, a vector source must be provided with the source option. * provided, a vector source must be provided with the source option.
* @property {boolean|undefined} wrapX Wrap the world horizontally on the sketch overlay. Default is `false`. * @property {boolean|undefined} wrapX Wrap the world horizontally on the sketch overlay. Default is `false`.
*/ */
@@ -189,7 +189,7 @@
/** /**
* @typedef {Object} interaction_MouseWheelZoomOptions * @typedef {Object} interaction_MouseWheelZoomOptions
* @property {ol.EventsConditionType|undefined} condition A function that takes an {@link ol.MapBrowserEvent} and returns a boolean * @property {ol.EventsConditionType|undefined} condition A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
* to indicate whether that event should be handled. Default is {@link ol.events.condition.always}. * to indicate whether that event should be handled. Default is {@link ol.events.condition.always}.
* @property {number|undefined} duration Animation duration in milliseconds. Default is `250`. * @property {number|undefined} duration Animation duration in milliseconds. Default is `250`.
* @property {number|undefined} timeout Mouse wheel timeout duration in milliseconds. Default is `80`. * @property {number|undefined} timeout Mouse wheel timeout duration in milliseconds. Default is `80`.
@@ -222,7 +222,7 @@
* sequence is started. * sequence is started.
* @property {(function(ol.MapBrowserPointerEvent)|undefined)} handleDragEvent Function handling "drag" events. This function is called on "move" events * @property {(function(ol.MapBrowserPointerEvent)|undefined)} handleDragEvent Function handling "drag" events. This function is called on "move" events
* during a drag sequence. * during a drag sequence.
* @property {(function(ol.MapBrowserEvent):boolean|undefined)} handleEvent Method called by the map to notify the interaction that a browser event was * @property {(function(module:ol/MapBrowserEvent~MapBrowserEvent):boolean|undefined)} handleEvent Method called by the map to notify the interaction that a browser event was
* dispatched to the map. The function may return `false` to prevent the * dispatched to the map. The function may return `false` to prevent the
* propagation of the event to other interactions in the map's interactions * propagation of the event to other interactions in the map's interactions
* chain. * chain.
@@ -236,11 +236,11 @@
/** /**
* @typedef {Object} interaction_SelectOptions * @typedef {Object} interaction_SelectOptions
* @property {ol.EventsConditionType|undefined} addCondition A function that takes an {@link ol.MapBrowserEvent} and returns a boolean * @property {ol.EventsConditionType|undefined} addCondition A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
* to indicate whether that event should be handled. * to indicate whether that event should be handled.
* By default, this is {@link ol.events.condition.never}. Use this if you want * By default, this is {@link ol.events.condition.never}. Use this if you want
* to use different events for add and remove instead of `toggle`. * to use different events for add and remove instead of `toggle`.
* @property {ol.EventsConditionType|undefined} condition A function that takes an {@link ol.MapBrowserEvent} and returns a boolean * @property {ol.EventsConditionType|undefined} condition A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
* to indicate whether that event should be handled. * to indicate whether that event should be handled.
* This is the event for the selected features as a whole. By default, this is * This is the event for the selected features as a whole. By default, this is
* {@link ol.events.condition.singleClick}. Clicking on a feature selects that * {@link ol.events.condition.singleClick}. Clicking on a feature selects that
@@ -255,11 +255,11 @@
* absent, all visible layers will be considered selectable. * absent, all visible layers will be considered selectable.
* @property {ol.style.Style|Array.<ol.style.Style>|ol.StyleFunction|undefined} style Style for the selected features. By default the default edit style is used * @property {ol.style.Style|Array.<ol.style.Style>|ol.StyleFunction|undefined} style Style for the selected features. By default the default edit style is used
* (see {@link ol.style}). * (see {@link ol.style}).
* @property {ol.EventsConditionType|undefined} removeCondition A function that takes an {@link ol.MapBrowserEvent} and returns a boolean * @property {ol.EventsConditionType|undefined} removeCondition A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
* to indicate whether that event should be handled. * to indicate whether that event should be handled.
* By default, this is {@link ol.events.condition.never}. Use this if you want * By default, this is {@link ol.events.condition.never}. Use this if you want
* to use different events for add and remove instead of `toggle`. * to use different events for add and remove instead of `toggle`.
* @property {ol.EventsConditionType|undefined} toggleCondition A function that takes an {@link ol.MapBrowserEvent} and returns a boolean * @property {ol.EventsConditionType|undefined} toggleCondition A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
* to indicate whether that event should be handled. * to indicate whether that event should be handled.
* This is in addition to the `condition` event. By default, * This is in addition to the `condition` event. By default,
* {@link ol.events.condition.shiftKeyOnly}, i.e. pressing `shift` as well as * {@link ol.events.condition.shiftKeyOnly}, i.e. pressing `shift` as well as
@@ -270,11 +270,11 @@
* @property {boolean|undefined} multi A boolean that determines if the default behaviour should select only * @property {boolean|undefined} multi A boolean that determines if the default behaviour should select only
* single features or all (overlapping) features at the clicked map * single features or all (overlapping) features at the clicked map
* position. Default is false i.e single select * position. Default is false i.e single select
* @property {ol.Collection.<ol.Feature>|undefined} features Collection where the interaction will place selected features. Optional. If * @property {ol.Collection.<module:ol/Feature~Feature>|undefined} features Collection where the interaction will place selected features. Optional. If
* not set the interaction will create a collection. In any case the collection * not set the interaction will create a collection. In any case the collection
* used by the interaction is returned by * used by the interaction is returned by
* {@link ol.interaction.Select#getFeatures}. * {@link ol.interaction.Select#getFeatures}.
* @property {ol.SelectFilterFunction|undefined} filter A function that takes an {@link ol.Feature} and an {@link ol.layer.Layer} and * @property {ol.SelectFilterFunction|undefined} filter A function that takes an {@link module:ol/Feature~Feature} and an {@link ol.layer.Layer} and
* returns `true` if the feature may be selected or `false` otherwise. * returns `true` if the feature may be selected or `false` otherwise.
* @property {boolean|undefined} wrapX Wrap the world horizontally on the selection overlay. Default is `true`. * @property {boolean|undefined} wrapX Wrap the world horizontally on the selection overlay. Default is `true`.
* @property {number|undefined} hitTolerance Hit-detection tolerance. Pixels inside the radius around the given position * @property {number|undefined} hitTolerance Hit-detection tolerance. Pixels inside the radius around the given position
@@ -285,7 +285,7 @@
/** /**
* @typedef {Object} interaction_SnapOptions * @typedef {Object} interaction_SnapOptions
* @property {ol.Collection.<ol.Feature>|undefined} features Snap to these features. Either this option or source should be provided. * @property {ol.Collection.<module:ol/Feature~Feature>|undefined} features Snap to these features. Either this option or source should be provided.
* @property {boolean|undefined} edge Snap to edges. Default is `true`. * @property {boolean|undefined} edge Snap to edges. Default is `true`.
* @property {boolean|undefined} vertex Snap to vertices. Default is `true`. * @property {boolean|undefined} vertex Snap to vertices. Default is `true`.
* @property {number|undefined} pixelTolerance Pixel tolerance for considering the pointer close enough to a segment or * @property {number|undefined} pixelTolerance Pixel tolerance for considering the pointer close enough to a segment or
@@ -344,7 +344,7 @@
* @property {number|undefined} radius Radius size in pixels. Default is `8`. * @property {number|undefined} radius Radius size in pixels. Default is `8`.
* @property {number|undefined} blur Blur size in pixels. Default is `15`. * @property {number|undefined} blur Blur size in pixels. Default is `15`.
* @property {number|undefined} shadow Shadow size in pixels. Default is `250`. * @property {number|undefined} shadow Shadow size in pixels. Default is `250`.
* @property {string|function(ol.Feature):number|undefined} weight The feature attribute to use for the weight or a function that returns a * @property {string|function(module:ol/Feature~Feature):number|undefined} weight The feature attribute to use for the weight or a function that returns a
* weight from a feature. Weight values should range from 0 to 1 (and values * weight from a feature. Weight values should range from 0 to 1 (and values
* outside will be clamped to that range). Default is `weight`. * outside will be clamped to that range). Default is `weight`.
* @property {ol.Extent|undefined} extent The bounding extent for layer rendering. The layer will not be rendered * @property {ol.Extent|undefined} extent The bounding extent for layer rendering. The layer will not be rendered
@@ -532,8 +532,8 @@
* @property {ol.AttributionLike|undefined} attributions Attributions. * @property {ol.AttributionLike|undefined} attributions Attributions.
* @property {number|undefined} distance Minimum distance in pixels between clusters. Default is `20`. * @property {number|undefined} distance Minimum distance in pixels between clusters. Default is `20`.
* @property {ol.Extent|undefined} extent Extent. * @property {ol.Extent|undefined} extent Extent.
* @property {undefined|function(ol.Feature):ol.geom.Point} geometryFunction Function that takes an {@link ol.Feature} as argument and returns an * @property {undefined|function(module:ol/Feature~Feature):module:ol/geom/Point~Point} geometryFunction Function that takes an {@link module:ol/Feature~Feature} as argument and returns an
* {@link ol.geom.Point} as cluster calculation point for the feature. When a * {@link module:ol/geom/Point~Point} as cluster calculation point for the feature. When a
* feature should not be considered for clustering, the function should return * feature should not be considered for clustering, the function should return
* `null`. The default, which works when the underyling source contains point * `null`. The default, which works when the underyling source contains point
* features only, is * features only, is
@@ -542,7 +542,7 @@
* return feature.getGeometry(); * return feature.getGeometry();
* } * }
* ``` * ```
* See {@link ol.geom.Polygon#getInteriorPoint} for a way to get a cluster * See {@link module:ol/geom/Polygon~Polygon#getInteriorPoint} for a way to get a cluster
* calculation point for polygons. * calculation point for polygons.
* @property {ol.format.Feature|undefined} format Format. * @property {ol.format.Feature|undefined} format Format.
* @property {ol.ProjectionLike} projection Projection. * @property {ol.ProjectionLike} projection Projection.
@@ -755,7 +755,7 @@
* @property {ol.CanvasFunctionType} canvasFunction Canvas function. The function returning the canvas element used by the source * @property {ol.CanvasFunctionType} canvasFunction Canvas function. The function returning the canvas element used by the source
* as an image. The arguments passed to the function are: `{ol.Extent}` the * as an image. The arguments passed to the function are: `{ol.Extent}` the
* image extent, `{number}` the image resolution, `{number}` the device pixel * image extent, `{number}` the image resolution, `{number}` the device pixel
* ratio, `{ol.Size}` the image size, and `{ol.proj.Projection}` the image * ratio, `{ol.Size}` the image size, and `{module:ol/proj/Projection~Projection}` the image
* projection. The canvas returned by this function is cached by the source. If * projection. The canvas returned by this function is cached by the source. If
* the value returned by the function is later changed then * the value returned by the function is later changed then
* `dispatchChangeEvent` should be called on the source for the source to * `dispatchChangeEvent` should be called on the source for the source to
@@ -977,11 +977,11 @@
/** /**
* @typedef {Object} source_VectorOptions * @typedef {Object} source_VectorOptions
* @property {ol.AttributionLike|undefined} attributions Attributions. * @property {ol.AttributionLike|undefined} attributions Attributions.
* @property {Array.<ol.Feature>|ol.Collection.<ol.Feature>|undefined} features Features. If provided as {@link ol.Collection}, the features in the source * @property {Array.<module:ol/Feature~Feature>|ol.Collection.<module:ol/Feature~Feature>|undefined} features Features. If provided as {@link ol.Collection}, the features in the source
* and the collection will stay in sync. * and the collection will stay in sync.
* @property {ol.format.Feature|undefined} format The feature format used by the XHR feature loader when `url` is set. * @property {ol.format.Feature|undefined} format The feature format used by the XHR feature loader when `url` is set.
* Required if `url` is set, otherwise ignored. Default is `undefined`. * Required if `url` is set, otherwise ignored. Default is `undefined`.
* @property {ol.FeatureLoader|undefined} loader The loader function used to load features, from a remote source for example. * @property {module:ol/Feature~FeatureLoader|undefined} loader The loader function used to load features, from a remote source for example.
* If this is not set and `url` is set, the source will create and use an XHR * If this is not set and `url` is set, the source will create and use an XHR
* feature loader. * feature loader.
* *
@@ -1021,10 +1021,10 @@
* stroke operations. * stroke operations.
* @property {ol.LoadingStrategy|undefined} strategy The loading strategy to use. By default an {@link ol.loadingstrategy.all} * @property {ol.LoadingStrategy|undefined} strategy The loading strategy to use. By default an {@link ol.loadingstrategy.all}
* strategy is used, a one-off strategy which loads all features at once. * strategy is used, a one-off strategy which loads all features at once.
* @property {string|ol.FeatureUrlFunction|undefined} url Setting this option instructs the source to load features using an XHR loader * @property {string|module:ol/Feature~FeatureUrlFunction|undefined} url Setting this option instructs the source to load features using an XHR loader
* (see {@link ol.featureloader.xhr}). Use a `string` and an * (see {@link ol.featureloader.xhr}). Use a `string` and an
* {@link ol.loadingstrategy.all} for a one-off download of all features from * {@link ol.loadingstrategy.all} for a one-off download of all features from
* the given URL. Use a {@link ol.FeatureUrlFunction} to generate the url with * the given URL. Use a {@link module:ol/Feature~FeatureUrlFunction} to generate the url with
* other loading strategies. * other loading strategies.
* Requires `format` to be set as well. * Requires `format` to be set as well.
* When default XHR feature loader is provided, the features will * When default XHR feature loader is provided, the features will
@@ -1362,7 +1362,7 @@
/** /**
* @typedef {Object} style_StyleOptions * @typedef {Object} style_StyleOptions
* @property {undefined|string|ol.geom.Geometry|ol.StyleGeometryFunction} geometry Feature property or geometry or function returning a geometry to render for * @property {undefined|string|module:ol/geom/Geometry~Geometry|ol.StyleGeometryFunction} geometry Feature property or geometry or function returning a geometry to render for
* this style. * this style.
* @property {ol.style.Fill|undefined} fill Fill style. * @property {ol.style.Fill|undefined} fill Fill style.
* @property {ol.style.Image|undefined} image Image style. * @property {ol.style.Image|undefined} image Image style.
@@ -1453,7 +1453,7 @@
/** /**
* @typedef {Object} ViewState * @typedef {Object} ViewState
* @property {ol.Coordinate} center * @property {ol.Coordinate} center
* @property {ol.proj.Projection} projection * @property {module:ol/proj/Projection~Projection} projection
* @property {number} resolution * @property {number} resolution
* @property {number} rotation * @property {number} rotation
* @property {number} zoom The current zoom level. * @property {number} zoom The current zoom level.
+3 -3
View File
@@ -89,7 +89,7 @@ const MousePosition = function(opt_options) {
/** /**
* @private * @private
* @type {ol.proj.Projection} * @type {module:ol/proj/Projection~Projection}
*/ */
this.mapProjection_ = null; this.mapProjection_ = null;
@@ -153,13 +153,13 @@ MousePosition.prototype.getCoordinateFormat = function() {
/** /**
* Return the projection that is used to report the mouse position. * Return the projection that is used to report the mouse position.
* @return {ol.proj.Projection|undefined} The projection to report mouse * @return {module:ol/proj/Projection~Projection|undefined} The projection to report mouse
* position in. * position in.
* @observable * @observable
* @api * @api
*/ */
MousePosition.prototype.getProjection = function() { MousePosition.prototype.getProjection = function() {
return /** @type {ol.proj.Projection|undefined} */ (this.get(PROJECTION)); return /** @type {module:ol/proj/Projection~Projection|undefined} */ (this.get(PROJECTION));
}; };
+45 -45
View File
@@ -24,7 +24,7 @@ import {get as getProjection} from '../proj.js';
/** /**
* @const * @const
* @type {Object.<ol.geom.GeometryType, function(EsriJSONGeometry): ol.geom.Geometry>} * @type {Object.<module:ol/geom/GeometryType~GeometryType, function(EsriJSONGeometry): module:ol/geom/Geometry~Geometry>}
*/ */
const GEOMETRY_READERS = {}; const GEOMETRY_READERS = {};
GEOMETRY_READERS[GeometryType.POINT] = readPointGeometry; GEOMETRY_READERS[GeometryType.POINT] = readPointGeometry;
@@ -37,7 +37,7 @@ GEOMETRY_READERS[GeometryType.MULTI_POLYGON] = readMultiPolygonGeometry;
/** /**
* @const * @const
* @type {Object.<string, function(ol.geom.Geometry, module:ol/format/Feature~WriteOptions=): (EsriJSONGeometry)>} * @type {Object.<string, function(module:ol/geom/Geometry~Geometry, module:ol/format/Feature~WriteOptions=): (EsriJSONGeometry)>}
*/ */
const GEOMETRY_WRITERS = {}; const GEOMETRY_WRITERS = {};
GEOMETRY_WRITERS[GeometryType.POINT] = writePointGeometry; GEOMETRY_WRITERS[GeometryType.POINT] = writePointGeometry;
@@ -84,13 +84,13 @@ inherits(EsriJSON, JSONFeature);
/** /**
* @param {EsriJSONGeometry} object Object. * @param {EsriJSONGeometry} object Object.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options. * @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @return {ol.geom.Geometry} Geometry. * @return {module:ol/geom/Geometry~Geometry} Geometry.
*/ */
function readGeometry(object, opt_options) { function readGeometry(object, opt_options) {
if (!object) { if (!object) {
return null; return null;
} }
/** @type {ol.geom.GeometryType} */ /** @type {module:ol/geom/GeometryType~GeometryType} */
let type; let type;
if (typeof object.x === 'number' && typeof object.y === 'number') { if (typeof object.x === 'number' && typeof object.y === 'number') {
type = GeometryType.POINT; type = GeometryType.POINT;
@@ -115,7 +115,7 @@ function readGeometry(object, opt_options) {
} }
} }
const geometryReader = GEOMETRY_READERS[type]; const geometryReader = GEOMETRY_READERS[type];
return /** @type {ol.geom.Geometry} */ (transformWithOptions( return /** @type {module:ol/geom/Geometry~Geometry} */ (transformWithOptions(
geometryReader(object), false, opt_options) geometryReader(object), false, opt_options)
); );
} }
@@ -127,7 +127,7 @@ function readGeometry(object, opt_options) {
* array. It is used for checking for holes. * array. It is used for checking for holes.
* Logic inspired by: https://github.com/Esri/terraformer-arcgis-parser * Logic inspired by: https://github.com/Esri/terraformer-arcgis-parser
* @param {Array.<!Array.<!Array.<number>>>} rings Rings. * @param {Array.<!Array.<!Array.<number>>>} rings Rings.
* @param {ol.geom.GeometryLayout} layout Geometry layout. * @param {module:ol/geom/GeometryLayout~GeometryLayout} layout Geometry layout.
* @return {Array.<!Array.<!Array.<number>>>} Transformed rings. * @return {Array.<!Array.<!Array.<number>>>} Transformed rings.
*/ */
function convertRings(rings, layout) { function convertRings(rings, layout) {
@@ -176,7 +176,7 @@ function convertRings(rings, layout) {
/** /**
* @param {EsriJSONGeometry} object Object. * @param {EsriJSONGeometry} object Object.
* @return {ol.geom.Geometry} Point. * @return {module:ol/geom/Geometry~Geometry} Point.
*/ */
function readPointGeometry(object) { function readPointGeometry(object) {
let point; let point;
@@ -198,7 +198,7 @@ function readPointGeometry(object) {
/** /**
* @param {EsriJSONGeometry} object Object. * @param {EsriJSONGeometry} object Object.
* @return {ol.geom.Geometry} LineString. * @return {module:ol/geom/Geometry~Geometry} LineString.
*/ */
function readLineStringGeometry(object) { function readLineStringGeometry(object) {
const layout = getGeometryLayout(object); const layout = getGeometryLayout(object);
@@ -208,7 +208,7 @@ function readLineStringGeometry(object) {
/** /**
* @param {EsriJSONGeometry} object Object. * @param {EsriJSONGeometry} object Object.
* @return {ol.geom.Geometry} MultiLineString. * @return {module:ol/geom/Geometry~Geometry} MultiLineString.
*/ */
function readMultiLineStringGeometry(object) { function readMultiLineStringGeometry(object) {
const layout = getGeometryLayout(object); const layout = getGeometryLayout(object);
@@ -218,7 +218,7 @@ function readMultiLineStringGeometry(object) {
/** /**
* @param {EsriJSONGeometry} object Object. * @param {EsriJSONGeometry} object Object.
* @return {ol.geom.GeometryLayout} The geometry layout to use. * @return {module:ol/geom/GeometryLayout~GeometryLayout} The geometry layout to use.
*/ */
function getGeometryLayout(object) { function getGeometryLayout(object) {
let layout = GeometryLayout.XY; let layout = GeometryLayout.XY;
@@ -235,7 +235,7 @@ function getGeometryLayout(object) {
/** /**
* @param {EsriJSONGeometry} object Object. * @param {EsriJSONGeometry} object Object.
* @return {ol.geom.Geometry} MultiPoint. * @return {module:ol/geom/Geometry~Geometry} MultiPoint.
*/ */
function readMultiPointGeometry(object) { function readMultiPointGeometry(object) {
const layout = getGeometryLayout(object); const layout = getGeometryLayout(object);
@@ -245,7 +245,7 @@ function readMultiPointGeometry(object) {
/** /**
* @param {EsriJSONGeometry} object Object. * @param {EsriJSONGeometry} object Object.
* @return {ol.geom.Geometry} MultiPolygon. * @return {module:ol/geom/Geometry~Geometry} MultiPolygon.
*/ */
function readMultiPolygonGeometry(object) { function readMultiPolygonGeometry(object) {
const layout = getGeometryLayout(object); const layout = getGeometryLayout(object);
@@ -257,7 +257,7 @@ function readMultiPolygonGeometry(object) {
/** /**
* @param {EsriJSONGeometry} object Object. * @param {EsriJSONGeometry} object Object.
* @return {ol.geom.Geometry} Polygon. * @return {module:ol/geom/Geometry~Geometry} Polygon.
*/ */
function readPolygonGeometry(object) { function readPolygonGeometry(object) {
const layout = getGeometryLayout(object); const layout = getGeometryLayout(object);
@@ -266,14 +266,14 @@ function readPolygonGeometry(object) {
/** /**
* @param {ol.geom.Geometry} geometry Geometry. * @param {module:ol/geom/Geometry~Geometry} geometry Geometry.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {EsriJSONGeometry} EsriJSON geometry. * @return {EsriJSONGeometry} EsriJSON geometry.
*/ */
function writePointGeometry(geometry, opt_options) { function writePointGeometry(geometry, opt_options) {
const coordinates = /** @type {ol.geom.Point} */ (geometry).getCoordinates(); const coordinates = /** @type {module:ol/geom/Point~Point} */ (geometry).getCoordinates();
let esriJSON; let esriJSON;
const layout = /** @type {ol.geom.Point} */ (geometry).getLayout(); const layout = /** @type {module:ol/geom/Point~Point} */ (geometry).getLayout();
if (layout === GeometryLayout.XYZ) { if (layout === GeometryLayout.XYZ) {
esriJSON = /** @type {EsriJSONPoint} */ ({ esriJSON = /** @type {EsriJSONPoint} */ ({
x: coordinates[0], x: coordinates[0],
@@ -306,7 +306,7 @@ function writePointGeometry(geometry, opt_options) {
/** /**
* @param {ol.geom.SimpleGeometry} geometry Geometry. * @param {module:ol/geom/SimpleGeometry~SimpleGeometry} geometry Geometry.
* @return {Object} Object with boolean hasZ and hasM keys. * @return {Object} Object with boolean hasZ and hasM keys.
*/ */
function getHasZM(geometry) { function getHasZM(geometry) {
@@ -321,76 +321,76 @@ function getHasZM(geometry) {
/** /**
* @param {ol.geom.Geometry} geometry Geometry. * @param {module:ol/geom/Geometry~Geometry} geometry Geometry.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {EsriJSONPolyline} EsriJSON geometry. * @return {EsriJSONPolyline} EsriJSON geometry.
*/ */
function writeLineStringGeometry(geometry, opt_options) { function writeLineStringGeometry(geometry, opt_options) {
const hasZM = getHasZM(/** @type {ol.geom.LineString} */(geometry)); const hasZM = getHasZM(/** @type {module:ol/geom/LineString~LineString} */(geometry));
return /** @type {EsriJSONPolyline} */ ({ return /** @type {EsriJSONPolyline} */ ({
hasZ: hasZM.hasZ, hasZ: hasZM.hasZ,
hasM: hasZM.hasM, hasM: hasZM.hasM,
paths: [ paths: [
/** @type {ol.geom.LineString} */ (geometry).getCoordinates() /** @type {module:ol/geom/LineString~LineString} */ (geometry).getCoordinates()
] ]
}); });
} }
/** /**
* @param {ol.geom.Geometry} geometry Geometry. * @param {module:ol/geom/Geometry~Geometry} geometry Geometry.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {EsriJSONPolygon} EsriJSON geometry. * @return {EsriJSONPolygon} EsriJSON geometry.
*/ */
function writePolygonGeometry(geometry, opt_options) { function writePolygonGeometry(geometry, opt_options) {
// Esri geometries use the left-hand rule // Esri geometries use the left-hand rule
const hasZM = getHasZM(/** @type {ol.geom.Polygon} */(geometry)); const hasZM = getHasZM(/** @type {module:ol/geom/Polygon~Polygon} */(geometry));
return /** @type {EsriJSONPolygon} */ ({ return /** @type {EsriJSONPolygon} */ ({
hasZ: hasZM.hasZ, hasZ: hasZM.hasZ,
hasM: hasZM.hasM, hasM: hasZM.hasM,
rings: /** @type {ol.geom.Polygon} */ (geometry).getCoordinates(false) rings: /** @type {module:ol/geom/Polygon~Polygon} */ (geometry).getCoordinates(false)
}); });
} }
/** /**
* @param {ol.geom.Geometry} geometry Geometry. * @param {module:ol/geom/Geometry~Geometry} geometry Geometry.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {EsriJSONPolyline} EsriJSON geometry. * @return {EsriJSONPolyline} EsriJSON geometry.
*/ */
function writeMultiLineStringGeometry(geometry, opt_options) { function writeMultiLineStringGeometry(geometry, opt_options) {
const hasZM = getHasZM(/** @type {ol.geom.MultiLineString} */(geometry)); const hasZM = getHasZM(/** @type {module:ol/geom/MultiLineString~MultiLineString} */(geometry));
return /** @type {EsriJSONPolyline} */ ({ return /** @type {EsriJSONPolyline} */ ({
hasZ: hasZM.hasZ, hasZ: hasZM.hasZ,
hasM: hasZM.hasM, hasM: hasZM.hasM,
paths: /** @type {ol.geom.MultiLineString} */ (geometry).getCoordinates() paths: /** @type {module:ol/geom/MultiLineString~MultiLineString} */ (geometry).getCoordinates()
}); });
} }
/** /**
* @param {ol.geom.Geometry} geometry Geometry. * @param {module:ol/geom/Geometry~Geometry} geometry Geometry.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {EsriJSONMultipoint} EsriJSON geometry. * @return {EsriJSONMultipoint} EsriJSON geometry.
*/ */
function writeMultiPointGeometry(geometry, opt_options) { function writeMultiPointGeometry(geometry, opt_options) {
const hasZM = getHasZM(/** @type {ol.geom.MultiPoint} */(geometry)); const hasZM = getHasZM(/** @type {module:ol/geom/MultiPoint~MultiPoint} */(geometry));
return /** @type {EsriJSONMultipoint} */ ({ return /** @type {EsriJSONMultipoint} */ ({
hasZ: hasZM.hasZ, hasZ: hasZM.hasZ,
hasM: hasZM.hasM, hasM: hasZM.hasM,
points: /** @type {ol.geom.MultiPoint} */ (geometry).getCoordinates() points: /** @type {module:ol/geom/MultiPoint~MultiPoint} */ (geometry).getCoordinates()
}); });
} }
/** /**
* @param {ol.geom.Geometry} geometry Geometry. * @param {module:ol/geom/Geometry~Geometry} geometry Geometry.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {EsriJSONPolygon} EsriJSON geometry. * @return {EsriJSONPolygon} EsriJSON geometry.
*/ */
function writeMultiPolygonGeometry(geometry, opt_options) { function writeMultiPolygonGeometry(geometry, opt_options) {
const hasZM = getHasZM(/** @type {ol.geom.MultiPolygon} */(geometry)); const hasZM = getHasZM(/** @type {module:ol/geom/MultiPolygon~MultiPolygon} */(geometry));
const coordinates = /** @type {ol.geom.MultiPolygon} */ (geometry).getCoordinates(false); const coordinates = /** @type {module:ol/geom/MultiPolygon~MultiPolygon} */ (geometry).getCoordinates(false);
const output = []; const output = [];
for (let i = 0; i < coordinates.length; i++) { for (let i = 0; i < coordinates.length; i++) {
for (let x = coordinates[i].length - 1; x >= 0; x--) { for (let x = coordinates[i].length - 1; x >= 0; x--) {
@@ -412,7 +412,7 @@ function writeMultiPolygonGeometry(geometry, opt_options) {
* @function * @function
* @param {ArrayBuffer|Document|Node|Object|string} source Source. * @param {ArrayBuffer|Document|Node|Object|string} source Source.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options. * @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @return {ol.Feature} Feature. * @return {module:ol/Feature~Feature} Feature.
* @api * @api
*/ */
EsriJSON.prototype.readFeature; EsriJSON.prototype.readFeature;
@@ -425,7 +425,7 @@ EsriJSON.prototype.readFeature;
* @function * @function
* @param {ArrayBuffer|Document|Node|Object|string} source Source. * @param {ArrayBuffer|Document|Node|Object|string} source Source.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options. * @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @return {Array.<ol.Feature>} Features. * @return {Array.<module:ol/Feature~Feature>} Features.
* @api * @api
*/ */
EsriJSON.prototype.readFeatures; EsriJSON.prototype.readFeatures;
@@ -461,7 +461,7 @@ EsriJSON.prototype.readFeaturesFromObject = function(object, opt_options) {
const options = opt_options ? opt_options : {}; const options = opt_options ? opt_options : {};
if (esriJSONObject.features) { if (esriJSONObject.features) {
const esriJSONFeatureCollection = /** @type {EsriJSONFeatureCollection} */ (object); const esriJSONFeatureCollection = /** @type {EsriJSONFeatureCollection} */ (object);
/** @type {Array.<ol.Feature>} */ /** @type {Array.<module:ol/Feature~Feature>} */
const features = []; const features = [];
const esriJSONFeatures = esriJSONFeatureCollection.features; const esriJSONFeatures = esriJSONFeatureCollection.features;
options.idField = object.objectIdFieldName; options.idField = object.objectIdFieldName;
@@ -481,7 +481,7 @@ EsriJSON.prototype.readFeaturesFromObject = function(object, opt_options) {
* @function * @function
* @param {ArrayBuffer|Document|Node|Object|string} source Source. * @param {ArrayBuffer|Document|Node|Object|string} source Source.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options. * @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @return {ol.geom.Geometry} Geometry. * @return {module:ol/geom/Geometry~Geometry} Geometry.
* @api * @api
*/ */
EsriJSON.prototype.readGeometry; EsriJSON.prototype.readGeometry;
@@ -500,7 +500,7 @@ EsriJSON.prototype.readGeometryFromObject = function(object, opt_options) {
* *
* @function * @function
* @param {ArrayBuffer|Document|Node|Object|string} source Source. * @param {ArrayBuffer|Document|Node|Object|string} source Source.
* @return {ol.proj.Projection} Projection. * @return {module:ol/proj/Projection~Projection} Projection.
* @api * @api
*/ */
EsriJSON.prototype.readProjection; EsriJSON.prototype.readProjection;
@@ -521,13 +521,13 @@ EsriJSON.prototype.readProjectionFromObject = function(object) {
/** /**
* @param {ol.geom.Geometry} geometry Geometry. * @param {module:ol/geom/Geometry~Geometry} geometry Geometry.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {EsriJSONGeometry} EsriJSON geometry. * @return {EsriJSONGeometry} EsriJSON geometry.
*/ */
function writeGeometry(geometry, opt_options) { function writeGeometry(geometry, opt_options) {
const geometryWriter = GEOMETRY_WRITERS[geometry.getType()]; const geometryWriter = GEOMETRY_WRITERS[geometry.getType()];
return geometryWriter(/** @type {ol.geom.Geometry} */( return geometryWriter(/** @type {module:ol/geom/Geometry~Geometry} */(
transformWithOptions(geometry, true, opt_options)), opt_options); transformWithOptions(geometry, true, opt_options)), opt_options);
} }
@@ -536,7 +536,7 @@ function writeGeometry(geometry, opt_options) {
* Encode a geometry as a EsriJSON string. * Encode a geometry as a EsriJSON string.
* *
* @function * @function
* @param {ol.geom.Geometry} geometry Geometry. * @param {module:ol/geom/Geometry~Geometry} geometry Geometry.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {string} EsriJSON. * @return {string} EsriJSON.
* @api * @api
@@ -547,7 +547,7 @@ EsriJSON.prototype.writeGeometry;
/** /**
* Encode a geometry as a EsriJSON object. * Encode a geometry as a EsriJSON object.
* *
* @param {ol.geom.Geometry} geometry Geometry. * @param {module:ol/geom/Geometry~Geometry} geometry Geometry.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {EsriJSONGeometry} Object. * @return {EsriJSONGeometry} Object.
* @override * @override
@@ -562,7 +562,7 @@ EsriJSON.prototype.writeGeometryObject = function(geometry, opt_options) {
* Encode a feature as a EsriJSON Feature string. * Encode a feature as a EsriJSON Feature string.
* *
* @function * @function
* @param {ol.Feature} feature Feature. * @param {module:ol/Feature~Feature} feature Feature.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {string} EsriJSON. * @return {string} EsriJSON.
* @api * @api
@@ -573,7 +573,7 @@ EsriJSON.prototype.writeFeature;
/** /**
* Encode a feature as a esriJSON Feature object. * Encode a feature as a esriJSON Feature object.
* *
* @param {ol.Feature} feature Feature. * @param {module:ol/Feature~Feature} feature Feature.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {Object} Object. * @return {Object} Object.
* @override * @override
@@ -606,7 +606,7 @@ EsriJSON.prototype.writeFeatureObject = function(feature, opt_options) {
* Encode an array of features as EsriJSON. * Encode an array of features as EsriJSON.
* *
* @function * @function
* @param {Array.<ol.Feature>} features Features. * @param {Array.<module:ol/Feature~Feature>} features Features.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {string} EsriJSON. * @return {string} EsriJSON.
* @api * @api
@@ -617,7 +617,7 @@ EsriJSON.prototype.writeFeatures;
/** /**
* Encode an array of features as a EsriJSON object. * Encode an array of features as a EsriJSON object.
* *
* @param {Array.<ol.Feature>} features Features. * @param {Array.<module:ol/Feature~Feature>} features Features.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {Object} EsriJSON Object. * @return {Object} EsriJSON Object.
* @override * @override
+13 -13
View File
@@ -53,7 +53,7 @@ import {get as getProjection, equivalent as equivalentProjection, transformExten
* instantiated in apps. * instantiated in apps.
* Base class for feature formats. * Base class for feature formats.
* {ol.format.Feature} subclasses provide the ability to decode and encode * {ol.format.Feature} subclasses provide the ability to decode and encode
* {@link ol.Feature} objects from a variety of commonly used geospatial * {@link module:ol/Feature~Feature} objects from a variety of commonly used geospatial
* file formats. See the documentation for each format for more details. * file formats. See the documentation for each format for more details.
* *
* @constructor * @constructor
@@ -64,13 +64,13 @@ const FeatureFormat = function() {
/** /**
* @protected * @protected
* @type {ol.proj.Projection} * @type {module:ol/proj/Projection~Projection}
*/ */
this.defaultDataProjection = null; this.defaultDataProjection = null;
/** /**
* @protected * @protected
* @type {ol.proj.Projection} * @type {module:ol/proj/Projection~Projection}
*/ */
this.defaultFeatureProjection = null; this.defaultFeatureProjection = null;
@@ -136,7 +136,7 @@ FeatureFormat.prototype.getType = function() {};
* @abstract * @abstract
* @param {Document|Node|Object|string} source Source. * @param {Document|Node|Object|string} source Source.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options. * @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @return {ol.Feature} Feature. * @return {module:ol/Feature~Feature} Feature.
*/ */
FeatureFormat.prototype.readFeature = function(source, opt_options) {}; FeatureFormat.prototype.readFeature = function(source, opt_options) {};
@@ -147,7 +147,7 @@ FeatureFormat.prototype.readFeature = function(source, opt_options) {};
* @abstract * @abstract
* @param {Document|Node|ArrayBuffer|Object|string} source Source. * @param {Document|Node|ArrayBuffer|Object|string} source Source.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options. * @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @return {Array.<ol.Feature>} Features. * @return {Array.<module:ol/Feature~Feature>} Features.
*/ */
FeatureFormat.prototype.readFeatures = function(source, opt_options) {}; FeatureFormat.prototype.readFeatures = function(source, opt_options) {};
@@ -158,7 +158,7 @@ FeatureFormat.prototype.readFeatures = function(source, opt_options) {};
* @abstract * @abstract
* @param {Document|Node|Object|string} source Source. * @param {Document|Node|Object|string} source Source.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options. * @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @return {ol.geom.Geometry} Geometry. * @return {module:ol/geom/Geometry~Geometry} Geometry.
*/ */
FeatureFormat.prototype.readGeometry = function(source, opt_options) {}; FeatureFormat.prototype.readGeometry = function(source, opt_options) {};
@@ -168,7 +168,7 @@ FeatureFormat.prototype.readGeometry = function(source, opt_options) {};
* *
* @abstract * @abstract
* @param {Document|Node|Object|string} source Source. * @param {Document|Node|Object|string} source Source.
* @return {ol.proj.Projection} Projection. * @return {module:ol/proj/Projection~Projection} Projection.
*/ */
FeatureFormat.prototype.readProjection = function(source) {}; FeatureFormat.prototype.readProjection = function(source) {};
@@ -177,7 +177,7 @@ FeatureFormat.prototype.readProjection = function(source) {};
* Encode a feature in this format. * Encode a feature in this format.
* *
* @abstract * @abstract
* @param {ol.Feature} feature Feature. * @param {module:ol/Feature~Feature} feature Feature.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {string} Result. * @return {string} Result.
*/ */
@@ -188,7 +188,7 @@ FeatureFormat.prototype.writeFeature = function(feature, opt_options) {};
* Encode an array of features in this format. * Encode an array of features in this format.
* *
* @abstract * @abstract
* @param {Array.<ol.Feature>} features Features. * @param {Array.<module:ol/Feature~Feature>} features Features.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {string} Result. * @return {string} Result.
*/ */
@@ -199,7 +199,7 @@ FeatureFormat.prototype.writeFeatures = function(features, opt_options) {};
* Write a single geometry in this format. * Write a single geometry in this format.
* *
* @abstract * @abstract
* @param {ol.geom.Geometry} geometry Geometry. * @param {module:ol/geom/Geometry~Geometry} geometry Geometry.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {string} Result. * @return {string} Result.
*/ */
@@ -208,11 +208,11 @@ FeatureFormat.prototype.writeGeometry = function(geometry, opt_options) {};
export default FeatureFormat; export default FeatureFormat;
/** /**
* @param {ol.geom.Geometry|module:ol/extent~Extent} geometry Geometry. * @param {module:ol/geom/Geometry~Geometry|module:ol/extent~Extent} geometry Geometry.
* @param {boolean} write Set to true for writing, false for reading. * @param {boolean} write Set to true for writing, false for reading.
* @param {(module:ol/format/Feature~WriteOptions|module:ol/format/Feature~ReadOptions)=} opt_options * @param {(module:ol/format/Feature~WriteOptions|module:ol/format/Feature~ReadOptions)=} opt_options
* Options. * Options.
* @return {ol.geom.Geometry|module:ol/extent~Extent} Transformed geometry. * @return {module:ol/geom/Geometry~Geometry|module:ol/extent~Extent} Transformed geometry.
*/ */
export function transformWithOptions(geometry, write, opt_options) { export function transformWithOptions(geometry, write, opt_options) {
const featureProjection = opt_options ? const featureProjection = opt_options ?
@@ -220,7 +220,7 @@ export function transformWithOptions(geometry, write, opt_options) {
const dataProjection = opt_options ? const dataProjection = opt_options ?
getProjection(opt_options.dataProjection) : null; getProjection(opt_options.dataProjection) : null;
/** /**
* @type {ol.geom.Geometry|module:ol/extent~Extent} * @type {module:ol/geom/Geometry~Geometry|module:ol/extent~Extent}
*/ */
let transformed; let transformed;
if (featureProjection && dataProjection && if (featureProjection && dataProjection &&
+2 -2
View File
@@ -22,7 +22,7 @@ const GML = GML3;
* Encode an array of features in GML 3.1.1 Simple Features. * Encode an array of features in GML 3.1.1 Simple Features.
* *
* @function * @function
* @param {Array.<ol.Feature>} features Features. * @param {Array.<module:ol/Feature~Feature>} features Features.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Options. * @param {module:ol/format/Feature~WriteOptions=} opt_options Options.
* @return {string} Result. * @return {string} Result.
* @api * @api
@@ -34,7 +34,7 @@ GML.prototype.writeFeatures;
* Encode an array of features in the GML 3.1.1 format as an XML node. * Encode an array of features in the GML 3.1.1 format as an XML node.
* *
* @function * @function
* @param {Array.<ol.Feature>} features Features. * @param {Array.<module:ol/Feature~Feature>} features Features.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Options. * @param {module:ol/format/Feature~WriteOptions=} opt_options Options.
* @return {Node} Node. * @return {Node} Node.
* @api * @api
+18 -18
View File
@@ -150,7 +150,7 @@ GML2.prototype.GEOMETRY_NODE_FACTORY_ = function(value, objectStack, opt_nodeNam
const multiCurve = context['multiCurve']; const multiCurve = context['multiCurve'];
let nodeName; let nodeName;
if (!Array.isArray(value)) { if (!Array.isArray(value)) {
nodeName = /** @type {ol.geom.Geometry} */ (value).getType(); nodeName = /** @type {module:ol/geom/Geometry~Geometry} */ (value).getType();
if (nodeName === 'MultiPolygon' && multiSurface === true) { if (nodeName === 'MultiPolygon' && multiSurface === true) {
nodeName = 'MultiSurface'; nodeName = 'MultiSurface';
} else if (nodeName === 'Polygon' && surface === true) { } 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 {Node} node Node.
* @param {ol.Feature} feature Feature. * @param {module:ol/Feature~Feature} feature Feature.
* @param {Array.<*>} objectStack Node stack. * @param {Array.<*>} objectStack Node stack.
*/ */
GML2.prototype.writeFeatureElement = function(node, feature, objectStack) { GML2.prototype.writeFeatureElement = function(node, feature, objectStack) {
@@ -215,7 +215,7 @@ GML2.prototype.writeFeatureElement = function(node, feature, objectStack) {
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {ol.geom.LineString} geometry LineString geometry. * @param {module:ol/geom/LineString~LineString} geometry LineString geometry.
* @param {Array.<*>} objectStack Node stack. * @param {Array.<*>} objectStack Node stack.
* @private * @private
*/ */
@@ -241,7 +241,7 @@ GML2.prototype.writeCurveOrLineString_ = function(node, geometry, objectStack) {
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {ol.geom.LineString} line LineString geometry. * @param {module:ol/geom/LineString~LineString} line LineString geometry.
* @param {Array.<*>} objectStack Node stack. * @param {Array.<*>} objectStack Node stack.
* @private * @private
*/ */
@@ -256,7 +256,7 @@ GML2.prototype.writeLineStringOrCurveMember_ = function(node, line, objectStack)
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {ol.geom.MultiLineString} geometry MultiLineString geometry. * @param {module:ol/geom/MultiLineString~MultiLineString} geometry MultiLineString geometry.
* @param {Array.<*>} objectStack Node stack. * @param {Array.<*>} objectStack Node stack.
* @private * @private
*/ */
@@ -278,7 +278,7 @@ GML2.prototype.writeMultiCurveOrLineString_ = function(node, geometry, objectSta
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {ol.geom.Geometry|module:ol/extent~Extent} geometry Geometry. * @param {module:ol/geom/Geometry~Geometry|module:ol/extent~Extent} geometry Geometry.
* @param {Array.<*>} objectStack Node stack. * @param {Array.<*>} objectStack Node stack.
*/ */
GML2.prototype.writeGeometryElement = function(node, geometry, objectStack) { GML2.prototype.writeGeometryElement = function(node, geometry, objectStack) {
@@ -294,7 +294,7 @@ GML2.prototype.writeGeometryElement = function(node, geometry, objectStack) {
value = geometry; value = geometry;
} }
} else { } else {
value = transformWithOptions(/** @type {ol.geom.Geometry} */ (geometry), true, context); value = transformWithOptions(/** @type {module:ol/geom/Geometry~Geometry} */ (geometry), true, context);
} }
pushSerializeAndPop(/** @type {module:ol/xml~NodeStackItem} */ pushSerializeAndPop(/** @type {module:ol/xml~NodeStackItem} */
(item), this.GEOMETRY_SERIALIZERS_, (item), this.GEOMETRY_SERIALIZERS_,
@@ -320,7 +320,7 @@ GML2.prototype.createCoordinatesNode_ = function(namespaceURI) {
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {ol.geom.LineString|ol.geom.LinearRing} value Geometry. * @param {module:ol/geom/LineString~LineString|module:ol/geom/LinearRing~LinearRing} value Geometry.
* @param {Array.<*>} objectStack Node stack. * @param {Array.<*>} objectStack Node stack.
* @private * @private
*/ */
@@ -342,7 +342,7 @@ GML2.prototype.writeCoordinates_ = function(node, value, objectStack) {
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {ol.geom.LineString} line LineString geometry. * @param {module:ol/geom/LineString~LineString} line LineString geometry.
* @param {Array.<*>} objectStack Node stack. * @param {Array.<*>} objectStack Node stack.
* @private * @private
*/ */
@@ -355,7 +355,7 @@ GML2.prototype.writeCurveSegments_ = function(node, line, objectStack) {
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {ol.geom.Polygon} geometry Polygon geometry. * @param {module:ol/geom/Polygon~Polygon} geometry Polygon geometry.
* @param {Array.<*>} objectStack Node stack. * @param {Array.<*>} objectStack Node stack.
* @private * @private
*/ */
@@ -403,7 +403,7 @@ GML2.prototype.RING_NODE_FACTORY_ = function(value, objectStack, opt_nodeName) {
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {ol.geom.Polygon} polygon Polygon geometry. * @param {module:ol/geom/Polygon~Polygon} polygon Polygon geometry.
* @param {Array.<*>} objectStack Node stack. * @param {Array.<*>} objectStack Node stack.
* @private * @private
*/ */
@@ -416,7 +416,7 @@ GML2.prototype.writeSurfacePatches_ = function(node, polygon, objectStack) {
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {ol.geom.LinearRing} ring LinearRing geometry. * @param {module:ol/geom/LinearRing~LinearRing} ring LinearRing geometry.
* @param {Array.<*>} objectStack Node stack. * @param {Array.<*>} objectStack Node stack.
* @private * @private
*/ */
@@ -454,7 +454,7 @@ GML2.prototype.getCoords_ = function(point, opt_srsName, opt_hasZ) {
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {ol.geom.Point} geometry Point geometry. * @param {module:ol/geom/Point~Point} geometry Point geometry.
* @param {Array.<*>} objectStack Node stack. * @param {Array.<*>} objectStack Node stack.
* @private * @private
*/ */
@@ -475,7 +475,7 @@ GML2.prototype.writePoint_ = function(node, geometry, objectStack) {
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {ol.geom.MultiPoint} geometry MultiPoint geometry. * @param {module:ol/geom/MultiPoint~MultiPoint} geometry MultiPoint geometry.
* @param {Array.<*>} objectStack Node stack. * @param {Array.<*>} objectStack Node stack.
* @private * @private
*/ */
@@ -496,7 +496,7 @@ GML2.prototype.writeMultiPoint_ = function(node, geometry, objectStack) {
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {ol.geom.Point} point Point geometry. * @param {module:ol/geom/Point~Point} point Point geometry.
* @param {Array.<*>} objectStack Node stack. * @param {Array.<*>} objectStack Node stack.
* @private * @private
*/ */
@@ -509,7 +509,7 @@ GML2.prototype.writePointMember_ = function(node, point, objectStack) {
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {ol.geom.LinearRing} geometry LinearRing geometry. * @param {module:ol/geom/LinearRing~LinearRing} geometry LinearRing geometry.
* @param {Array.<*>} objectStack Node stack. * @param {Array.<*>} objectStack Node stack.
* @private * @private
*/ */
@@ -527,7 +527,7 @@ GML2.prototype.writeLinearRing_ = function(node, geometry, objectStack) {
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {ol.geom.MultiPolygon} geometry MultiPolygon geometry. * @param {module:ol/geom/MultiPolygon~MultiPolygon} geometry MultiPolygon geometry.
* @param {Array.<*>} objectStack Node stack. * @param {Array.<*>} objectStack Node stack.
* @private * @private
*/ */
@@ -549,7 +549,7 @@ GML2.prototype.writeMultiSurfaceOrPolygon_ = function(node, geometry, objectStac
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {ol.geom.Polygon} polygon Polygon geometry. * @param {module:ol/geom/Polygon~Polygon} polygon Polygon geometry.
* @param {Array.<*>} objectStack Node stack. * @param {Array.<*>} objectStack Node stack.
* @private * @private
*/ */
+29 -29
View File
@@ -96,10 +96,10 @@ inherits(GML3, GMLBase);
* @param {Node} node Node. * @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack. * @param {Array.<*>} objectStack Object stack.
* @private * @private
* @return {ol.geom.MultiLineString|undefined} MultiLineString. * @return {module:ol/geom/MultiLineString~MultiLineString|undefined} MultiLineString.
*/ */
GML3.prototype.readMultiCurve_ = function(node, objectStack) { GML3.prototype.readMultiCurve_ = function(node, objectStack) {
/** @type {Array.<ol.geom.LineString>} */ /** @type {Array.<module:ol/geom/LineString~LineString>} */
const lineStrings = pushParseAndPop([], const lineStrings = pushParseAndPop([],
this.MULTICURVE_PARSERS_, node, objectStack, this); this.MULTICURVE_PARSERS_, node, objectStack, this);
if (lineStrings) { if (lineStrings) {
@@ -116,10 +116,10 @@ GML3.prototype.readMultiCurve_ = function(node, objectStack) {
* @param {Node} node Node. * @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack. * @param {Array.<*>} objectStack Object stack.
* @private * @private
* @return {ol.geom.MultiPolygon|undefined} MultiPolygon. * @return {module:ol/geom/MultiPolygon~MultiPolygon|undefined} MultiPolygon.
*/ */
GML3.prototype.readMultiSurface_ = function(node, objectStack) { GML3.prototype.readMultiSurface_ = function(node, objectStack) {
/** @type {Array.<ol.geom.Polygon>} */ /** @type {Array.<module:ol/geom/Polygon~Polygon>} */
const polygons = pushParseAndPop([], const polygons = pushParseAndPop([],
this.MULTISURFACE_PARSERS_, node, objectStack, this); this.MULTISURFACE_PARSERS_, node, objectStack, this);
if (polygons) { if (polygons) {
@@ -240,7 +240,7 @@ GML3.prototype.exteriorParser_ = function(node, objectStack) {
* @param {Node} node Node. * @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack. * @param {Array.<*>} objectStack Object stack.
* @private * @private
* @return {ol.geom.Polygon|undefined} Polygon. * @return {module:ol/geom/Polygon~Polygon|undefined} Polygon.
*/ */
GML3.prototype.readSurface_ = function(node, objectStack) { GML3.prototype.readSurface_ = function(node, objectStack) {
/** @type {Array.<Array.<number>>} */ /** @type {Array.<Array.<number>>} */
@@ -268,7 +268,7 @@ GML3.prototype.readSurface_ = function(node, objectStack) {
* @param {Node} node Node. * @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack. * @param {Array.<*>} objectStack Object stack.
* @private * @private
* @return {ol.geom.LineString|undefined} LineString. * @return {module:ol/geom/LineString~LineString|undefined} LineString.
*/ */
GML3.prototype.readCurve_ = function(node, objectStack) { GML3.prototype.readCurve_ = function(node, objectStack) {
/** @type {Array.<number>} */ /** @type {Array.<number>} */
@@ -573,7 +573,7 @@ GML3.prototype.SEGMENTS_PARSERS_ = {
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {ol.geom.Point} value Point geometry. * @param {module:ol/geom/Point~Point} value Point geometry.
* @param {Array.<*>} objectStack Node stack. * @param {Array.<*>} objectStack Node stack.
* @private * @private
*/ */
@@ -631,7 +631,7 @@ GML3.prototype.getCoords_ = function(point, opt_srsName, opt_hasZ) {
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {ol.geom.LineString|ol.geom.LinearRing} value Geometry. * @param {module:ol/geom/LineString~LineString|module:ol/geom/LinearRing~LinearRing} value Geometry.
* @param {Array.<*>} objectStack Node stack. * @param {Array.<*>} objectStack Node stack.
* @private * @private
*/ */
@@ -656,7 +656,7 @@ GML3.prototype.writePosList_ = function(node, value, objectStack) {
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {ol.geom.Point} geometry Point geometry. * @param {module:ol/geom/Point~Point} geometry Point geometry.
* @param {Array.<*>} objectStack Node stack. * @param {Array.<*>} objectStack Node stack.
* @private * @private
*/ */
@@ -695,7 +695,7 @@ GML3.prototype.writeEnvelope = function(node, extent, objectStack) {
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {ol.geom.LinearRing} geometry LinearRing geometry. * @param {module:ol/geom/LinearRing~LinearRing} geometry LinearRing geometry.
* @param {Array.<*>} objectStack Node stack. * @param {Array.<*>} objectStack Node stack.
* @private * @private
*/ */
@@ -732,7 +732,7 @@ GML3.prototype.RING_NODE_FACTORY_ = function(value, objectStack, opt_nodeName) {
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {ol.geom.Polygon} geometry Polygon geometry. * @param {module:ol/geom/Polygon~Polygon} geometry Polygon geometry.
* @param {Array.<*>} objectStack Node stack. * @param {Array.<*>} objectStack Node stack.
* @private * @private
*/ */
@@ -761,7 +761,7 @@ GML3.prototype.writeSurfaceOrPolygon_ = function(node, geometry, objectStack) {
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {ol.geom.LineString} geometry LineString geometry. * @param {module:ol/geom/LineString~LineString} geometry LineString geometry.
* @param {Array.<*>} objectStack Node stack. * @param {Array.<*>} objectStack Node stack.
* @private * @private
*/ */
@@ -787,7 +787,7 @@ GML3.prototype.writeCurveOrLineString_ = function(node, geometry, objectStack) {
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {ol.geom.MultiPolygon} geometry MultiPolygon geometry. * @param {module:ol/geom/MultiPolygon~MultiPolygon} geometry MultiPolygon geometry.
* @param {Array.<*>} objectStack Node stack. * @param {Array.<*>} objectStack Node stack.
* @private * @private
*/ */
@@ -809,7 +809,7 @@ GML3.prototype.writeMultiSurfaceOrPolygon_ = function(node, geometry, objectStac
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {ol.geom.MultiPoint} geometry MultiPoint geometry. * @param {module:ol/geom/MultiPoint~MultiPoint} geometry MultiPoint geometry.
* @param {Array.<*>} objectStack Node stack. * @param {Array.<*>} objectStack Node stack.
* @private * @private
*/ */
@@ -830,7 +830,7 @@ GML3.prototype.writeMultiPoint_ = function(node, geometry, objectStack) {
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {ol.geom.MultiLineString} geometry MultiLineString geometry. * @param {module:ol/geom/MultiLineString~MultiLineString} geometry MultiLineString geometry.
* @param {Array.<*>} objectStack Node stack. * @param {Array.<*>} objectStack Node stack.
* @private * @private
*/ */
@@ -852,7 +852,7 @@ GML3.prototype.writeMultiCurveOrLineString_ = function(node, geometry, objectSta
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {ol.geom.LinearRing} ring LinearRing geometry. * @param {module:ol/geom/LinearRing~LinearRing} ring LinearRing geometry.
* @param {Array.<*>} objectStack Node stack. * @param {Array.<*>} objectStack Node stack.
* @private * @private
*/ */
@@ -865,7 +865,7 @@ GML3.prototype.writeRing_ = function(node, ring, objectStack) {
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {ol.geom.Polygon} polygon Polygon geometry. * @param {module:ol/geom/Polygon~Polygon} polygon Polygon geometry.
* @param {Array.<*>} objectStack Node stack. * @param {Array.<*>} objectStack Node stack.
* @private * @private
*/ */
@@ -881,7 +881,7 @@ GML3.prototype.writeSurfaceOrPolygonMember_ = function(node, polygon, objectStac
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {ol.geom.Point} point Point geometry. * @param {module:ol/geom/Point~Point} point Point geometry.
* @param {Array.<*>} objectStack Node stack. * @param {Array.<*>} objectStack Node stack.
* @private * @private
*/ */
@@ -894,7 +894,7 @@ GML3.prototype.writePointMember_ = function(node, point, objectStack) {
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {ol.geom.LineString} line LineString geometry. * @param {module:ol/geom/LineString~LineString} line LineString geometry.
* @param {Array.<*>} objectStack Node stack. * @param {Array.<*>} objectStack Node stack.
* @private * @private
*/ */
@@ -909,7 +909,7 @@ GML3.prototype.writeLineStringOrCurveMember_ = function(node, line, objectStack)
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {ol.geom.Polygon} polygon Polygon geometry. * @param {module:ol/geom/Polygon~Polygon} polygon Polygon geometry.
* @param {Array.<*>} objectStack Node stack. * @param {Array.<*>} objectStack Node stack.
* @private * @private
*/ */
@@ -922,7 +922,7 @@ GML3.prototype.writeSurfacePatches_ = function(node, polygon, objectStack) {
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {ol.geom.LineString} line LineString geometry. * @param {module:ol/geom/LineString~LineString} line LineString geometry.
* @param {Array.<*>} objectStack Node stack. * @param {Array.<*>} objectStack Node stack.
* @private * @private
*/ */
@@ -936,7 +936,7 @@ GML3.prototype.writeCurveSegments_ = function(node, line, objectStack) {
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {ol.geom.Geometry|module:ol/extent~Extent} geometry Geometry. * @param {module:ol/geom/Geometry~Geometry|module:ol/extent~Extent} geometry Geometry.
* @param {Array.<*>} objectStack Node stack. * @param {Array.<*>} objectStack Node stack.
*/ */
GML3.prototype.writeGeometryElement = function(node, geometry, objectStack) { GML3.prototype.writeGeometryElement = function(node, geometry, objectStack) {
@@ -952,7 +952,7 @@ GML3.prototype.writeGeometryElement = function(node, geometry, objectStack) {
value = geometry; value = geometry;
} }
} else { } else {
value = transformWithOptions(/** @type {ol.geom.Geometry} */ (geometry), true, context); value = transformWithOptions(/** @type {module:ol/geom/Geometry~Geometry} */ (geometry), true, context);
} }
pushSerializeAndPop(/** @type {module:ol/xml~NodeStackItem} */ pushSerializeAndPop(/** @type {module:ol/xml~NodeStackItem} */
(item), this.GEOMETRY_SERIALIZERS_, (item), this.GEOMETRY_SERIALIZERS_,
@@ -963,7 +963,7 @@ GML3.prototype.writeGeometryElement = function(node, geometry, objectStack) {
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {ol.Feature} feature Feature. * @param {module:ol/Feature~Feature} feature Feature.
* @param {Array.<*>} objectStack Node stack. * @param {Array.<*>} objectStack Node stack.
*/ */
GML3.prototype.writeFeatureElement = function(node, feature, objectStack) { GML3.prototype.writeFeatureElement = function(node, feature, objectStack) {
@@ -1010,7 +1010,7 @@ GML3.prototype.writeFeatureElement = function(node, feature, objectStack) {
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {Array.<ol.Feature>} features Features. * @param {Array.<module:ol/Feature~Feature>} features Features.
* @param {Array.<*>} objectStack Node stack. * @param {Array.<*>} objectStack Node stack.
* @private * @private
*/ */
@@ -1075,7 +1075,7 @@ GML3.prototype.GEOMETRY_NODE_FACTORY_ = function(value, objectStack, opt_nodeNam
const multiCurve = context['multiCurve']; const multiCurve = context['multiCurve'];
let nodeName; let nodeName;
if (!Array.isArray(value)) { if (!Array.isArray(value)) {
nodeName = /** @type {ol.geom.Geometry} */ (value).getType(); nodeName = /** @type {module:ol/geom/Geometry~Geometry} */ (value).getType();
if (nodeName === 'MultiPolygon' && multiSurface === true) { if (nodeName === 'MultiPolygon' && multiSurface === true) {
nodeName = 'MultiSurface'; nodeName = 'MultiSurface';
} else if (nodeName === 'Polygon' && surface === true) { } 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. * Encode a geometry in GML 3.1.1 Simple Features.
* *
* @param {ol.geom.Geometry} geometry Geometry. * @param {module:ol/geom/Geometry~Geometry} geometry Geometry.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Options. * @param {module:ol/format/Feature~WriteOptions=} opt_options Options.
* @return {Node} Node. * @return {Node} Node.
* @override * @override
@@ -1120,7 +1120,7 @@ GML3.prototype.writeGeometryNode = function(geometry, opt_options) {
* Encode an array of features in GML 3.1.1 Simple Features. * Encode an array of features in GML 3.1.1 Simple Features.
* *
* @function * @function
* @param {Array.<ol.Feature>} features Features. * @param {Array.<module:ol/Feature~Feature>} features Features.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Options. * @param {module:ol/format/Feature~WriteOptions=} opt_options Options.
* @return {string} Result. * @return {string} Result.
* @api * @api
@@ -1131,7 +1131,7 @@ GML3.prototype.writeFeatures;
/** /**
* Encode an array of features in the GML 3.1.1 format as an XML node. * Encode an array of features in the GML 3.1.1 format as an XML node.
* *
* @param {Array.<ol.Feature>} features Features. * @param {Array.<module:ol/Feature~Feature>} features Features.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Options. * @param {module:ol/format/Feature~WriteOptions=} opt_options Options.
* @return {Node} Node. * @return {Node} Node.
* @override * @override
+15 -15
View File
@@ -135,7 +135,7 @@ const ONLY_WHITESPACE_RE = /^[\s\xa0]*$/;
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack. * @param {Array.<*>} objectStack Object stack.
* @return {Array.<ol.Feature> | undefined} Features. * @return {Array.<module:ol/Feature~Feature> | undefined} Features.
*/ */
GMLBase.prototype.readFeaturesInternal = function(node, objectStack) { GMLBase.prototype.readFeaturesInternal = function(node, objectStack) {
const localName = node.localName; const localName = node.localName;
@@ -224,16 +224,16 @@ GMLBase.prototype.readFeaturesInternal = function(node, objectStack) {
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack. * @param {Array.<*>} objectStack Object stack.
* @return {ol.geom.Geometry|undefined} Geometry. * @return {module:ol/geom/Geometry~Geometry|undefined} Geometry.
*/ */
GMLBase.prototype.readGeometryElement = function(node, objectStack) { GMLBase.prototype.readGeometryElement = function(node, objectStack) {
const context = /** @type {Object} */ (objectStack[0]); const context = /** @type {Object} */ (objectStack[0]);
context['srsName'] = node.firstElementChild.getAttribute('srsName'); context['srsName'] = node.firstElementChild.getAttribute('srsName');
context['srsDimension'] = node.firstElementChild.getAttribute('srsDimension'); context['srsDimension'] = node.firstElementChild.getAttribute('srsDimension');
/** @type {ol.geom.Geometry} */ /** @type {module:ol/geom/Geometry~Geometry} */
const geometry = pushParseAndPop(null, this.GEOMETRY_PARSERS_, node, objectStack, this); const geometry = pushParseAndPop(null, this.GEOMETRY_PARSERS_, node, objectStack, this);
if (geometry) { if (geometry) {
return /** @type {ol.geom.Geometry} */ (transformWithOptions(geometry, false, context)); return /** @type {module:ol/geom/Geometry~Geometry} */ (transformWithOptions(geometry, false, context));
} else { } else {
return undefined; return undefined;
} }
@@ -243,7 +243,7 @@ GMLBase.prototype.readGeometryElement = function(node, objectStack) {
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack. * @param {Array.<*>} objectStack Object stack.
* @return {ol.Feature} Feature. * @return {module:ol/Feature~Feature} Feature.
*/ */
GMLBase.prototype.readFeatureElement = function(node, objectStack) { GMLBase.prototype.readFeatureElement = function(node, objectStack) {
let n; let n;
@@ -285,7 +285,7 @@ GMLBase.prototype.readFeatureElement = function(node, objectStack) {
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack. * @param {Array.<*>} objectStack Object stack.
* @return {ol.geom.Point|undefined} Point. * @return {module:ol/geom/Point~Point|undefined} Point.
*/ */
GMLBase.prototype.readPoint = function(node, objectStack) { GMLBase.prototype.readPoint = function(node, objectStack) {
const flatCoordinates = this.readFlatCoordinatesFromNode_(node, objectStack); const flatCoordinates = this.readFlatCoordinatesFromNode_(node, objectStack);
@@ -300,7 +300,7 @@ GMLBase.prototype.readPoint = function(node, objectStack) {
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack. * @param {Array.<*>} objectStack Object stack.
* @return {ol.geom.MultiPoint|undefined} MultiPoint. * @return {module:ol/geom/MultiPoint~MultiPoint|undefined} MultiPoint.
*/ */
GMLBase.prototype.readMultiPoint = function(node, objectStack) { GMLBase.prototype.readMultiPoint = function(node, objectStack) {
/** @type {Array.<Array.<number>>} */ /** @type {Array.<Array.<number>>} */
@@ -317,10 +317,10 @@ GMLBase.prototype.readMultiPoint = function(node, objectStack) {
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack. * @param {Array.<*>} objectStack Object stack.
* @return {ol.geom.MultiLineString|undefined} MultiLineString. * @return {module:ol/geom/MultiLineString~MultiLineString|undefined} MultiLineString.
*/ */
GMLBase.prototype.readMultiLineString = function(node, objectStack) { GMLBase.prototype.readMultiLineString = function(node, objectStack) {
/** @type {Array.<ol.geom.LineString>} */ /** @type {Array.<module:ol/geom/LineString~LineString>} */
const lineStrings = pushParseAndPop([], const lineStrings = pushParseAndPop([],
this.MULTILINESTRING_PARSERS_, node, objectStack, this); this.MULTILINESTRING_PARSERS_, node, objectStack, this);
if (lineStrings) { if (lineStrings) {
@@ -336,10 +336,10 @@ GMLBase.prototype.readMultiLineString = function(node, objectStack) {
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack. * @param {Array.<*>} objectStack Object stack.
* @return {ol.geom.MultiPolygon|undefined} MultiPolygon. * @return {module:ol/geom/MultiPolygon~MultiPolygon|undefined} MultiPolygon.
*/ */
GMLBase.prototype.readMultiPolygon = function(node, objectStack) { GMLBase.prototype.readMultiPolygon = function(node, objectStack) {
/** @type {Array.<ol.geom.Polygon>} */ /** @type {Array.<module:ol/geom/Polygon~Polygon>} */
const polygons = pushParseAndPop([], this.MULTIPOLYGON_PARSERS_, node, objectStack, this); const polygons = pushParseAndPop([], this.MULTIPOLYGON_PARSERS_, node, objectStack, this);
if (polygons) { if (polygons) {
const multiPolygon = new MultiPolygon(null); const multiPolygon = new MultiPolygon(null);
@@ -384,7 +384,7 @@ GMLBase.prototype.polygonMemberParser_ = function(node, objectStack) {
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack. * @param {Array.<*>} objectStack Object stack.
* @return {ol.geom.LineString|undefined} LineString. * @return {module:ol/geom/LineString~LineString|undefined} LineString.
*/ */
GMLBase.prototype.readLineString = function(node, objectStack) { GMLBase.prototype.readLineString = function(node, objectStack) {
const flatCoordinates = this.readFlatCoordinatesFromNode_(node, objectStack); const flatCoordinates = this.readFlatCoordinatesFromNode_(node, objectStack);
@@ -419,7 +419,7 @@ GMLBase.prototype.readFlatLinearRing_ = function(node, objectStack) {
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack. * @param {Array.<*>} objectStack Object stack.
* @return {ol.geom.LinearRing|undefined} LinearRing. * @return {module:ol/geom/LinearRing~LinearRing|undefined} LinearRing.
*/ */
GMLBase.prototype.readLinearRing = function(node, objectStack) { GMLBase.prototype.readLinearRing = function(node, objectStack) {
const flatCoordinates = this.readFlatCoordinatesFromNode_(node, objectStack); const flatCoordinates = this.readFlatCoordinatesFromNode_(node, objectStack);
@@ -436,7 +436,7 @@ GMLBase.prototype.readLinearRing = function(node, objectStack) {
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack. * @param {Array.<*>} objectStack Object stack.
* @return {ol.geom.Polygon|undefined} Polygon. * @return {module:ol/geom/Polygon~Polygon|undefined} Polygon.
*/ */
GMLBase.prototype.readPolygon = function(node, objectStack) { GMLBase.prototype.readPolygon = function(node, objectStack) {
/** @type {Array.<Array.<number>>} */ /** @type {Array.<Array.<number>>} */
@@ -573,7 +573,7 @@ GMLBase.prototype.readGeometryFromNode = function(node, opt_options) {
* @function * @function
* @param {Document|Node|Object|string} source Source. * @param {Document|Node|Object|string} source Source.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Options. * @param {module:ol/format/Feature~ReadOptions=} opt_options Options.
* @return {Array.<ol.Feature>} Features. * @return {Array.<module:ol/Feature~Feature>} Features.
* @api * @api
*/ */
GMLBase.prototype.readFeatures; GMLBase.prototype.readFeatures;
+22 -22
View File
@@ -20,7 +20,7 @@ import {createElementNS, makeArrayPusher, makeArraySerializer, makeChildAppender
/** /**
* @typedef {Object} Options * @typedef {Object} Options
* @property {function(ol.Feature, Node)|undefined} readExtensions Callback function * @property {function(module:ol/Feature~Feature, Node)|undefined} readExtensions Callback function
* to process `extensions` nodes. To prevent memory leaks, this callback function must * to process `extensions` nodes. To prevent memory leaks, this callback function must
* not store any references to the node. Note that the `extensions` * not store any references to the node. Note that the `extensions`
* node is not allowed in GPX 1.0. Moreover, only `extensions` * node is not allowed in GPX 1.0. Moreover, only `extensions`
@@ -50,7 +50,7 @@ const GPX = function(opt_options) {
this.defaultDataProjection = getProjection('EPSG:4326'); this.defaultDataProjection = getProjection('EPSG:4326');
/** /**
* @type {function(ol.Feature, Node)|undefined} * @type {function(module:ol/Feature~Feature, Node)|undefined}
* @private * @private
*/ */
this.readExtensions_ = options.readExtensions; this.readExtensions_ = options.readExtensions;
@@ -80,7 +80,7 @@ const SCHEMA_LOCATION = 'http://www.topografix.com/GPX/1/1 ' +
/** /**
* @const * @const
* @type {Object.<string, function(Node, Array.<*>): (ol.Feature|undefined)>} * @type {Object.<string, function(Node, Array.<*>): (module:ol/Feature~Feature|undefined)>}
*/ */
const FEATURE_READER = { const FEATURE_READER = {
'rte': readRte, 'rte': readRte,
@@ -364,7 +364,7 @@ const GEOMETRY_TYPE_TO_NODENAME = {
* @return {Node|undefined} Node. * @return {Node|undefined} Node.
*/ */
function GPX_NODE_FACTORY(value, objectStack, opt_nodeName) { function GPX_NODE_FACTORY(value, objectStack, opt_nodeName) {
const geometry = /** @type {ol.Feature} */ (value).getGeometry(); const geometry = /** @type {module:ol/Feature~Feature} */ (value).getGeometry();
if (geometry) { if (geometry) {
const nodeName = GEOMETRY_TYPE_TO_NODENAME[geometry.getType()]; const nodeName = GEOMETRY_TYPE_TO_NODENAME[geometry.getType()];
if (nodeName) { if (nodeName) {
@@ -423,7 +423,7 @@ function appendCoordinate(flatCoordinates, layoutOptions, node, values) {
* @param {ol.LayoutOptions} layoutOptions Layout options. * @param {ol.LayoutOptions} layoutOptions Layout options.
* @param {Array.<number>} flatCoordinates Flat coordinates. * @param {Array.<number>} flatCoordinates Flat coordinates.
* @param {Array.<number>=} ends Ends. * @param {Array.<number>=} ends Ends.
* @return {ol.geom.GeometryLayout} Layout. * @return {module:ol/geom/GeometryLayout~GeometryLayout} Layout.
*/ */
function applyLayoutOptions(layoutOptions, flatCoordinates, ends) { function applyLayoutOptions(layoutOptions, flatCoordinates, ends) {
let layout = GeometryLayout.XY; let layout = GeometryLayout.XY;
@@ -531,7 +531,7 @@ function parseTrkSeg(node, objectStack) {
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack. * @param {Array.<*>} objectStack Object stack.
* @return {ol.Feature|undefined} Track. * @return {module:ol/Feature~Feature|undefined} Track.
*/ */
function readRte(node, objectStack) { function readRte(node, objectStack) {
const options = /** @type {module:ol/format/Feature~ReadOptions} */ (objectStack[0]); const options = /** @type {module:ol/format/Feature~ReadOptions} */ (objectStack[0]);
@@ -560,7 +560,7 @@ function readRte(node, objectStack) {
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack. * @param {Array.<*>} objectStack Object stack.
* @return {ol.Feature|undefined} Track. * @return {module:ol/Feature~Feature|undefined} Track.
*/ */
function readTrk(node, objectStack) { function readTrk(node, objectStack) {
const options = /** @type {module:ol/format/Feature~ReadOptions} */ (objectStack[0]); const options = /** @type {module:ol/format/Feature~ReadOptions} */ (objectStack[0]);
@@ -592,7 +592,7 @@ function readTrk(node, objectStack) {
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack. * @param {Array.<*>} objectStack Object stack.
* @return {ol.Feature|undefined} Waypoint. * @return {module:ol/Feature~Feature|undefined} Waypoint.
*/ */
function readWpt(node, objectStack) { function readWpt(node, objectStack) {
const options = /** @type {module:ol/format/Feature~ReadOptions} */ (objectStack[0]); const options = /** @type {module:ol/format/Feature~ReadOptions} */ (objectStack[0]);
@@ -612,7 +612,7 @@ function readWpt(node, objectStack) {
/** /**
* @param {Array.<ol.Feature>} features List of features. * @param {Array.<module:ol/Feature~Feature>} features List of features.
* @private * @private
*/ */
GPX.prototype.handleReadExtensions_ = function(features) { GPX.prototype.handleReadExtensions_ = function(features) {
@@ -638,7 +638,7 @@ GPX.prototype.handleReadExtensions_ = function(features) {
* @function * @function
* @param {Document|Node|Object|string} source Source. * @param {Document|Node|Object|string} source Source.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options. * @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @return {ol.Feature} Feature. * @return {module:ol/Feature~Feature} Feature.
* @api * @api
*/ */
GPX.prototype.readFeature; GPX.prototype.readFeature;
@@ -672,7 +672,7 @@ GPX.prototype.readFeatureFromNode = function(node, opt_options) {
* @function * @function
* @param {Document|Node|Object|string} source Source. * @param {Document|Node|Object|string} source Source.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options. * @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @return {Array.<ol.Feature>} Features. * @return {Array.<module:ol/Feature~Feature>} Features.
* @api * @api
*/ */
GPX.prototype.readFeatures; GPX.prototype.readFeatures;
@@ -686,7 +686,7 @@ GPX.prototype.readFeaturesFromNode = function(node, opt_options) {
return []; return [];
} }
if (node.localName == 'gpx') { if (node.localName == 'gpx') {
/** @type {Array.<ol.Feature>} */ /** @type {Array.<module:ol/Feature~Feature>} */
const features = pushParseAndPop([], GPX_PARSERS, const features = pushParseAndPop([], GPX_PARSERS,
node, [this.getReadOptions(node, opt_options)]); node, [this.getReadOptions(node, opt_options)]);
if (features) { if (features) {
@@ -705,7 +705,7 @@ GPX.prototype.readFeaturesFromNode = function(node, opt_options) {
* *
* @function * @function
* @param {Document|Node|Object|string} source Source. * @param {Document|Node|Object|string} source Source.
* @return {ol.proj.Projection} Projection. * @return {module:ol/proj/Projection~Projection} Projection.
* @api * @api
*/ */
GPX.prototype.readProjection; GPX.prototype.readProjection;
@@ -776,7 +776,7 @@ function writeWptType(node, coordinate, objectStack) {
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {ol.Feature} feature Feature. * @param {module:ol/Feature~Feature} feature Feature.
* @param {Array.<*>} objectStack Object stack. * @param {Array.<*>} objectStack Object stack.
*/ */
function writeRte(node, feature, objectStack) { function writeRte(node, feature, objectStack) {
@@ -785,7 +785,7 @@ function writeRte(node, feature, objectStack) {
const context = {node: node, 'properties': properties}; const context = {node: node, 'properties': properties};
let geometry = feature.getGeometry(); let geometry = feature.getGeometry();
if (geometry) { if (geometry) {
geometry = /** @type {ol.geom.LineString} */ (transformWithOptions(geometry, true, options)); geometry = /** @type {module:ol/geom/LineString~LineString} */ (transformWithOptions(geometry, true, options));
context['geometryLayout'] = geometry.getLayout(); context['geometryLayout'] = geometry.getLayout();
properties['rtept'] = geometry.getCoordinates(); properties['rtept'] = geometry.getCoordinates();
} }
@@ -800,7 +800,7 @@ function writeRte(node, feature, objectStack) {
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {ol.Feature} feature Feature. * @param {module:ol/Feature~Feature} feature Feature.
* @param {Array.<*>} objectStack Object stack. * @param {Array.<*>} objectStack Object stack.
*/ */
function writeTrk(node, feature, objectStack) { function writeTrk(node, feature, objectStack) {
@@ -810,7 +810,7 @@ function writeTrk(node, feature, objectStack) {
const context = {node: node, 'properties': properties}; const context = {node: node, 'properties': properties};
let geometry = feature.getGeometry(); let geometry = feature.getGeometry();
if (geometry) { if (geometry) {
geometry = /** @type {ol.geom.MultiLineString} */ geometry = /** @type {module:ol/geom/MultiLineString~MultiLineString} */
(transformWithOptions(geometry, true, options)); (transformWithOptions(geometry, true, options));
properties['trkseg'] = geometry.getLineStrings(); properties['trkseg'] = geometry.getLineStrings();
} }
@@ -825,7 +825,7 @@ function writeTrk(node, feature, objectStack) {
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {ol.geom.LineString} lineString LineString. * @param {module:ol/geom/LineString~LineString} lineString LineString.
* @param {Array.<*>} objectStack Object stack. * @param {Array.<*>} objectStack Object stack.
*/ */
function writeTrkSeg(node, lineString, objectStack) { function writeTrkSeg(node, lineString, objectStack) {
@@ -840,7 +840,7 @@ function writeTrkSeg(node, lineString, objectStack) {
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {ol.Feature} feature Feature. * @param {module:ol/Feature~Feature} feature Feature.
* @param {Array.<*>} objectStack Object stack. * @param {Array.<*>} objectStack Object stack.
*/ */
function writeWpt(node, feature, objectStack) { function writeWpt(node, feature, objectStack) {
@@ -849,7 +849,7 @@ function writeWpt(node, feature, objectStack) {
context['properties'] = feature.getProperties(); context['properties'] = feature.getProperties();
let geometry = feature.getGeometry(); let geometry = feature.getGeometry();
if (geometry) { if (geometry) {
geometry = /** @type {ol.geom.Point} */ geometry = /** @type {module:ol/geom/Point~Point} */
(transformWithOptions(geometry, true, options)); (transformWithOptions(geometry, true, options));
context['geometryLayout'] = geometry.getLayout(); context['geometryLayout'] = geometry.getLayout();
writeWptType(node, geometry.getCoordinates(), objectStack); writeWptType(node, geometry.getCoordinates(), objectStack);
@@ -863,7 +863,7 @@ function writeWpt(node, feature, objectStack) {
* as tracks (`<trk>`). * as tracks (`<trk>`).
* *
* @function * @function
* @param {Array.<ol.Feature>} features Features. * @param {Array.<module:ol/Feature~Feature>} features Features.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {string} Result. * @return {string} Result.
* @api * @api
@@ -876,7 +876,7 @@ GPX.prototype.writeFeatures;
* LineString geometries are output as routes (`<rte>`), and MultiLineString * LineString geometries are output as routes (`<rte>`), and MultiLineString
* as tracks (`<trk>`). * as tracks (`<trk>`).
* *
* @param {Array.<ol.Feature>} features Features. * @param {Array.<module:ol/Feature~Feature>} features Features.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Options. * @param {module:ol/format/Feature~WriteOptions=} opt_options Options.
* @return {Node} Node. * @return {Node} Node.
* @override * @override
+35 -35
View File
@@ -83,7 +83,7 @@ inherits(GeoJSON, JSONFeature);
/** /**
* @const * @const
* @type {Object.<string, function(GeoJSONObject): ol.geom.Geometry>} * @type {Object.<string, function(GeoJSONObject): module:ol/geom/Geometry~Geometry>}
*/ */
const GEOMETRY_READERS = { const GEOMETRY_READERS = {
'Point': readPointGeometry, 'Point': readPointGeometry,
@@ -98,7 +98,7 @@ const GEOMETRY_READERS = {
/** /**
* @const * @const
* @type {Object.<string, function(ol.geom.Geometry, module:ol/format/Feature~WriteOptions=): (GeoJSONGeometry|GeoJSONGeometryCollection)>} * @type {Object.<string, function(module:ol/geom/Geometry~Geometry, module:ol/format/Feature~WriteOptions=): (GeoJSONGeometry|GeoJSONGeometryCollection)>}
*/ */
const GEOMETRY_WRITERS = { const GEOMETRY_WRITERS = {
'Point': writePointGeometry, 'Point': writePointGeometry,
@@ -115,14 +115,14 @@ const GEOMETRY_WRITERS = {
/** /**
* @param {GeoJSONGeometry|GeoJSONGeometryCollection} object Object. * @param {GeoJSONGeometry|GeoJSONGeometryCollection} object Object.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options. * @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @return {ol.geom.Geometry} Geometry. * @return {module:ol/geom/Geometry~Geometry} Geometry.
*/ */
function readGeometry(object, opt_options) { function readGeometry(object, opt_options) {
if (!object) { if (!object) {
return null; return null;
} }
const geometryReader = GEOMETRY_READERS[object.type]; const geometryReader = GEOMETRY_READERS[object.type];
return /** @type {ol.geom.Geometry} */ (transformWithOptions( return /** @type {module:ol/geom/Geometry~Geometry} */ (transformWithOptions(
geometryReader(object), false, opt_options) geometryReader(object), false, opt_options)
); );
} }
@@ -131,13 +131,13 @@ function readGeometry(object, opt_options) {
/** /**
* @param {GeoJSONGeometryCollection} object Object. * @param {GeoJSONGeometryCollection} object Object.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options. * @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @return {ol.geom.GeometryCollection} Geometry collection. * @return {module:ol/geom/GeometryCollection~GeometryCollection} Geometry collection.
*/ */
function readGeometryCollectionGeometry(object, opt_options) { function readGeometryCollectionGeometry(object, opt_options) {
const geometries = object.geometries.map( const geometries = object.geometries.map(
/** /**
* @param {GeoJSONGeometry} geometry Geometry. * @param {GeoJSONGeometry} geometry Geometry.
* @return {ol.geom.Geometry} geometry Geometry. * @return {module:ol/geom/Geometry~Geometry} geometry Geometry.
*/ */
function(geometry) { function(geometry) {
return readGeometry(geometry, opt_options); return readGeometry(geometry, opt_options);
@@ -148,7 +148,7 @@ function readGeometryCollectionGeometry(object, opt_options) {
/** /**
* @param {GeoJSONGeometry} object Object. * @param {GeoJSONGeometry} object Object.
* @return {ol.geom.Point} Point. * @return {module:ol/geom/Point~Point} Point.
*/ */
function readPointGeometry(object) { function readPointGeometry(object) {
return new Point(object.coordinates); return new Point(object.coordinates);
@@ -157,7 +157,7 @@ function readPointGeometry(object) {
/** /**
* @param {GeoJSONGeometry} object Object. * @param {GeoJSONGeometry} object Object.
* @return {ol.geom.LineString} LineString. * @return {module:ol/geom/LineString~LineString} LineString.
*/ */
function readLineStringGeometry(object) { function readLineStringGeometry(object) {
return new LineString(object.coordinates); return new LineString(object.coordinates);
@@ -166,7 +166,7 @@ function readLineStringGeometry(object) {
/** /**
* @param {GeoJSONGeometry} object Object. * @param {GeoJSONGeometry} object Object.
* @return {ol.geom.MultiLineString} MultiLineString. * @return {module:ol/geom/MultiLineString~MultiLineString} MultiLineString.
*/ */
function readMultiLineStringGeometry(object) { function readMultiLineStringGeometry(object) {
return new MultiLineString(object.coordinates); return new MultiLineString(object.coordinates);
@@ -175,7 +175,7 @@ function readMultiLineStringGeometry(object) {
/** /**
* @param {GeoJSONGeometry} object Object. * @param {GeoJSONGeometry} object Object.
* @return {ol.geom.MultiPoint} MultiPoint. * @return {module:ol/geom/MultiPoint~MultiPoint} MultiPoint.
*/ */
function readMultiPointGeometry(object) { function readMultiPointGeometry(object) {
return new MultiPoint(object.coordinates); return new MultiPoint(object.coordinates);
@@ -184,7 +184,7 @@ function readMultiPointGeometry(object) {
/** /**
* @param {GeoJSONGeometry} object Object. * @param {GeoJSONGeometry} object Object.
* @return {ol.geom.MultiPolygon} MultiPolygon. * @return {module:ol/geom/MultiPolygon~MultiPolygon} MultiPolygon.
*/ */
function readMultiPolygonGeometry(object) { function readMultiPolygonGeometry(object) {
return new MultiPolygon(object.coordinates); return new MultiPolygon(object.coordinates);
@@ -193,7 +193,7 @@ function readMultiPolygonGeometry(object) {
/** /**
* @param {GeoJSONGeometry} object Object. * @param {GeoJSONGeometry} object Object.
* @return {ol.geom.Polygon} Polygon. * @return {module:ol/geom/Polygon~Polygon} Polygon.
*/ */
function readPolygonGeometry(object) { function readPolygonGeometry(object) {
return new Polygon(object.coordinates); return new Polygon(object.coordinates);
@@ -201,19 +201,19 @@ function readPolygonGeometry(object) {
/** /**
* @param {ol.geom.Geometry} geometry Geometry. * @param {module:ol/geom/Geometry~Geometry} geometry Geometry.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {GeoJSONGeometry|GeoJSONGeometryCollection} GeoJSON geometry. * @return {GeoJSONGeometry|GeoJSONGeometryCollection} GeoJSON geometry.
*/ */
function writeGeometry(geometry, opt_options) { function writeGeometry(geometry, opt_options) {
const geometryWriter = GEOMETRY_WRITERS[geometry.getType()]; const geometryWriter = GEOMETRY_WRITERS[geometry.getType()];
return geometryWriter(/** @type {ol.geom.Geometry} */ ( return geometryWriter(/** @type {module:ol/geom/Geometry~Geometry} */ (
transformWithOptions(geometry, true, opt_options)), opt_options); transformWithOptions(geometry, true, opt_options)), opt_options);
} }
/** /**
* @param {ol.geom.Geometry} geometry Geometry. * @param {module:ol/geom/Geometry~Geometry} geometry Geometry.
* @return {GeoJSONGeometryCollection} Empty GeoJSON geometry collection. * @return {GeoJSONGeometryCollection} Empty GeoJSON geometry collection.
*/ */
function writeEmptyGeometryCollectionGeometry(geometry) { function writeEmptyGeometryCollectionGeometry(geometry) {
@@ -225,7 +225,7 @@ function writeEmptyGeometryCollectionGeometry(geometry) {
/** /**
* @param {ol.geom.GeometryCollection} geometry Geometry. * @param {module:ol/geom/GeometryCollection~GeometryCollection} geometry Geometry.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {GeoJSONGeometryCollection} GeoJSON geometry collection. * @return {GeoJSONGeometryCollection} GeoJSON geometry collection.
*/ */
@@ -243,7 +243,7 @@ function writeGeometryCollectionGeometry(geometry, opt_options) {
/** /**
* @param {ol.geom.LineString} geometry Geometry. * @param {module:ol/geom/LineString~LineString} geometry Geometry.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {GeoJSONGeometry} GeoJSON geometry. * @return {GeoJSONGeometry} GeoJSON geometry.
*/ */
@@ -256,7 +256,7 @@ function writeLineStringGeometry(geometry, opt_options) {
/** /**
* @param {ol.geom.MultiLineString} geometry Geometry. * @param {module:ol/geom/MultiLineString~MultiLineString} geometry Geometry.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {GeoJSONGeometry} GeoJSON geometry. * @return {GeoJSONGeometry} GeoJSON geometry.
*/ */
@@ -269,7 +269,7 @@ function writeMultiLineStringGeometry(geometry, opt_options) {
/** /**
* @param {ol.geom.MultiPoint} geometry Geometry. * @param {module:ol/geom/MultiPoint~MultiPoint} geometry Geometry.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {GeoJSONGeometry} GeoJSON geometry. * @return {GeoJSONGeometry} GeoJSON geometry.
*/ */
@@ -282,7 +282,7 @@ function writeMultiPointGeometry(geometry, opt_options) {
/** /**
* @param {ol.geom.MultiPolygon} geometry Geometry. * @param {module:ol/geom/MultiPolygon~MultiPolygon} geometry Geometry.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {GeoJSONGeometry} GeoJSON geometry. * @return {GeoJSONGeometry} GeoJSON geometry.
*/ */
@@ -299,7 +299,7 @@ function writeMultiPolygonGeometry(geometry, opt_options) {
/** /**
* @param {ol.geom.Point} geometry Geometry. * @param {module:ol/geom/Point~Point} geometry Geometry.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {GeoJSONGeometry} GeoJSON geometry. * @return {GeoJSONGeometry} GeoJSON geometry.
*/ */
@@ -312,7 +312,7 @@ function writePointGeometry(geometry, opt_options) {
/** /**
* @param {ol.geom.Polygon} geometry Geometry. * @param {module:ol/geom/Polygon~Polygon} geometry Geometry.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {GeoJSONGeometry} GeoJSON geometry. * @return {GeoJSONGeometry} GeoJSON geometry.
*/ */
@@ -332,12 +332,12 @@ function writePolygonGeometry(geometry, opt_options) {
* Read a feature from a GeoJSON Feature source. Only works for Feature or * Read a feature from a GeoJSON Feature source. Only works for Feature or
* geometry types. Use {@link ol.format.GeoJSON#readFeatures} to read * geometry types. Use {@link ol.format.GeoJSON#readFeatures} to read
* FeatureCollection source. If feature at source has an id, it will be used * FeatureCollection source. If feature at source has an id, it will be used
* as Feature id by calling {@link ol.Feature#setId} internally. * as Feature id by calling {@link module:ol/Feature~Feature#setId} internally.
* *
* @function * @function
* @param {Document|Node|Object|string} source Source. * @param {Document|Node|Object|string} source Source.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options. * @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @return {ol.Feature} Feature. * @return {module:ol/Feature~Feature} Feature.
* @api * @api
*/ */
GeoJSON.prototype.readFeature; GeoJSON.prototype.readFeature;
@@ -351,7 +351,7 @@ GeoJSON.prototype.readFeature;
* @function * @function
* @param {Document|Node|Object|string} source Source. * @param {Document|Node|Object|string} source Source.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options. * @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @return {Array.<ol.Feature>} Features. * @return {Array.<module:ol/Feature~Feature>} Features.
* @api * @api
*/ */
GeoJSON.prototype.readFeatures; GeoJSON.prototype.readFeatures;
@@ -397,7 +397,7 @@ GeoJSON.prototype.readFeatureFromObject = function(object, opt_options) {
*/ */
GeoJSON.prototype.readFeaturesFromObject = function(object, opt_options) { GeoJSON.prototype.readFeaturesFromObject = function(object, opt_options) {
const geoJSONObject = /** @type {GeoJSONObject} */ (object); const geoJSONObject = /** @type {GeoJSONObject} */ (object);
/** @type {Array.<ol.Feature>} */ /** @type {Array.<module:ol/Feature~Feature>} */
let features = null; let features = null;
if (geoJSONObject.type === 'FeatureCollection') { if (geoJSONObject.type === 'FeatureCollection') {
const geoJSONFeatureCollection = /** @type {GeoJSONFeatureCollection} */ (object); const geoJSONFeatureCollection = /** @type {GeoJSONFeatureCollection} */ (object);
@@ -419,7 +419,7 @@ GeoJSON.prototype.readFeaturesFromObject = function(object, opt_options) {
* @function * @function
* @param {Document|Node|Object|string} source Source. * @param {Document|Node|Object|string} source Source.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options. * @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @return {ol.geom.Geometry} Geometry. * @return {module:ol/geom/Geometry~Geometry} Geometry.
* @api * @api
*/ */
GeoJSON.prototype.readGeometry; GeoJSON.prototype.readGeometry;
@@ -438,7 +438,7 @@ GeoJSON.prototype.readGeometryFromObject = function(object, opt_options) {
* *
* @function * @function
* @param {Document|Node|Object|string} source Source. * @param {Document|Node|Object|string} source Source.
* @return {ol.proj.Projection} Projection. * @return {module:ol/proj/Projection~Projection} Projection.
* @api * @api
*/ */
GeoJSON.prototype.readProjection; GeoJSON.prototype.readProjection;
@@ -460,7 +460,7 @@ GeoJSON.prototype.readProjectionFromObject = function(object) {
} else { } else {
projection = this.defaultDataProjection; projection = this.defaultDataProjection;
} }
return /** @type {ol.proj.Projection} */ (projection); return /** @type {module:ol/proj/Projection~Projection} */ (projection);
}; };
@@ -468,7 +468,7 @@ GeoJSON.prototype.readProjectionFromObject = function(object) {
* Encode a feature as a GeoJSON Feature string. * Encode a feature as a GeoJSON Feature string.
* *
* @function * @function
* @param {ol.Feature} feature Feature. * @param {module:ol/Feature~Feature} feature Feature.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {string} GeoJSON. * @return {string} GeoJSON.
* @override * @override
@@ -480,7 +480,7 @@ GeoJSON.prototype.writeFeature;
/** /**
* Encode a feature as a GeoJSON Feature object. * Encode a feature as a GeoJSON Feature object.
* *
* @param {ol.Feature} feature Feature. * @param {module:ol/Feature~Feature} feature Feature.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {GeoJSONFeature} Object. * @return {GeoJSONFeature} Object.
* @override * @override
@@ -517,7 +517,7 @@ GeoJSON.prototype.writeFeatureObject = function(feature, opt_options) {
* Encode an array of features as GeoJSON. * Encode an array of features as GeoJSON.
* *
* @function * @function
* @param {Array.<ol.Feature>} features Features. * @param {Array.<module:ol/Feature~Feature>} features Features.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {string} GeoJSON. * @return {string} GeoJSON.
* @api * @api
@@ -528,7 +528,7 @@ GeoJSON.prototype.writeFeatures;
/** /**
* Encode an array of features as a GeoJSON object. * Encode an array of features as a GeoJSON object.
* *
* @param {Array.<ol.Feature>} features Features. * @param {Array.<module:ol/Feature~Feature>} features Features.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {GeoJSONFeatureCollection} GeoJSON Object. * @return {GeoJSONFeatureCollection} GeoJSON Object.
* @override * @override
@@ -551,7 +551,7 @@ GeoJSON.prototype.writeFeaturesObject = function(features, opt_options) {
* Encode a geometry as a GeoJSON string. * Encode a geometry as a GeoJSON string.
* *
* @function * @function
* @param {ol.geom.Geometry} geometry Geometry. * @param {module:ol/geom/Geometry~Geometry} geometry Geometry.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {string} GeoJSON. * @return {string} GeoJSON.
* @api * @api
@@ -562,7 +562,7 @@ GeoJSON.prototype.writeGeometry;
/** /**
* Encode a geometry as a GeoJSON object. * Encode a geometry as a GeoJSON object.
* *
* @param {ol.geom.Geometry} geometry Geometry. * @param {module:ol/geom/Geometry~Geometry} geometry Geometry.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {GeoJSONGeometry|GeoJSONGeometryCollection} Object. * @return {GeoJSONGeometry|GeoJSONGeometryCollection} Object.
* @override * @override
+3 -3
View File
@@ -95,7 +95,7 @@ const NEWLINE_RE = /\r\n|\r|\n/;
* @function * @function
* @param {Document|Node|Object|string} source Source. * @param {Document|Node|Object|string} source Source.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options. * @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @return {ol.Feature} Feature. * @return {module:ol/Feature~Feature} Feature.
* @api * @api
*/ */
IGC.prototype.readFeature; IGC.prototype.readFeature;
@@ -185,7 +185,7 @@ IGC.prototype.readFeatureFromText = function(text, opt_options) {
* @function * @function
* @param {Document|Node|Object|string} source Source. * @param {Document|Node|Object|string} source Source.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options. * @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @return {Array.<ol.Feature>} Features. * @return {Array.<module:ol/Feature~Feature>} Features.
* @api * @api
*/ */
IGC.prototype.readFeatures; IGC.prototype.readFeatures;
@@ -209,7 +209,7 @@ IGC.prototype.readFeaturesFromText = function(text, opt_options) {
* *
* @function * @function
* @param {Document|Node|Object|string} source Source. * @param {Document|Node|Object|string} source Source.
* @return {ol.proj.Projection} Projection. * @return {module:ol/proj/Projection~Projection} Projection.
* @api * @api
*/ */
IGC.prototype.readProjection; IGC.prototype.readProjection;
+7 -7
View File
@@ -69,7 +69,7 @@ JSONFeature.prototype.readFeatures = function(source, opt_options) {
* @param {Object} object Object. * @param {Object} object Object.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options. * @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @protected * @protected
* @return {ol.Feature} Feature. * @return {module:ol/Feature~Feature} Feature.
*/ */
JSONFeature.prototype.readFeatureFromObject = function(object, opt_options) {}; JSONFeature.prototype.readFeatureFromObject = function(object, opt_options) {};
@@ -79,7 +79,7 @@ JSONFeature.prototype.readFeatureFromObject = function(object, opt_options) {};
* @param {Object} object Object. * @param {Object} object Object.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options. * @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @protected * @protected
* @return {Array.<ol.Feature>} Features. * @return {Array.<module:ol/Feature~Feature>} Features.
*/ */
JSONFeature.prototype.readFeaturesFromObject = function(object, opt_options) {}; JSONFeature.prototype.readFeaturesFromObject = function(object, opt_options) {};
@@ -98,7 +98,7 @@ JSONFeature.prototype.readGeometry = function(source, opt_options) {
* @param {Object} object Object. * @param {Object} object Object.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options. * @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @protected * @protected
* @return {ol.geom.Geometry} Geometry. * @return {module:ol/geom/Geometry~Geometry} Geometry.
*/ */
JSONFeature.prototype.readGeometryFromObject = function(object, opt_options) {}; JSONFeature.prototype.readGeometryFromObject = function(object, opt_options) {};
@@ -115,7 +115,7 @@ JSONFeature.prototype.readProjection = function(source) {
* @abstract * @abstract
* @param {Object} object Object. * @param {Object} object Object.
* @protected * @protected
* @return {ol.proj.Projection} Projection. * @return {module:ol/proj/Projection~Projection} Projection.
*/ */
JSONFeature.prototype.readProjectionFromObject = function(object) {}; JSONFeature.prototype.readProjectionFromObject = function(object) {};
@@ -130,7 +130,7 @@ JSONFeature.prototype.writeFeature = function(feature, opt_options) {
/** /**
* @abstract * @abstract
* @param {ol.Feature} feature Feature. * @param {module:ol/Feature~Feature} feature Feature.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {Object} Object. * @return {Object} Object.
*/ */
@@ -147,7 +147,7 @@ JSONFeature.prototype.writeFeatures = function(features, opt_options) {
/** /**
* @abstract * @abstract
* @param {Array.<ol.Feature>} features Features. * @param {Array.<module:ol/Feature~Feature>} features Features.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {Object} Object. * @return {Object} Object.
*/ */
@@ -164,7 +164,7 @@ JSONFeature.prototype.writeGeometry = function(geometry, opt_options) {
/** /**
* @abstract * @abstract
* @param {ol.geom.Geometry} geometry Geometry. * @param {module:ol/geom/Geometry~Geometry} geometry Geometry.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {Object} Object. * @return {Object} Object.
*/ */
+32 -32
View File
@@ -405,7 +405,7 @@ function createFeatureStyleFunction(style, styleUrl, defaultStyle, sharedStyles,
return ( return (
/** /**
* @param {ol.Feature} feature feature. * @param {module:ol/Feature~Feature} feature feature.
* @param {number} resolution Resolution. * @param {number} resolution Resolution.
* @return {Array.<ol.style.Style>} Style. * @return {Array.<ol.style.Style>} Style.
*/ */
@@ -890,7 +890,7 @@ const GX_MULTITRACK_GEOMETRY_PARSERS = makeStructureNS(
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack. * @param {Array.<*>} objectStack Object stack.
* @return {ol.geom.MultiLineString|undefined} MultiLineString. * @return {module:ol/geom/MultiLineString~MultiLineString|undefined} MultiLineString.
*/ */
function readGxMultiTrack(node, objectStack) { function readGxMultiTrack(node, objectStack) {
const lineStrings = pushParseAndPop([], const lineStrings = pushParseAndPop([],
@@ -920,7 +920,7 @@ const GX_TRACK_PARSERS = makeStructureNS(
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack. * @param {Array.<*>} objectStack Object stack.
* @return {ol.geom.LineString|undefined} LineString. * @return {module:ol/geom/LineString~LineString|undefined} LineString.
*/ */
function readGxTrack(node, objectStack) { function readGxTrack(node, objectStack) {
const gxTrackObject = pushParseAndPop( const gxTrackObject = pushParseAndPop(
@@ -1010,7 +1010,7 @@ const EXTRUDE_AND_ALTITUDE_MODE_PARSERS = makeStructureNS(
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack. * @param {Array.<*>} objectStack Object stack.
* @return {ol.geom.LineString|undefined} LineString. * @return {module:ol/geom/LineString~LineString|undefined} LineString.
*/ */
function readLineString(node, objectStack) { function readLineString(node, objectStack) {
const properties = pushParseAndPop({}, const properties = pushParseAndPop({},
@@ -1032,7 +1032,7 @@ function readLineString(node, objectStack) {
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack. * @param {Array.<*>} objectStack Object stack.
* @return {ol.geom.Polygon|undefined} Polygon. * @return {module:ol/geom/Polygon~Polygon|undefined} Polygon.
*/ */
function readLinearRing(node, objectStack) { function readLinearRing(node, objectStack) {
const properties = pushParseAndPop({}, const properties = pushParseAndPop({},
@@ -1069,7 +1069,7 @@ const MULTI_GEOMETRY_PARSERS = makeStructureNS(
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack. * @param {Array.<*>} objectStack Object stack.
* @return {ol.geom.Geometry} Geometry. * @return {module:ol/geom/Geometry~Geometry} Geometry.
*/ */
function readMultiGeometry(node, objectStack) { function readMultiGeometry(node, objectStack) {
const geometries = pushParseAndPop([], const geometries = pushParseAndPop([],
@@ -1080,7 +1080,7 @@ function readMultiGeometry(node, objectStack) {
if (geometries.length === 0) { if (geometries.length === 0) {
return new GeometryCollection(geometries); return new GeometryCollection(geometries);
} }
/** @type {ol.geom.Geometry} */ /** @type {module:ol/geom/Geometry~Geometry} */
let multiGeometry; let multiGeometry;
let homogeneous = true; let homogeneous = true;
const type = geometries[0].getType(); const type = geometries[0].getType();
@@ -1122,14 +1122,14 @@ function readMultiGeometry(node, objectStack) {
} else { } else {
multiGeometry = new GeometryCollection(geometries); multiGeometry = new GeometryCollection(geometries);
} }
return /** @type {ol.geom.Geometry} */ (multiGeometry); return /** @type {module:ol/geom/Geometry~Geometry} */ (multiGeometry);
} }
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack. * @param {Array.<*>} objectStack Object stack.
* @return {ol.geom.Point|undefined} Point. * @return {module:ol/geom/Point~Point|undefined} Point.
*/ */
function readPoint(node, objectStack) { function readPoint(node, objectStack) {
const properties = pushParseAndPop({}, const properties = pushParseAndPop({},
@@ -1162,7 +1162,7 @@ const FLAT_LINEAR_RINGS_PARSERS = makeStructureNS(
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack. * @param {Array.<*>} objectStack Object stack.
* @return {ol.geom.Polygon|undefined} Polygon. * @return {module:ol/geom/Polygon~Polygon|undefined} Polygon.
*/ */
function readPolygon(node, objectStack) { function readPolygon(node, objectStack) {
const properties = pushParseAndPop(/** @type {Object<string,*>} */ ({}), const properties = pushParseAndPop(/** @type {Object<string,*>} */ ({}),
@@ -1248,9 +1248,9 @@ function readStyle(node, objectStack) {
/** /**
* Reads an array of geometries and creates arrays for common geometry * Reads an array of geometries and creates arrays for common geometry
* properties. Then sets them to the multi geometry. * properties. Then sets them to the multi geometry.
* @param {ol.geom.MultiPoint|ol.geom.MultiLineString|ol.geom.MultiPolygon} * @param {module:ol/geom/MultiPoint~MultiPoint|module:ol/geom/MultiLineString~MultiLineString|module:ol/geom/MultiPolygon~MultiPolygon}
* multiGeometry A multi-geometry. * multiGeometry A multi-geometry.
* @param {Array.<ol.geom.Geometry>} geometries List of geometries. * @param {Array.<module:ol/geom/Geometry~Geometry>} geometries List of geometries.
*/ */
function setCommonGeometryProperties(multiGeometry, geometries) { function setCommonGeometryProperties(multiGeometry, geometries) {
const ii = geometries.length; const ii = geometries.length;
@@ -1652,7 +1652,7 @@ const PLACEMARK_PARSERS = makeStructureNS(
* @param {Node} node Node. * @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack. * @param {Array.<*>} objectStack Object stack.
* @private * @private
* @return {Array.<ol.Feature>|undefined} Features. * @return {Array.<module:ol/Feature~Feature>|undefined} Features.
*/ */
KML.prototype.readDocumentOrFolder_ = function(node, objectStack) { KML.prototype.readDocumentOrFolder_ = function(node, objectStack) {
// FIXME use scope somehow // FIXME use scope somehow
@@ -1664,7 +1664,7 @@ KML.prototype.readDocumentOrFolder_ = function(node, objectStack) {
'Style': this.readSharedStyle_.bind(this), 'Style': this.readSharedStyle_.bind(this),
'StyleMap': this.readSharedStyleMap_.bind(this) 'StyleMap': this.readSharedStyleMap_.bind(this)
}); });
/** @type {Array.<ol.Feature>} */ /** @type {Array.<module:ol/Feature~Feature>} */
const features = pushParseAndPop([], parsersNS, node, objectStack, this); const features = pushParseAndPop([], parsersNS, node, objectStack, this);
if (features) { if (features) {
return features; return features;
@@ -1678,7 +1678,7 @@ KML.prototype.readDocumentOrFolder_ = function(node, objectStack) {
* @param {Node} node Node. * @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack. * @param {Array.<*>} objectStack Object stack.
* @private * @private
* @return {ol.Feature|undefined} Feature. * @return {module:ol/Feature~Feature|undefined} Feature.
*/ */
KML.prototype.readPlacemark_ = function(node, objectStack) { KML.prototype.readPlacemark_ = function(node, objectStack) {
const object = pushParseAndPop({'geometry': null}, const object = pushParseAndPop({'geometry': null},
@@ -1782,7 +1782,7 @@ KML.prototype.readSharedStyleMap_ = function(node, objectStack) {
* @function * @function
* @param {Document|Node|Object|string} source Source. * @param {Document|Node|Object|string} source Source.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options. * @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @return {ol.Feature} Feature. * @return {module:ol/Feature~Feature} Feature.
* @api * @api
*/ */
KML.prototype.readFeature; KML.prototype.readFeature;
@@ -1813,7 +1813,7 @@ KML.prototype.readFeatureFromNode = function(node, opt_options) {
* @function * @function
* @param {Document|Node|Object|string} source Source. * @param {Document|Node|Object|string} source Source.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options. * @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @return {Array.<ol.Feature>} Features. * @return {Array.<module:ol/Feature~Feature>} Features.
* @api * @api
*/ */
KML.prototype.readFeatures; KML.prototype.readFeatures;
@@ -2061,7 +2061,7 @@ KML.prototype.readRegionFromNode = function(node) {
* *
* @function * @function
* @param {Document|Node|Object|string} source Source. * @param {Document|Node|Object|string} source Source.
* @return {ol.proj.Projection} Projection. * @return {module:ol/proj/Projection~Projection} Projection.
* @api * @api
*/ */
KML.prototype.readProjection; KML.prototype.readProjection;
@@ -2205,7 +2205,7 @@ const DOCUMENT_NODE_FACTORY = function(value, objectStack, opt_nodeName) {
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {Array.<ol.Feature>} features Features. * @param {Array.<module:ol/Feature~Feature>} features Features.
* @param {Array.<*>} objectStack Object stack. * @param {Array.<*>} objectStack Object stack.
* @this {ol.format.KML} * @this {ol.format.KML}
*/ */
@@ -2499,7 +2499,7 @@ const GEOMETRY_NODE_FACTORY = function(value, objectStack, opt_nodeName) {
if (value) { if (value) {
const parentNode = objectStack[objectStack.length - 1].node; const parentNode = objectStack[objectStack.length - 1].node;
return createElementNS(parentNode.namespaceURI, return createElementNS(parentNode.namespaceURI,
GEOMETRY_TYPE_TO_NODENAME[/** @type {ol.geom.Geometry} */ (value).getType()]); GEOMETRY_TYPE_TO_NODENAME[/** @type {module:ol/geom/Geometry~Geometry} */ (value).getType()]);
} }
}; };
@@ -2554,30 +2554,30 @@ const MULTI_GEOMETRY_SERIALIZERS = makeStructureNS(
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {ol.geom.Geometry} geometry Geometry. * @param {module:ol/geom/Geometry~Geometry} geometry Geometry.
* @param {Array.<*>} objectStack Object stack. * @param {Array.<*>} objectStack Object stack.
*/ */
function writeMultiGeometry(node, geometry, objectStack) { function writeMultiGeometry(node, geometry, objectStack) {
/** @type {module:ol/xml~NodeStackItem} */ /** @type {module:ol/xml~NodeStackItem} */
const context = {node: node}; const context = {node: node};
const type = geometry.getType(); const type = geometry.getType();
/** @type {Array.<ol.geom.Geometry>} */ /** @type {Array.<module:ol/geom/Geometry~Geometry>} */
let geometries; let geometries;
/** @type {function(*, Array.<*>, string=): (Node|undefined)} */ /** @type {function(*, Array.<*>, string=): (Node|undefined)} */
let factory; let factory;
if (type == GeometryType.GEOMETRY_COLLECTION) { if (type == GeometryType.GEOMETRY_COLLECTION) {
geometries = /** @type {ol.geom.GeometryCollection} */ (geometry).getGeometries(); geometries = /** @type {module:ol/geom/GeometryCollection~GeometryCollection} */ (geometry).getGeometries();
factory = GEOMETRY_NODE_FACTORY; factory = GEOMETRY_NODE_FACTORY;
} else if (type == GeometryType.MULTI_POINT) { } else if (type == GeometryType.MULTI_POINT) {
geometries = /** @type {ol.geom.MultiPoint} */ (geometry).getPoints(); geometries = /** @type {module:ol/geom/MultiPoint~MultiPoint} */ (geometry).getPoints();
factory = POINT_NODE_FACTORY; factory = POINT_NODE_FACTORY;
} else if (type == GeometryType.MULTI_LINE_STRING) { } else if (type == GeometryType.MULTI_LINE_STRING) {
geometries = geometries =
(/** @type {ol.geom.MultiLineString} */ (geometry)).getLineStrings(); (/** @type {module:ol/geom/MultiLineString~MultiLineString} */ (geometry)).getLineStrings();
factory = LINE_STRING_NODE_FACTORY; factory = LINE_STRING_NODE_FACTORY;
} else if (type == GeometryType.MULTI_POLYGON) { } else if (type == GeometryType.MULTI_POLYGON) {
geometries = geometries =
(/** @type {ol.geom.MultiPolygon} */ (geometry)).getPolygons(); (/** @type {module:ol/geom/MultiPolygon~MultiPolygon} */ (geometry)).getPolygons();
factory = POLYGON_NODE_FACTORY; factory = POLYGON_NODE_FACTORY;
} else { } else {
assert(false, 39); // Unknown geometry type assert(false, 39); // Unknown geometry type
@@ -2601,7 +2601,7 @@ const BOUNDARY_IS_SERIALIZERS = makeStructureNS(
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {ol.geom.LinearRing} linearRing Linear ring. * @param {module:ol/geom/LinearRing~LinearRing} linearRing Linear ring.
* @param {Array.<*>} objectStack Object stack. * @param {Array.<*>} objectStack Object stack.
*/ */
function writeBoundaryIs(node, linearRing, objectStack) { function writeBoundaryIs(node, linearRing, objectStack) {
@@ -2658,7 +2658,7 @@ const EXTENDEDDATA_NODE_FACTORY = makeSimpleNodeFactory('ExtendedData');
* FIXME currently we do serialize arbitrary/custom feature properties * FIXME currently we do serialize arbitrary/custom feature properties
* (ExtendedData). * (ExtendedData).
* @param {Node} node Node. * @param {Node} node Node.
* @param {ol.Feature} feature Feature. * @param {module:ol/Feature~Feature} feature Feature.
* @param {Array.<*>} objectStack Object stack. * @param {Array.<*>} objectStack Object stack.
* @this {ol.format.KML} * @this {ol.format.KML}
*/ */
@@ -2746,7 +2746,7 @@ const PRIMITIVE_GEOMETRY_SERIALIZERS = makeStructureNS(
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {ol.geom.SimpleGeometry} geometry Geometry. * @param {module:ol/geom/SimpleGeometry~SimpleGeometry} geometry Geometry.
* @param {Array.<*>} objectStack Object stack. * @param {Array.<*>} objectStack Object stack.
*/ */
function writePrimitiveGeometry(node, geometry, objectStack) { function writePrimitiveGeometry(node, geometry, objectStack) {
@@ -2798,7 +2798,7 @@ const OUTER_BOUNDARY_NODE_FACTORY = makeSimpleNodeFactory('outerBoundaryIs');
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {ol.geom.Polygon} polygon Polygon. * @param {module:ol/geom/Polygon~Polygon} polygon Polygon.
* @param {Array.<*>} objectStack Object stack. * @param {Array.<*>} objectStack Object stack.
*/ */
function writePolygon(node, polygon, objectStack) { function writePolygon(node, polygon, objectStack) {
@@ -2952,7 +2952,7 @@ const KML_SERIALIZERS = makeStructureNS(
* MultiLineStrings, and MultiPolygons are output as MultiGeometries. * MultiLineStrings, and MultiPolygons are output as MultiGeometries.
* *
* @function * @function
* @param {Array.<ol.Feature>} features Features. * @param {Array.<module:ol/Feature~Feature>} features Features.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Options. * @param {module:ol/format/Feature~WriteOptions=} opt_options Options.
* @return {string} Result. * @return {string} Result.
* @api * @api
@@ -2964,7 +2964,7 @@ KML.prototype.writeFeatures;
* Encode an array of features in the KML format as an XML node. GeometryCollections, * Encode an array of features in the KML format as an XML node. GeometryCollections,
* MultiPoints, MultiLineStrings, and MultiPolygons are output as MultiGeometries. * MultiPoints, MultiLineStrings, and MultiPolygons are output as MultiGeometries.
* *
* @param {Array.<ol.Feature>} features Features. * @param {Array.<module:ol/Feature~Feature>} features Features.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Options. * @param {module:ol/format/Feature~WriteOptions=} opt_options Options.
* @return {Node} Node. * @return {Node} Node.
* @override * @override
+9 -9
View File
@@ -24,9 +24,9 @@ import RenderFeature from '../render/Feature.js';
/** /**
* @typedef {Object} Options * @typedef {Object} Options
* @property {undefined|function((ol.geom.Geometry|Object.<string,*>)=)|function(ol.geom.GeometryType,Array.<number>,(Array.<number>|Array.<Array.<number>>),Object.<string,*>,number)} featureClass * @property {undefined|function((module:ol/geom/Geometry~Geometry|Object.<string,*>)=)|function(module:ol/geom/GeometryType~GeometryType,Array.<number>,(Array.<number>|Array.<Array.<number>>),Object.<string,*>,number)} featureClass
* Class for features returned by {@link ol.format.MVT#readFeatures}. Set to * Class for features returned by {@link ol.format.MVT#readFeatures}. Set to
* {@link ol.Feature} to get full editing and geometry support at the cost of * {@link module:ol/Feature~Feature} to get full editing and geometry support at the cost of
* decreased rendering performance. The default is {@link ol.render.Feature}, * decreased rendering performance. The default is {@link ol.render.Feature},
* which is optimized for rendering and hit detection. * which is optimized for rendering and hit detection.
* @property {string|undefined} geometryName Geometry name to use when creating * @property {string|undefined} geometryName Geometry name to use when creating
@@ -54,7 +54,7 @@ const MVT = function(opt_options) {
const options = opt_options ? opt_options : {}; const options = opt_options ? opt_options : {};
/** /**
* @type {ol.proj.Projection} * @type {module:ol/proj/Projection~Projection}
*/ */
this.defaultDataProjection = new Projection({ this.defaultDataProjection = new Projection({
code: '', code: '',
@@ -63,8 +63,8 @@ const MVT = function(opt_options) {
/** /**
* @private * @private
* @type {function((ol.geom.Geometry|Object.<string,*>)=)| * @type {function((module:ol/geom/Geometry~Geometry|Object.<string,*>)=)|
* function(ol.geom.GeometryType,Array.<number>, * function(module:ol/geom/GeometryType~GeometryType,Array.<number>,
* (Array.<number>|Array.<Array.<number>>),Object.<string,*>,number)} * (Array.<number>|Array.<Array.<number>>),Object.<string,*>,number)}
*/ */
this.featureClass_ = options.featureClass ? this.featureClass_ = options.featureClass ?
@@ -272,10 +272,10 @@ MVT.prototype.readRawGeometry_ = function(pbf, feature, flatCoordinates, ends) {
* @param {number} type The raw feature's geometry type * @param {number} type The raw feature's geometry type
* @param {number} numEnds Number of ends of the flat coordinates of the * @param {number} numEnds Number of ends of the flat coordinates of the
* geometry. * geometry.
* @return {ol.geom.GeometryType} The geometry type. * @return {module:ol/geom/GeometryType~GeometryType} The geometry type.
*/ */
function getGeometryType(type, numEnds) { function getGeometryType(type, numEnds) {
/** @type {ol.geom.GeometryType} */ /** @type {module:ol/geom/GeometryType~GeometryType} */
let geometryType; let geometryType;
if (type === 1) { if (type === 1) {
geometryType = numEnds === 1 ? geometryType = numEnds === 1 ?
@@ -297,7 +297,7 @@ function getGeometryType(type, numEnds) {
* @param {ol.ext.PBF} pbf PBF * @param {ol.ext.PBF} pbf PBF
* @param {Object} rawFeature Raw Mapbox feature. * @param {Object} rawFeature Raw Mapbox feature.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options. * @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @return {ol.Feature|ol.render.Feature} Feature. * @return {module:ol/Feature~Feature|ol.render.Feature} Feature.
*/ */
MVT.prototype.createFeature_ = function(pbf, rawFeature, opt_options) { MVT.prototype.createFeature_ = function(pbf, rawFeature, opt_options) {
const type = rawFeature.type; const type = rawFeature.type;
@@ -387,7 +387,7 @@ MVT.prototype.readFeatures = function(source, opt_options) {
const pbf = new PBF(/** @type {ArrayBuffer} */ (source)); const pbf = new PBF(/** @type {ArrayBuffer} */ (source));
const pbfLayers = pbf.readFields(layersPBFReader, {}); const pbfLayers = pbf.readFields(layersPBFReader, {});
/** @type {Array.<ol.Feature|ol.render.Feature>} */ /** @type {Array.<module:ol/Feature~Feature|ol.render.Feature>} */
const features = []; const features = [];
for (const name in pbfLayers) { for (const name in pbfLayers) {
if (layers && layers.indexOf(name) == -1) { if (layers && layers.indexOf(name) == -1) {
+2 -2
View File
@@ -146,7 +146,7 @@ function readTag(node, objectStack) {
* @function * @function
* @param {Document|Node|Object|string} source Source. * @param {Document|Node|Object|string} source Source.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options. * @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @return {Array.<ol.Feature>} Features. * @return {Array.<module:ol/Feature~Feature>} Features.
* @api * @api
*/ */
OSMXML.prototype.readFeatures; OSMXML.prototype.readFeatures;
@@ -201,7 +201,7 @@ OSMXML.prototype.readFeaturesFromNode = function(node, opt_options) {
* *
* @function * @function
* @param {Document|Node|Object|string} source Source. * @param {Document|Node|Object|string} source Source.
* @return {ol.proj.Projection} Projection. * @return {module:ol/proj/Projection~Projection} Projection.
* @api * @api
*/ */
OSMXML.prototype.readProjection; OSMXML.prototype.readProjection;
+10 -10
View File
@@ -18,8 +18,8 @@ import {get as getProjection} from '../proj.js';
* @typedef {Object} Options * @typedef {Object} Options
* @property {number|undefined} factor The factor by which the coordinates * @property {number|undefined} factor The factor by which the coordinates
* values will be scaled. Default is `1e5`. * values will be scaled. Default is `1e5`.
* @property {ol.geom.GeometryLayout|undefined} geometryLayout Layout of the * @property {module:ol/geom/GeometryLayout~GeometryLayout|undefined} geometryLayout Layout of the
* feature geometries created by the format reader. Default is `ol.geom.GeometryLayout.XY`. * feature geometries created by the format reader. Default is `module:ol/geom/GeometryLayout~GeometryLayout.XY`.
*/ */
@@ -52,7 +52,7 @@ const Polyline = function(opt_options) {
/** /**
* @private * @private
* @type {ol.geom.GeometryLayout} * @type {module:ol/geom/GeometryLayout~GeometryLayout}
*/ */
this.geometryLayout_ = options.geometryLayout ? this.geometryLayout_ = options.geometryLayout ?
options.geometryLayout : GeometryLayout.XY; options.geometryLayout : GeometryLayout.XY;
@@ -272,7 +272,7 @@ export function encodeUnsignedInteger(num) {
* @function * @function
* @param {Document|Node|Object|string} source Source. * @param {Document|Node|Object|string} source Source.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options. * @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @return {ol.Feature} Feature. * @return {module:ol/Feature~Feature} Feature.
* @api * @api
*/ */
Polyline.prototype.readFeature; Polyline.prototype.readFeature;
@@ -294,7 +294,7 @@ Polyline.prototype.readFeatureFromText = function(text, opt_options) {
* @function * @function
* @param {Document|Node|Object|string} source Source. * @param {Document|Node|Object|string} source Source.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options. * @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @return {Array.<ol.Feature>} Features. * @return {Array.<module:ol/Feature~Feature>} Features.
* @api * @api
*/ */
Polyline.prototype.readFeatures; Polyline.prototype.readFeatures;
@@ -315,7 +315,7 @@ Polyline.prototype.readFeaturesFromText = function(text, opt_options) {
* @function * @function
* @param {Document|Node|Object|string} source Source. * @param {Document|Node|Object|string} source Source.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options. * @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @return {ol.geom.Geometry} Geometry. * @return {module:ol/geom/Geometry~Geometry} Geometry.
* @api * @api
*/ */
Polyline.prototype.readGeometry; Polyline.prototype.readGeometry;
@@ -330,7 +330,7 @@ Polyline.prototype.readGeometryFromText = function(text, opt_options) {
flipXY(flatCoordinates, 0, flatCoordinates.length, stride, flatCoordinates); flipXY(flatCoordinates, 0, flatCoordinates.length, stride, flatCoordinates);
const coordinates = inflateCoordinates(flatCoordinates, 0, flatCoordinates.length, stride); const coordinates = inflateCoordinates(flatCoordinates, 0, flatCoordinates.length, stride);
return /** @type {ol.geom.Geometry} */ (transformWithOptions( return /** @type {module:ol/geom/Geometry~Geometry} */ (transformWithOptions(
new LineString(coordinates, this.geometryLayout_), false, new LineString(coordinates, this.geometryLayout_), false,
this.adaptOptions(opt_options)) this.adaptOptions(opt_options))
); );
@@ -342,7 +342,7 @@ Polyline.prototype.readGeometryFromText = function(text, opt_options) {
* *
* @function * @function
* @param {Document|Node|Object|string} source Source. * @param {Document|Node|Object|string} source Source.
* @return {ol.proj.Projection} Projection. * @return {module:ol/proj/Projection~Projection} Projection.
* @api * @api
*/ */
Polyline.prototype.readProjection; Polyline.prototype.readProjection;
@@ -374,7 +374,7 @@ Polyline.prototype.writeFeaturesText = function(features, opt_options) {
* Write a single geometry in Polyline format. * Write a single geometry in Polyline format.
* *
* @function * @function
* @param {ol.geom.Geometry} geometry Geometry. * @param {module:ol/geom/Geometry~Geometry} geometry Geometry.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {string} Geometry. * @return {string} Geometry.
* @api * @api
@@ -386,7 +386,7 @@ Polyline.prototype.writeGeometry;
* @inheritDoc * @inheritDoc
*/ */
Polyline.prototype.writeGeometryText = function(geometry, opt_options) { Polyline.prototype.writeGeometryText = function(geometry, opt_options) {
geometry = /** @type {ol.geom.LineString} */ geometry = /** @type {module:ol/geom/LineString~LineString} */
(transformWithOptions(geometry, true, this.adaptOptions(opt_options))); (transformWithOptions(geometry, true, this.adaptOptions(opt_options)));
const flatCoordinates = geometry.getFlatCoordinates(); const flatCoordinates = geometry.getFlatCoordinates();
const stride = geometry.getStride(); const stride = geometry.getStride();
+7 -7
View File
@@ -56,7 +56,7 @@ TextFeature.prototype.readFeature = function(source, opt_options) {
* @param {string} text Text. * @param {string} text Text.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options. * @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @protected * @protected
* @return {ol.Feature} Feature. * @return {module:ol/Feature~Feature} Feature.
*/ */
TextFeature.prototype.readFeatureFromText = function(text, opt_options) {}; TextFeature.prototype.readFeatureFromText = function(text, opt_options) {};
@@ -74,7 +74,7 @@ TextFeature.prototype.readFeatures = function(source, opt_options) {
* @param {string} text Text. * @param {string} text Text.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options. * @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @protected * @protected
* @return {Array.<ol.Feature>} Features. * @return {Array.<module:ol/Feature~Feature>} Features.
*/ */
TextFeature.prototype.readFeaturesFromText = function(text, opt_options) {}; TextFeature.prototype.readFeaturesFromText = function(text, opt_options) {};
@@ -92,7 +92,7 @@ TextFeature.prototype.readGeometry = function(source, opt_options) {
* @param {string} text Text. * @param {string} text Text.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options. * @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @protected * @protected
* @return {ol.geom.Geometry} Geometry. * @return {module:ol/geom/Geometry~Geometry} Geometry.
*/ */
TextFeature.prototype.readGeometryFromText = function(text, opt_options) {}; TextFeature.prototype.readGeometryFromText = function(text, opt_options) {};
@@ -108,7 +108,7 @@ TextFeature.prototype.readProjection = function(source) {
/** /**
* @param {string} text Text. * @param {string} text Text.
* @protected * @protected
* @return {ol.proj.Projection} Projection. * @return {module:ol/proj/Projection~Projection} Projection.
*/ */
TextFeature.prototype.readProjectionFromText = function(text) { TextFeature.prototype.readProjectionFromText = function(text) {
return this.defaultDataProjection; return this.defaultDataProjection;
@@ -125,7 +125,7 @@ TextFeature.prototype.writeFeature = function(feature, opt_options) {
/** /**
* @abstract * @abstract
* @param {ol.Feature} feature Features. * @param {module:ol/Feature~Feature} feature Features.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @protected * @protected
* @return {string} Text. * @return {string} Text.
@@ -143,7 +143,7 @@ TextFeature.prototype.writeFeatures = function(features, opt_options) {
/** /**
* @abstract * @abstract
* @param {Array.<ol.Feature>} features Features. * @param {Array.<module:ol/Feature~Feature>} features Features.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @protected * @protected
* @return {string} Text. * @return {string} Text.
@@ -161,7 +161,7 @@ TextFeature.prototype.writeGeometry = function(geometry, opt_options) {
/** /**
* @abstract * @abstract
* @param {ol.geom.Geometry} geometry Geometry. * @param {module:ol/geom/Geometry~Geometry} geometry Geometry.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @protected * @protected
* @return {string} Text. * @return {string} Text.
+13 -13
View File
@@ -81,7 +81,7 @@ inherits(TopoJSON, JSONFeature);
/** /**
* @const * @const
* @type {Object.<string, function(TopoJSONGeometry, Array, ...Array): ol.geom.Geometry>} * @type {Object.<string, function(TopoJSONGeometry, Array, ...Array): module:ol/geom/Geometry~Geometry>}
*/ */
const GEOMETRY_READERS = { const GEOMETRY_READERS = {
'Point': readPointGeometry, 'Point': readPointGeometry,
@@ -134,7 +134,7 @@ function concatenateArcs(indices, arcs) {
* @param {TopoJSONGeometry} object TopoJSON object. * @param {TopoJSONGeometry} object TopoJSON object.
* @param {Array.<number>} scale Scale for each dimension. * @param {Array.<number>} scale Scale for each dimension.
* @param {Array.<number>} translate Translation for each dimension. * @param {Array.<number>} translate Translation for each dimension.
* @return {ol.geom.Point} Geometry. * @return {module:ol/geom/Point~Point} Geometry.
*/ */
function readPointGeometry(object, scale, translate) { function readPointGeometry(object, scale, translate) {
const coordinates = object.coordinates; const coordinates = object.coordinates;
@@ -151,7 +151,7 @@ function readPointGeometry(object, scale, translate) {
* @param {TopoJSONGeometry} object TopoJSON object. * @param {TopoJSONGeometry} object TopoJSON object.
* @param {Array.<number>} scale Scale for each dimension. * @param {Array.<number>} scale Scale for each dimension.
* @param {Array.<number>} translate Translation for each dimension. * @param {Array.<number>} translate Translation for each dimension.
* @return {ol.geom.MultiPoint} Geometry. * @return {module:ol/geom/MultiPoint~MultiPoint} Geometry.
*/ */
function readMultiPointGeometry(object, scale, translate) { function readMultiPointGeometry(object, scale, translate) {
const coordinates = object.coordinates; const coordinates = object.coordinates;
@@ -169,7 +169,7 @@ function readMultiPointGeometry(object, scale, translate) {
* *
* @param {TopoJSONGeometry} object TopoJSON object. * @param {TopoJSONGeometry} object TopoJSON object.
* @param {Array.<Array.<module:ol/coordinate~Coordinate>>} arcs Array of arcs. * @param {Array.<Array.<module:ol/coordinate~Coordinate>>} arcs Array of arcs.
* @return {ol.geom.LineString} Geometry. * @return {module:ol/geom/LineString~LineString} Geometry.
*/ */
function readLineStringGeometry(object, arcs) { function readLineStringGeometry(object, arcs) {
const coordinates = concatenateArcs(object.arcs, arcs); const coordinates = concatenateArcs(object.arcs, arcs);
@@ -182,7 +182,7 @@ function readLineStringGeometry(object, arcs) {
* *
* @param {TopoJSONGeometry} object TopoJSON object. * @param {TopoJSONGeometry} object TopoJSON object.
* @param {Array.<Array.<module:ol/coordinate~Coordinate>>} arcs Array of arcs. * @param {Array.<Array.<module:ol/coordinate~Coordinate>>} arcs Array of arcs.
* @return {ol.geom.MultiLineString} Geometry. * @return {module:ol/geom/MultiLineString~MultiLineString} Geometry.
*/ */
function readMultiLineStringGeometry(object, arcs) { function readMultiLineStringGeometry(object, arcs) {
const coordinates = []; const coordinates = [];
@@ -198,7 +198,7 @@ function readMultiLineStringGeometry(object, arcs) {
* *
* @param {TopoJSONGeometry} object TopoJSON object. * @param {TopoJSONGeometry} object TopoJSON object.
* @param {Array.<Array.<module:ol/coordinate~Coordinate>>} arcs Array of arcs. * @param {Array.<Array.<module:ol/coordinate~Coordinate>>} arcs Array of arcs.
* @return {ol.geom.Polygon} Geometry. * @return {module:ol/geom/Polygon~Polygon} Geometry.
*/ */
function readPolygonGeometry(object, arcs) { function readPolygonGeometry(object, arcs) {
const coordinates = []; const coordinates = [];
@@ -214,7 +214,7 @@ function readPolygonGeometry(object, arcs) {
* *
* @param {TopoJSONGeometry} object TopoJSON object. * @param {TopoJSONGeometry} object TopoJSON object.
* @param {Array.<Array.<module:ol/coordinate~Coordinate>>} arcs Array of arcs. * @param {Array.<Array.<module:ol/coordinate~Coordinate>>} arcs Array of arcs.
* @return {ol.geom.MultiPolygon} Geometry. * @return {module:ol/geom/MultiPolygon~MultiPolygon} Geometry.
*/ */
function readMultiPolygonGeometry(object, arcs) { function readMultiPolygonGeometry(object, arcs) {
const coordinates = []; const coordinates = [];
@@ -244,7 +244,7 @@ function readMultiPolygonGeometry(object, arcs) {
* object to. * object to.
* @param {string} name Name of the `Topology`'s child object. * @param {string} name Name of the `Topology`'s child object.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options. * @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @return {Array.<ol.Feature>} Array of features. * @return {Array.<module:ol/Feature~Feature>} Array of features.
*/ */
function readFeaturesFromGeometryCollection(collection, arcs, scale, translate, property, name, opt_options) { function readFeaturesFromGeometryCollection(collection, arcs, scale, translate, property, name, opt_options) {
const geometries = collection.geometries; const geometries = collection.geometries;
@@ -268,7 +268,7 @@ function readFeaturesFromGeometryCollection(collection, arcs, scale, translate,
* object to. * object to.
* @param {string} name Name of the `Topology`'s child object. * @param {string} name Name of the `Topology`'s child object.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options. * @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @return {ol.Feature} Feature. * @return {module:ol/Feature~Feature} Feature.
*/ */
function readFeatureFromGeometry(object, arcs, scale, translate, property, name, opt_options) { function readFeatureFromGeometry(object, arcs, scale, translate, property, name, opt_options) {
let geometry; let geometry;
@@ -280,7 +280,7 @@ function readFeatureFromGeometry(object, arcs, scale, translate, property, name,
geometry = geometryReader(object, arcs); geometry = geometryReader(object, arcs);
} }
const feature = new Feature(); const feature = new Feature();
feature.setGeometry(/** @type {ol.geom.Geometry} */ ( feature.setGeometry(/** @type {module:ol/geom/Geometry~Geometry} */ (
transformWithOptions(geometry, false, opt_options))); transformWithOptions(geometry, false, opt_options)));
if (object.id !== undefined) { if (object.id !== undefined) {
feature.setId(object.id); feature.setId(object.id);
@@ -304,7 +304,7 @@ function readFeatureFromGeometry(object, arcs, scale, translate, property, name,
* *
* @function * @function
* @param {Document|Node|Object|string} source Source. * @param {Document|Node|Object|string} source Source.
* @return {Array.<ol.Feature>} Features. * @return {Array.<module:ol/Feature~Feature>} Features.
* @api * @api
*/ */
TopoJSON.prototype.readFeatures; TopoJSON.prototype.readFeatures;
@@ -326,7 +326,7 @@ TopoJSON.prototype.readFeaturesFromObject = function(object, opt_options) {
if (transform) { if (transform) {
transformArcs(arcs, scale, translate); transformArcs(arcs, scale, translate);
} }
/** @type {Array.<ol.Feature>} */ /** @type {Array.<module:ol/Feature~Feature>} */
const features = []; const features = [];
const topoJSONFeatures = topoJSONTopology.objects; const topoJSONFeatures = topoJSONTopology.objects;
const property = this.layerName_; const property = this.layerName_;
@@ -406,7 +406,7 @@ function transformVertex(vertex, scale, translate) {
* Read the projection from a TopoJSON source. * Read the projection from a TopoJSON source.
* *
* @param {Document|Node|Object|string} object Source. * @param {Document|Node|Object|string} object Source.
* @return {ol.proj.Projection} Projection. * @return {module:ol/proj/Projection~Projection} Projection.
* @override * @override
* @api * @api
*/ */
+8 -8
View File
@@ -188,7 +188,7 @@ WFS.prototype.setFeatureType = function(featureType) {
* @function * @function
* @param {Document|Node|Object|string} source Source. * @param {Document|Node|Object|string} source Source.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options. * @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @return {Array.<ol.Feature>} Features. * @return {Array.<module:ol/Feature~Feature>} Features.
* @api * @api
*/ */
WFS.prototype.readFeatures; WFS.prototype.readFeatures;
@@ -425,7 +425,7 @@ const QUERY_SERIALIZERS = {
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {ol.Feature} feature Feature. * @param {module:ol/Feature~Feature} feature Feature.
* @param {Array.<*>} objectStack Node stack. * @param {Array.<*>} objectStack Node stack.
*/ */
function writeFeature(node, feature, objectStack) { function writeFeature(node, feature, objectStack) {
@@ -476,7 +476,7 @@ function getTypeName(featurePrefix, featureType) {
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {ol.Feature} feature Feature. * @param {module:ol/Feature~Feature} feature Feature.
* @param {Array.<*>} objectStack Node stack. * @param {Array.<*>} objectStack Node stack.
*/ */
function writeDelete(node, feature, objectStack) { function writeDelete(node, feature, objectStack) {
@@ -511,7 +511,7 @@ const TRANSACTION_SERIALIZERS = {
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {ol.Feature} feature Feature. * @param {module:ol/Feature~Feature} feature Feature.
* @param {Array.<*>} objectStack Node stack. * @param {Array.<*>} objectStack Node stack.
*/ */
function writeUpdate(node, feature, objectStack) { function writeUpdate(node, feature, objectStack) {
@@ -997,9 +997,9 @@ WFS.prototype.writeGetFeature = function(options) {
/** /**
* Encode format as WFS `Transaction` and return the Node. * Encode format as WFS `Transaction` and return the Node.
* *
* @param {Array.<ol.Feature>} inserts The features to insert. * @param {Array.<module:ol/Feature~Feature>} inserts The features to insert.
* @param {Array.<ol.Feature>} updates The features to update. * @param {Array.<module:ol/Feature~Feature>} updates The features to update.
* @param {Array.<ol.Feature>} deletes The features to delete. * @param {Array.<module:ol/Feature~Feature>} deletes The features to delete.
* @param {module:ol/format/WFS~WriteTransactionOptions} options Write options. * @param {module:ol/format/WFS~WriteTransactionOptions} options Write options.
* @return {Node} Result. * @return {Node} Result.
* @api * @api
@@ -1069,7 +1069,7 @@ WFS.prototype.writeTransaction = function(inserts, updates, deletes, options) {
* *
* @function * @function
* @param {Document|Node|Object|string} source Source. * @param {Document|Node|Object|string} source Source.
* @return {?ol.proj.Projection} Projection. * @return {?module:ol/proj/Projection~Projection} Projection.
* @api * @api
*/ */
WFS.prototype.readProjection; WFS.prototype.readProjection;
+26 -26
View File
@@ -223,7 +223,7 @@ const Parser = function(lexer) {
this.token_; this.token_;
/** /**
* @type {ol.geom.GeometryLayout} * @type {module:ol/geom/GeometryLayout~GeometryLayout}
* @private * @private
*/ */
this.layout_ = GeometryLayout.XY; this.layout_ = GeometryLayout.XY;
@@ -265,7 +265,7 @@ Parser.prototype.match = function(type) {
/** /**
* Try to parse the tokens provided by the lexer. * Try to parse the tokens provided by the lexer.
* @return {ol.geom.Geometry} The geometry. * @return {module:ol/geom/Geometry~Geometry} The geometry.
*/ */
Parser.prototype.parse = function() { Parser.prototype.parse = function() {
this.consume_(); this.consume_();
@@ -276,7 +276,7 @@ Parser.prototype.parse = function() {
/** /**
* Try to parse the dimensional info. * Try to parse the dimensional info.
* @return {ol.geom.GeometryLayout} The layout. * @return {module:ol/geom/GeometryLayout~GeometryLayout} The layout.
* @private * @private
*/ */
Parser.prototype.parseGeometryLayout_ = function() { Parser.prototype.parseGeometryLayout_ = function() {
@@ -300,7 +300,7 @@ Parser.prototype.parseGeometryLayout_ = function() {
/** /**
* @return {!Array.<ol.geom.Geometry>} A collection of geometries. * @return {!Array.<module:ol/geom/Geometry~Geometry>} A collection of geometries.
* @private * @private
*/ */
Parser.prototype.parseGeometryCollectionText_ = function() { Parser.prototype.parseGeometryCollectionText_ = function() {
@@ -556,7 +556,7 @@ inherits(WKT, TextFeature);
/** /**
* @param {ol.geom.Point} geom Point geometry. * @param {module:ol/geom/Point~Point} geom Point geometry.
* @return {string} Coordinates part of Point as WKT. * @return {string} Coordinates part of Point as WKT.
*/ */
function encodePointGeometry(geom) { function encodePointGeometry(geom) {
@@ -569,7 +569,7 @@ function encodePointGeometry(geom) {
/** /**
* @param {ol.geom.MultiPoint} geom MultiPoint geometry. * @param {module:ol/geom/MultiPoint~MultiPoint} geom MultiPoint geometry.
* @return {string} Coordinates part of MultiPoint as WKT. * @return {string} Coordinates part of MultiPoint as WKT.
*/ */
function encodeMultiPointGeometry(geom) { function encodeMultiPointGeometry(geom) {
@@ -583,7 +583,7 @@ function encodeMultiPointGeometry(geom) {
/** /**
* @param {ol.geom.GeometryCollection} geom GeometryCollection geometry. * @param {module:ol/geom/GeometryCollection~GeometryCollection} geom GeometryCollection geometry.
* @return {string} Coordinates part of GeometryCollection as WKT. * @return {string} Coordinates part of GeometryCollection as WKT.
*/ */
function encodeGeometryCollectionGeometry(geom) { function encodeGeometryCollectionGeometry(geom) {
@@ -597,7 +597,7 @@ function encodeGeometryCollectionGeometry(geom) {
/** /**
* @param {ol.geom.LineString|ol.geom.LinearRing} geom LineString geometry. * @param {module:ol/geom/LineString~LineString|module:ol/geom/LinearRing~LinearRing} geom LineString geometry.
* @return {string} Coordinates part of LineString as WKT. * @return {string} Coordinates part of LineString as WKT.
*/ */
function encodeLineStringGeometry(geom) { function encodeLineStringGeometry(geom) {
@@ -611,7 +611,7 @@ function encodeLineStringGeometry(geom) {
/** /**
* @param {ol.geom.MultiLineString} geom MultiLineString geometry. * @param {module:ol/geom/MultiLineString~MultiLineString} geom MultiLineString geometry.
* @return {string} Coordinates part of MultiLineString as WKT. * @return {string} Coordinates part of MultiLineString as WKT.
*/ */
function encodeMultiLineStringGeometry(geom) { function encodeMultiLineStringGeometry(geom) {
@@ -625,7 +625,7 @@ function encodeMultiLineStringGeometry(geom) {
/** /**
* @param {ol.geom.Polygon} geom Polygon geometry. * @param {module:ol/geom/Polygon~Polygon} geom Polygon geometry.
* @return {string} Coordinates part of Polygon as WKT. * @return {string} Coordinates part of Polygon as WKT.
*/ */
function encodePolygonGeometry(geom) { function encodePolygonGeometry(geom) {
@@ -639,7 +639,7 @@ function encodePolygonGeometry(geom) {
/** /**
* @param {ol.geom.MultiPolygon} geom MultiPolygon geometry. * @param {module:ol/geom/MultiPolygon~MultiPolygon} geom MultiPolygon geometry.
* @return {string} Coordinates part of MultiPolygon as WKT. * @return {string} Coordinates part of MultiPolygon as WKT.
*/ */
function encodeMultiPolygonGeometry(geom) { function encodeMultiPolygonGeometry(geom) {
@@ -652,7 +652,7 @@ function encodeMultiPolygonGeometry(geom) {
} }
/** /**
* @param {ol.geom.SimpleGeometry} geom SimpleGeometry geometry. * @param {module:ol/geom/SimpleGeometry~SimpleGeometry} geom SimpleGeometry geometry.
* @return {string} Potential dimensional information for WKT type. * @return {string} Potential dimensional information for WKT type.
*/ */
function encodeGeometryLayout(geom) { function encodeGeometryLayout(geom) {
@@ -670,7 +670,7 @@ function encodeGeometryLayout(geom) {
/** /**
* @const * @const
* @type {Object.<string, function(ol.geom.Geometry): string>} * @type {Object.<string, function(module:ol/geom/Geometry~Geometry): string>}
*/ */
const GeometryEncoder = { const GeometryEncoder = {
'Point': encodePointGeometry, 'Point': encodePointGeometry,
@@ -685,7 +685,7 @@ const GeometryEncoder = {
/** /**
* Encode a geometry as WKT. * Encode a geometry as WKT.
* @param {ol.geom.Geometry} geom The geometry to encode. * @param {module:ol/geom/Geometry~Geometry} geom The geometry to encode.
* @return {string} WKT string for the geometry. * @return {string} WKT string for the geometry.
*/ */
function encode(geom) { function encode(geom) {
@@ -709,7 +709,7 @@ function encode(geom) {
/** /**
* Parse a WKT string. * Parse a WKT string.
* @param {string} wkt WKT string. * @param {string} wkt WKT string.
* @return {ol.geom.Geometry|undefined} * @return {module:ol/geom/Geometry~Geometry|undefined}
* The geometry created. * The geometry created.
* @private * @private
*/ */
@@ -726,7 +726,7 @@ WKT.prototype.parse_ = function(wkt) {
* @function * @function
* @param {Document|Node|Object|string} source Source. * @param {Document|Node|Object|string} source Source.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options. * @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @return {ol.Feature} Feature. * @return {module:ol/Feature~Feature} Feature.
* @api * @api
*/ */
WKT.prototype.readFeature; WKT.prototype.readFeature;
@@ -752,7 +752,7 @@ WKT.prototype.readFeatureFromText = function(text, opt_options) {
* @function * @function
* @param {Document|Node|Object|string} source Source. * @param {Document|Node|Object|string} source Source.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options. * @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @return {Array.<ol.Feature>} Features. * @return {Array.<module:ol/Feature~Feature>} Features.
* @api * @api
*/ */
WKT.prototype.readFeatures; WKT.prototype.readFeatures;
@@ -766,7 +766,7 @@ WKT.prototype.readFeaturesFromText = function(text, opt_options) {
const geometry = this.readGeometryFromText(text, opt_options); const geometry = this.readGeometryFromText(text, opt_options);
if (this.splitCollection_ && if (this.splitCollection_ &&
geometry.getType() == GeometryType.GEOMETRY_COLLECTION) { geometry.getType() == GeometryType.GEOMETRY_COLLECTION) {
geometries = (/** @type {ol.geom.GeometryCollection} */ (geometry)) geometries = (/** @type {module:ol/geom/GeometryCollection~GeometryCollection} */ (geometry))
.getGeometriesArray(); .getGeometriesArray();
} else { } else {
geometries = [geometry]; geometries = [geometry];
@@ -787,7 +787,7 @@ WKT.prototype.readFeaturesFromText = function(text, opt_options) {
* @function * @function
* @param {Document|Node|Object|string} source Source. * @param {Document|Node|Object|string} source Source.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options. * @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @return {ol.geom.Geometry} Geometry. * @return {module:ol/geom/Geometry~Geometry} Geometry.
* @api * @api
*/ */
WKT.prototype.readGeometry; WKT.prototype.readGeometry;
@@ -799,7 +799,7 @@ WKT.prototype.readGeometry;
WKT.prototype.readGeometryFromText = function(text, opt_options) { WKT.prototype.readGeometryFromText = function(text, opt_options) {
const geometry = this.parse_(text); const geometry = this.parse_(text);
if (geometry) { if (geometry) {
return /** @type {ol.geom.Geometry} */ (transformWithOptions(geometry, false, opt_options)); return /** @type {module:ol/geom/Geometry~Geometry} */ (transformWithOptions(geometry, false, opt_options));
} else { } else {
return null; return null;
} }
@@ -807,7 +807,7 @@ WKT.prototype.readGeometryFromText = function(text, opt_options) {
/** /**
* @enum {function (new:ol.geom.Geometry, Array, ol.geom.GeometryLayout)} * @enum {function (new:module:ol/geom/Geometry~Geometry, Array, module:ol/geom/GeometryLayout~GeometryLayout)}
*/ */
const GeometryConstructor = { const GeometryConstructor = {
'POINT': Point, 'POINT': Point,
@@ -833,7 +833,7 @@ const GeometryParser = {
/** /**
* @return {!ol.geom.Geometry} The geometry. * @return {!module:ol/geom/Geometry~Geometry} The geometry.
* @private * @private
*/ */
Parser.prototype.parseGeometry_ = function() { Parser.prototype.parseGeometry_ = function() {
@@ -862,7 +862,7 @@ Parser.prototype.parseGeometry_ = function() {
* Encode a feature as a WKT string. * Encode a feature as a WKT string.
* *
* @function * @function
* @param {ol.Feature} feature Feature. * @param {module:ol/Feature~Feature} feature Feature.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {string} WKT string. * @return {string} WKT string.
* @api * @api
@@ -886,7 +886,7 @@ WKT.prototype.writeFeatureText = function(feature, opt_options) {
* Encode an array of features as a WKT string. * Encode an array of features as a WKT string.
* *
* @function * @function
* @param {Array.<ol.Feature>} features Features. * @param {Array.<module:ol/Feature~Feature>} features Features.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {string} WKT string. * @return {string} WKT string.
* @api * @api
@@ -914,7 +914,7 @@ WKT.prototype.writeFeaturesText = function(features, opt_options) {
* Write a single geometry as a WKT string. * Write a single geometry as a WKT string.
* *
* @function * @function
* @param {ol.geom.Geometry} geometry Geometry. * @param {module:ol/geom/Geometry~Geometry} geometry Geometry.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {string} WKT string. * @return {string} WKT string.
* @api * @api
@@ -926,7 +926,7 @@ WKT.prototype.writeGeometry;
* @inheritDoc * @inheritDoc
*/ */
WKT.prototype.writeGeometryText = function(geometry, opt_options) { WKT.prototype.writeGeometryText = function(geometry, opt_options) {
return encode(/** @type {ol.geom.Geometry} */ ( return encode(/** @type {module:ol/geom/Geometry~Geometry} */ (
transformWithOptions(geometry, true, opt_options))); transformWithOptions(geometry, true, opt_options)));
}; };
+3 -3
View File
@@ -89,13 +89,13 @@ WMSGetFeatureInfo.prototype.setLayers = function(layers) {
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack. * @param {Array.<*>} objectStack Object stack.
* @return {Array.<ol.Feature>} Features. * @return {Array.<module:ol/Feature~Feature>} Features.
* @private * @private
*/ */
WMSGetFeatureInfo.prototype.readFeatures_ = function(node, objectStack) { WMSGetFeatureInfo.prototype.readFeatures_ = function(node, objectStack) {
node.setAttribute('namespaceURI', this.featureNS_); node.setAttribute('namespaceURI', this.featureNS_);
const localName = node.localName; const localName = node.localName;
/** @type {Array.<ol.Feature>} */ /** @type {Array.<module:ol/Feature~Feature>} */
let features = []; let features = [];
if (node.childNodes.length === 0) { if (node.childNodes.length === 0) {
return features; return features;
@@ -152,7 +152,7 @@ WMSGetFeatureInfo.prototype.readFeatures_ = function(node, objectStack) {
* @function * @function
* @param {Document|Node|Object|string} source Source. * @param {Document|Node|Object|string} source Source.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Options. * @param {module:ol/format/Feature~ReadOptions=} opt_options Options.
* @return {Array.<ol.Feature>} Features. * @return {Array.<module:ol/Feature~Feature>} Features.
* @api * @api
*/ */
WMSGetFeatureInfo.prototype.readFeatures; WMSGetFeatureInfo.prototype.readFeatures;
+12 -12
View File
@@ -59,7 +59,7 @@ XMLFeature.prototype.readFeature = function(source, opt_options) {
/** /**
* @param {Document} doc Document. * @param {Document} doc Document.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Options. * @param {module:ol/format/Feature~ReadOptions=} opt_options Options.
* @return {ol.Feature} Feature. * @return {module:ol/Feature~Feature} Feature.
*/ */
XMLFeature.prototype.readFeatureFromDocument = function(doc, opt_options) { XMLFeature.prototype.readFeatureFromDocument = function(doc, opt_options) {
const features = this.readFeaturesFromDocument(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 {Node} node Node.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Options. * @param {module:ol/format/Feature~ReadOptions=} opt_options Options.
* @return {ol.Feature} Feature. * @return {module:ol/Feature~Feature} Feature.
*/ */
XMLFeature.prototype.readFeatureFromNode = function(node, opt_options) { XMLFeature.prototype.readFeatureFromNode = function(node, opt_options) {
return null; // not implemented return null; // not implemented
@@ -103,10 +103,10 @@ XMLFeature.prototype.readFeatures = function(source, opt_options) {
* @param {Document} doc Document. * @param {Document} doc Document.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Options. * @param {module:ol/format/Feature~ReadOptions=} opt_options Options.
* @protected * @protected
* @return {Array.<ol.Feature>} Features. * @return {Array.<module:ol/Feature~Feature>} Features.
*/ */
XMLFeature.prototype.readFeaturesFromDocument = function(doc, opt_options) { XMLFeature.prototype.readFeaturesFromDocument = function(doc, opt_options) {
/** @type {Array.<ol.Feature>} */ /** @type {Array.<module:ol/Feature~Feature>} */
const features = []; const features = [];
for (let n = doc.firstChild; n; n = n.nextSibling) { for (let n = doc.firstChild; n; n = n.nextSibling) {
if (n.nodeType == Node.ELEMENT_NODE) { if (n.nodeType == Node.ELEMENT_NODE) {
@@ -122,7 +122,7 @@ XMLFeature.prototype.readFeaturesFromDocument = function(doc, opt_options) {
* @param {Node} node Node. * @param {Node} node Node.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Options. * @param {module:ol/format/Feature~ReadOptions=} opt_options Options.
* @protected * @protected
* @return {Array.<ol.Feature>} Features. * @return {Array.<module:ol/Feature~Feature>} Features.
*/ */
XMLFeature.prototype.readFeaturesFromNode = function(node, opt_options) {}; XMLFeature.prototype.readFeaturesFromNode = function(node, opt_options) {};
@@ -149,7 +149,7 @@ XMLFeature.prototype.readGeometry = function(source, opt_options) {
* @param {Document} doc Document. * @param {Document} doc Document.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Options. * @param {module:ol/format/Feature~ReadOptions=} opt_options Options.
* @protected * @protected
* @return {ol.geom.Geometry} Geometry. * @return {module:ol/geom/Geometry~Geometry} Geometry.
*/ */
XMLFeature.prototype.readGeometryFromDocument = function(doc, opt_options) { XMLFeature.prototype.readGeometryFromDocument = function(doc, opt_options) {
return null; // not implemented return null; // not implemented
@@ -160,7 +160,7 @@ XMLFeature.prototype.readGeometryFromDocument = function(doc, opt_options) {
* @param {Node} node Node. * @param {Node} node Node.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Options. * @param {module:ol/format/Feature~ReadOptions=} opt_options Options.
* @protected * @protected
* @return {ol.geom.Geometry} Geometry. * @return {module:ol/geom/Geometry~Geometry} Geometry.
*/ */
XMLFeature.prototype.readGeometryFromNode = function(node, opt_options) { XMLFeature.prototype.readGeometryFromNode = function(node, opt_options) {
return null; // not implemented return null; // not implemented
@@ -187,7 +187,7 @@ XMLFeature.prototype.readProjection = function(source) {
/** /**
* @param {Document} doc Document. * @param {Document} doc Document.
* @protected * @protected
* @return {ol.proj.Projection} Projection. * @return {module:ol/proj/Projection~Projection} Projection.
*/ */
XMLFeature.prototype.readProjectionFromDocument = function(doc) { XMLFeature.prototype.readProjectionFromDocument = function(doc) {
return this.defaultDataProjection; return this.defaultDataProjection;
@@ -197,7 +197,7 @@ XMLFeature.prototype.readProjectionFromDocument = function(doc) {
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @protected * @protected
* @return {ol.proj.Projection} Projection. * @return {module:ol/proj/Projection~Projection} Projection.
*/ */
XMLFeature.prototype.readProjectionFromNode = function(node) { XMLFeature.prototype.readProjectionFromNode = function(node) {
return this.defaultDataProjection; return this.defaultDataProjection;
@@ -214,7 +214,7 @@ XMLFeature.prototype.writeFeature = function(feature, opt_options) {
/** /**
* @param {ol.Feature} feature Feature. * @param {module:ol/Feature~Feature} feature Feature.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Options. * @param {module:ol/format/Feature~WriteOptions=} opt_options Options.
* @protected * @protected
* @return {Node} Node. * @return {Node} Node.
@@ -234,7 +234,7 @@ XMLFeature.prototype.writeFeatures = function(features, opt_options) {
/** /**
* @param {Array.<ol.Feature>} features Features. * @param {Array.<module:ol/Feature~Feature>} features Features.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Options. * @param {module:ol/format/Feature~WriteOptions=} opt_options Options.
* @return {Node} Node. * @return {Node} Node.
*/ */
@@ -253,7 +253,7 @@ XMLFeature.prototype.writeGeometry = function(geometry, opt_options) {
/** /**
* @param {ol.geom.Geometry} geometry Geometry. * @param {module:ol/geom/Geometry~Geometry} geometry Geometry.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Options. * @param {module:ol/format/Feature~WriteOptions=} opt_options Options.
* @return {Node} Node. * @return {Node} Node.
*/ */
+3 -3
View File
@@ -78,7 +78,7 @@ export function bbox(geometryName, extent, opt_srsName) {
* contains a given geometry. * contains a given geometry.
* *
* @param {!string} geometryName Geometry name to use. * @param {!string} geometryName Geometry name to use.
* @param {!ol.geom.Geometry} geometry Geometry. * @param {!module:ol/geom/Geometry~Geometry} geometry Geometry.
* @param {string=} opt_srsName SRS name. No srsName attribute will be * @param {string=} opt_srsName SRS name. No srsName attribute will be
* set on geometries when this is not provided. * set on geometries when this is not provided.
* @returns {!ol.format.filter.Contains} `<Contains>` operator. * @returns {!ol.format.filter.Contains} `<Contains>` operator.
@@ -93,7 +93,7 @@ export function contains(geometryName, geometry, opt_srsName) {
* intersects a given geometry. * intersects a given geometry.
* *
* @param {!string} geometryName Geometry name to use. * @param {!string} geometryName Geometry name to use.
* @param {!ol.geom.Geometry} geometry Geometry. * @param {!module:ol/geom/Geometry~Geometry} geometry Geometry.
* @param {string=} opt_srsName SRS name. No srsName attribute will be * @param {string=} opt_srsName SRS name. No srsName attribute will be
* set on geometries when this is not provided. * set on geometries when this is not provided.
* @returns {!ol.format.filter.Intersects} `<Intersects>` operator. * @returns {!ol.format.filter.Intersects} `<Intersects>` operator.
@@ -108,7 +108,7 @@ export function intersects(geometryName, geometry, opt_srsName) {
* is within a given geometry. * is within a given geometry.
* *
* @param {!string} geometryName Geometry name to use. * @param {!string} geometryName Geometry name to use.
* @param {!ol.geom.Geometry} geometry Geometry. * @param {!module:ol/geom/Geometry~Geometry} geometry Geometry.
* @param {string=} opt_srsName SRS name. No srsName attribute will be * @param {string=} opt_srsName SRS name. No srsName attribute will be
* set on geometries when this is not provided. * set on geometries when this is not provided.
* @returns {!ol.format.filter.Within} `<Within>` operator. * @returns {!ol.format.filter.Within} `<Within>` operator.
+1 -1
View File
@@ -11,7 +11,7 @@ import Spatial from '../filter/Spatial.js';
* *
* @constructor * @constructor
* @param {!string} geometryName Geometry name to use. * @param {!string} geometryName Geometry name to use.
* @param {!ol.geom.Geometry} geometry Geometry. * @param {!module:ol/geom/Geometry~Geometry} geometry Geometry.
* @param {string=} opt_srsName SRS name. No srsName attribute will be * @param {string=} opt_srsName SRS name. No srsName attribute will be
* set on geometries when this is not provided. * set on geometries when this is not provided.
* @extends {ol.format.filter.Spatial} * @extends {ol.format.filter.Spatial}
+1 -1
View File
@@ -11,7 +11,7 @@ import Spatial from '../filter/Spatial.js';
* *
* @constructor * @constructor
* @param {!string} geometryName Geometry name to use. * @param {!string} geometryName Geometry name to use.
* @param {!ol.geom.Geometry} geometry Geometry. * @param {!module:ol/geom/Geometry~Geometry} geometry Geometry.
* @param {string=} opt_srsName SRS name. No srsName attribute will be * @param {string=} opt_srsName SRS name. No srsName attribute will be
* set on geometries when this is not provided. * set on geometries when this is not provided.
* @extends {ol.format.filter.Spatial} * @extends {ol.format.filter.Spatial}
+2 -2
View File
@@ -14,7 +14,7 @@ import Filter from '../filter/Filter.js';
* @abstract * @abstract
* @param {!string} tagName The XML tag name for this filter. * @param {!string} tagName The XML tag name for this filter.
* @param {!string} geometryName Geometry name to use. * @param {!string} geometryName Geometry name to use.
* @param {!ol.geom.Geometry} geometry Geometry. * @param {!module:ol/geom/Geometry~Geometry} geometry Geometry.
* @param {string=} opt_srsName SRS name. No srsName attribute will be * @param {string=} opt_srsName SRS name. No srsName attribute will be
* set on geometries when this is not provided. * set on geometries when this is not provided.
* @extends {ol.format.filter.Filter} * @extends {ol.format.filter.Filter}
@@ -31,7 +31,7 @@ const Spatial = function(tagName, geometryName, geometry, opt_srsName) {
/** /**
* @public * @public
* @type {ol.geom.Geometry} * @type {module:ol/geom/Geometry~Geometry}
*/ */
this.geometry = geometry; this.geometry = geometry;
+1 -1
View File
@@ -11,7 +11,7 @@ import Spatial from '../filter/Spatial.js';
* *
* @constructor * @constructor
* @param {!string} geometryName Geometry name to use. * @param {!string} geometryName Geometry name to use.
* @param {!ol.geom.Geometry} geometry Geometry. * @param {!module:ol/geom/Geometry~Geometry} geometry Geometry.
* @param {string=} opt_srsName SRS name. No srsName attribute will be * @param {string=} opt_srsName SRS name. No srsName attribute will be
* set on geometries when this is not provided. * set on geometries when this is not provided.
* @extends {ol.format.filter.Spatial} * @extends {ol.format.filter.Spatial}
+1 -1
View File
@@ -3,7 +3,7 @@
* `readFeatures` returning an `Array.<ol.Feature>` * `readFeatures` returning an `Array.<ol.Feature>`
* `readFeature` returning an `ol.Feature` * `readFeature` returning an `ol.Feature`
* `readGeometry` returning an `ol.geom.Geometry` * `readGeometry` returning an `module:ol/geom/Geometry~Geometry`
Having different functions for multiple return types allows both the user to specify what type of data they want and for the compiler to properly type check the code. Depending on the format, it is entirely reasonable to leave one or more of these methods unimplemented, or provide sensible default implementations. Having different functions for multiple return types allows both the user to specify what type of data they want and for the compiler to properly type check the code. Depending on the format, it is entirely reasonable to leave one or more of these methods unimplemented, or provide sensible default implementations.
+8 -8
View File
@@ -13,10 +13,10 @@ import {deflateCoordinate} from '../geom/flat/deflate.js';
* Circle geometry. * Circle geometry.
* *
* @constructor * @constructor
* @extends {ol.geom.SimpleGeometry} * @extends {module:ol/geom/SimpleGeometry~SimpleGeometry}
* @param {module:ol/coordinate~Coordinate} center Center. * @param {module:ol/coordinate~Coordinate} center Center.
* @param {number=} opt_radius Radius. * @param {number=} opt_radius Radius.
* @param {ol.geom.GeometryLayout=} opt_layout Layout. * @param {module:ol/geom/GeometryLayout~GeometryLayout=} opt_layout Layout.
* @api * @api
*/ */
const Circle = function(center, opt_radius, opt_layout) { const Circle = function(center, opt_radius, opt_layout) {
@@ -30,7 +30,7 @@ inherits(Circle, SimpleGeometry);
/** /**
* Make a complete copy of the geometry. * Make a complete copy of the geometry.
* @return {!ol.geom.Circle} Clone. * @return {!module:ol/geom/Circle~Circle} Clone.
* @override * @override
* @api * @api
*/ */
@@ -179,7 +179,7 @@ Circle.prototype.setCenter = function(center) {
* number) of the circle. * number) of the circle.
* @param {module:ol/coordinate~Coordinate} center Center. * @param {module:ol/coordinate~Coordinate} center Center.
* @param {number} radius Radius. * @param {number} radius Radius.
* @param {ol.geom.GeometryLayout=} opt_layout Layout. * @param {module:ol/geom/GeometryLayout~GeometryLayout=} opt_layout Layout.
* @api * @api
*/ */
Circle.prototype.setCenterAndRadius = function(center, radius, opt_layout) { Circle.prototype.setCenterAndRadius = function(center, radius, opt_layout) {
@@ -217,7 +217,7 @@ Circle.prototype.setCoordinates = function(coordinates, opt_layout) {};
/** /**
* @param {ol.geom.GeometryLayout} layout Layout. * @param {module:ol/geom/GeometryLayout~GeometryLayout} layout Layout.
* @param {Array.<number>} flatCoordinates Flat coordinates. * @param {Array.<number>} flatCoordinates Flat coordinates.
*/ */
Circle.prototype.setFlatCoordinates = function(layout, flatCoordinates) { Circle.prototype.setFlatCoordinates = function(layout, flatCoordinates) {
@@ -251,10 +251,10 @@ Circle.prototype.setRadius = function(radius) {
* of the original circle. * of the original circle.
* *
* @param {module:ol/proj~ProjectionLike} source The current projection. Can be a * @param {module:ol/proj~ProjectionLike} source The current projection. Can be a
* string identifier or a {@link ol.proj.Projection} object. * string identifier or a {@link module:ol/proj/Projection~Projection} object.
* @param {module:ol/proj~ProjectionLike} destination The desired projection. Can be a * @param {module:ol/proj~ProjectionLike} destination The desired projection. Can be a
* string identifier or a {@link ol.proj.Projection} object. * string identifier or a {@link module:ol/proj/Projection~Projection} object.
* @return {ol.geom.Circle} This geometry. Note that original geometry is * @return {module:ol/geom/Circle~Circle} This geometry. Note that original geometry is
* modified in place. * modified in place.
* @function * @function
* @api * @api
+8 -8
View File
@@ -42,7 +42,7 @@ const Geometry = function() {
/** /**
* @protected * @protected
* @type {Object.<string, ol.geom.Geometry>} * @type {Object.<string, module:ol/geom/Geometry~Geometry>}
*/ */
this.simplifiedGeometryCache = {}; this.simplifiedGeometryCache = {};
@@ -72,7 +72,7 @@ inherits(Geometry, BaseObject);
/** /**
* Make a complete copy of the geometry. * Make a complete copy of the geometry.
* @abstract * @abstract
* @return {!ol.geom.Geometry} Clone. * @return {!module:ol/geom/Geometry~Geometry} Clone.
*/ */
Geometry.prototype.clone = function() {}; Geometry.prototype.clone = function() {};
@@ -180,7 +180,7 @@ Geometry.prototype.scale = function(sx, opt_sy, opt_anchor) {};
* simplification is used to preserve topology. * simplification is used to preserve topology.
* @function * @function
* @param {number} tolerance The tolerance distance for simplification. * @param {number} tolerance The tolerance distance for simplification.
* @return {ol.geom.Geometry} A new, simplified version of the original * @return {module:ol/geom/Geometry~Geometry} A new, simplified version of the original
* geometry. * geometry.
* @api * @api
*/ */
@@ -195,7 +195,7 @@ Geometry.prototype.simplify = function(tolerance) {
* @see https://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm * @see https://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm
* @abstract * @abstract
* @param {number} squaredTolerance Squared tolerance. * @param {number} squaredTolerance Squared tolerance.
* @return {ol.geom.Geometry} Simplified geometry. * @return {module:ol/geom/Geometry~Geometry} Simplified geometry.
*/ */
Geometry.prototype.getSimplifiedGeometry = function(squaredTolerance) {}; Geometry.prototype.getSimplifiedGeometry = function(squaredTolerance) {};
@@ -203,7 +203,7 @@ Geometry.prototype.getSimplifiedGeometry = function(squaredTolerance) {};
/** /**
* Get the type of this geometry. * Get the type of this geometry.
* @abstract * @abstract
* @return {ol.geom.GeometryType} Geometry type. * @return {module:ol/geom/GeometryType~GeometryType} Geometry type.
*/ */
Geometry.prototype.getType = function() {}; Geometry.prototype.getType = function() {};
@@ -246,10 +246,10 @@ Geometry.prototype.translate = function(deltaX, deltaY) {};
* then use this function on the clone. * then use this function on the clone.
* *
* @param {module:ol/proj~ProjectionLike} source The current projection. Can be a * @param {module:ol/proj~ProjectionLike} source The current projection. Can be a
* string identifier or a {@link ol.proj.Projection} object. * string identifier or a {@link module:ol/proj/Projection~Projection} object.
* @param {module:ol/proj~ProjectionLike} destination The desired projection. Can be a * @param {module:ol/proj~ProjectionLike} destination The desired projection. Can be a
* string identifier or a {@link ol.proj.Projection} object. * string identifier or a {@link module:ol/proj/Projection~Projection} object.
* @return {ol.geom.Geometry} This geometry. Note that original geometry is * @return {module:ol/geom/Geometry~Geometry} This geometry. Note that original geometry is
* modified in place. * modified in place.
* @api * @api
*/ */
+11 -11
View File
@@ -11,11 +11,11 @@ import {clear} from '../obj.js';
/** /**
* @classdesc * @classdesc
* An array of {@link ol.geom.Geometry} objects. * An array of {@link module:ol/geom/Geometry~Geometry} objects.
* *
* @constructor * @constructor
* @extends {ol.geom.Geometry} * @extends {module:ol/geom/Geometry~Geometry}
* @param {Array.<ol.geom.Geometry>=} opt_geometries Geometries. * @param {Array.<module:ol/geom/Geometry~Geometry>=} opt_geometries Geometries.
* @api * @api
*/ */
const GeometryCollection = function(opt_geometries) { const GeometryCollection = function(opt_geometries) {
@@ -24,7 +24,7 @@ const GeometryCollection = function(opt_geometries) {
/** /**
* @private * @private
* @type {Array.<ol.geom.Geometry>} * @type {Array.<module:ol/geom/Geometry~Geometry>}
*/ */
this.geometries_ = opt_geometries ? opt_geometries : null; this.geometries_ = opt_geometries ? opt_geometries : null;
@@ -35,8 +35,8 @@ inherits(GeometryCollection, Geometry);
/** /**
* @param {Array.<ol.geom.Geometry>} geometries Geometries. * @param {Array.<module:ol/geom/Geometry~Geometry>} geometries Geometries.
* @return {Array.<ol.geom.Geometry>} Cloned geometries. * @return {Array.<module:ol/geom/Geometry~Geometry>} Cloned geometries.
*/ */
function cloneGeometries(geometries) { function cloneGeometries(geometries) {
const clonedGeometries = []; const clonedGeometries = [];
@@ -79,7 +79,7 @@ GeometryCollection.prototype.listenGeometriesChange_ = function() {
/** /**
* Make a complete copy of the geometry. * Make a complete copy of the geometry.
* @return {!ol.geom.GeometryCollection} Clone. * @return {!module:ol/geom/GeometryCollection~GeometryCollection} Clone.
* @override * @override
* @api * @api
*/ */
@@ -135,7 +135,7 @@ GeometryCollection.prototype.computeExtent = function(extent) {
/** /**
* Return the geometries that make up this geometry collection. * Return the geometries that make up this geometry collection.
* @return {Array.<ol.geom.Geometry>} Geometries. * @return {Array.<module:ol/geom/Geometry~Geometry>} Geometries.
* @api * @api
*/ */
GeometryCollection.prototype.getGeometries = function() { GeometryCollection.prototype.getGeometries = function() {
@@ -144,7 +144,7 @@ GeometryCollection.prototype.getGeometries = function() {
/** /**
* @return {Array.<ol.geom.Geometry>} Geometries. * @return {Array.<module:ol/geom/Geometry~Geometry>} Geometries.
*/ */
GeometryCollection.prototype.getGeometriesArray = function() { GeometryCollection.prototype.getGeometriesArray = function() {
return this.geometries_; 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. * Set the geometries that make up this geometry collection.
* @param {Array.<ol.geom.Geometry>} geometries Geometries. * @param {Array.<module:ol/geom/Geometry~Geometry>} geometries Geometries.
* @api * @api
*/ */
GeometryCollection.prototype.setGeometries = function(geometries) { GeometryCollection.prototype.setGeometries = function(geometries) {
@@ -266,7 +266,7 @@ GeometryCollection.prototype.setGeometries = function(geometries) {
/** /**
* @param {Array.<ol.geom.Geometry>} geometries Geometries. * @param {Array.<module:ol/geom/Geometry~Geometry>} geometries Geometries.
*/ */
GeometryCollection.prototype.setGeometriesArray = function(geometries) { GeometryCollection.prototype.setGeometriesArray = function(geometries) {
this.unlistenGeometriesChange_(); this.unlistenGeometriesChange_();
+5 -5
View File
@@ -21,9 +21,9 @@ import {douglasPeucker} from '../geom/flat/simplify.js';
* Linestring geometry. * Linestring geometry.
* *
* @constructor * @constructor
* @extends {ol.geom.SimpleGeometry} * @extends {module:ol/geom/SimpleGeometry~SimpleGeometry}
* @param {Array.<module:ol/coordinate~Coordinate>} coordinates Coordinates. * @param {Array.<module:ol/coordinate~Coordinate>} coordinates Coordinates.
* @param {ol.geom.GeometryLayout=} opt_layout Layout. * @param {module:ol/geom/GeometryLayout~GeometryLayout=} opt_layout Layout.
* @api * @api
*/ */
const LineString = function(coordinates, opt_layout) { const LineString = function(coordinates, opt_layout) {
@@ -78,7 +78,7 @@ LineString.prototype.appendCoordinate = function(coordinate) {
/** /**
* Make a complete copy of the geometry. * Make a complete copy of the geometry.
* @return {!ol.geom.LineString} Clone. * @return {!module:ol/geom/LineString~LineString} Clone.
* @override * @override
* @api * @api
*/ */
@@ -238,7 +238,7 @@ LineString.prototype.intersectsExtent = function(extent) {
/** /**
* Set the coordinates of the linestring. * Set the coordinates of the linestring.
* @param {Array.<module:ol/coordinate~Coordinate>} coordinates Coordinates. * @param {Array.<module:ol/coordinate~Coordinate>} coordinates Coordinates.
* @param {ol.geom.GeometryLayout=} opt_layout Layout. * @param {module:ol/geom/GeometryLayout~GeometryLayout=} opt_layout Layout.
* @override * @override
* @api * @api
*/ */
@@ -258,7 +258,7 @@ LineString.prototype.setCoordinates = function(coordinates, opt_layout) {
/** /**
* @param {ol.geom.GeometryLayout} layout Layout. * @param {module:ol/geom/GeometryLayout~GeometryLayout} layout Layout.
* @param {Array.<number>} flatCoordinates Flat coordinates. * @param {Array.<number>} flatCoordinates Flat coordinates.
*/ */
LineString.prototype.setFlatCoordinates = function(layout, flatCoordinates) { LineString.prototype.setFlatCoordinates = function(layout, flatCoordinates) {
+5 -5
View File
@@ -18,9 +18,9 @@ import {douglasPeucker} from '../geom/flat/simplify.js';
* on its own. * on its own.
* *
* @constructor * @constructor
* @extends {ol.geom.SimpleGeometry} * @extends {module:ol/geom/SimpleGeometry~SimpleGeometry}
* @param {Array.<module:ol/coordinate~Coordinate>} coordinates Coordinates. * @param {Array.<module:ol/coordinate~Coordinate>} coordinates Coordinates.
* @param {ol.geom.GeometryLayout=} opt_layout Layout. * @param {module:ol/geom/GeometryLayout~GeometryLayout=} opt_layout Layout.
* @api * @api
*/ */
const LinearRing = function(coordinates, opt_layout) { const LinearRing = function(coordinates, opt_layout) {
@@ -48,7 +48,7 @@ inherits(LinearRing, SimpleGeometry);
/** /**
* Make a complete copy of the geometry. * Make a complete copy of the geometry.
* @return {!ol.geom.LinearRing} Clone. * @return {!module:ol/geom/LinearRing~LinearRing} Clone.
* @override * @override
* @api * @api
*/ */
@@ -132,7 +132,7 @@ LinearRing.prototype.intersectsExtent = function(extent) {};
/** /**
* Set the coordinates of the linear ring. * Set the coordinates of the linear ring.
* @param {Array.<module:ol/coordinate~Coordinate>} coordinates Coordinates. * @param {Array.<module:ol/coordinate~Coordinate>} coordinates Coordinates.
* @param {ol.geom.GeometryLayout=} opt_layout Layout. * @param {module:ol/geom/GeometryLayout~GeometryLayout=} opt_layout Layout.
* @override * @override
* @api * @api
*/ */
@@ -152,7 +152,7 @@ LinearRing.prototype.setCoordinates = function(coordinates, opt_layout) {
/** /**
* @param {ol.geom.GeometryLayout} layout Layout. * @param {module:ol/geom/GeometryLayout~GeometryLayout} layout Layout.
* @param {Array.<number>} flatCoordinates Flat coordinates. * @param {Array.<number>} flatCoordinates Flat coordinates.
*/ */
LinearRing.prototype.setFlatCoordinates = function(layout, flatCoordinates) { LinearRing.prototype.setFlatCoordinates = function(layout, flatCoordinates) {
+10 -10
View File
@@ -20,9 +20,9 @@ import {douglasPeuckerArray} from '../geom/flat/simplify.js';
* Multi-linestring geometry. * Multi-linestring geometry.
* *
* @constructor * @constructor
* @extends {ol.geom.SimpleGeometry} * @extends {module:ol/geom/SimpleGeometry~SimpleGeometry}
* @param {Array.<Array.<module:ol/coordinate~Coordinate>>} coordinates Coordinates. * @param {Array.<Array.<module:ol/coordinate~Coordinate>>} coordinates Coordinates.
* @param {ol.geom.GeometryLayout=} opt_layout Layout. * @param {module:ol/geom/GeometryLayout~GeometryLayout=} opt_layout Layout.
* @api * @api
*/ */
const MultiLineString = function(coordinates, opt_layout) { const MultiLineString = function(coordinates, opt_layout) {
@@ -56,7 +56,7 @@ inherits(MultiLineString, SimpleGeometry);
/** /**
* Append the passed linestring to the multilinestring. * Append the passed linestring to the multilinestring.
* @param {ol.geom.LineString} lineString LineString. * @param {module:ol/geom/LineString~LineString} lineString LineString.
* @api * @api
*/ */
MultiLineString.prototype.appendLineString = function(lineString) { MultiLineString.prototype.appendLineString = function(lineString) {
@@ -72,7 +72,7 @@ MultiLineString.prototype.appendLineString = function(lineString) {
/** /**
* Make a complete copy of the geometry. * Make a complete copy of the geometry.
* @return {!ol.geom.MultiLineString} Clone. * @return {!module:ol/geom/MultiLineString~MultiLineString} Clone.
* @override * @override
* @api * @api
*/ */
@@ -160,7 +160,7 @@ MultiLineString.prototype.getEnds = function() {
/** /**
* Return the linestring at the specified index. * Return the linestring at the specified index.
* @param {number} index Index. * @param {number} index Index.
* @return {ol.geom.LineString} LineString. * @return {module:ol/geom/LineString~LineString} LineString.
* @api * @api
*/ */
MultiLineString.prototype.getLineString = function(index) { MultiLineString.prototype.getLineString = function(index) {
@@ -176,14 +176,14 @@ MultiLineString.prototype.getLineString = function(index) {
/** /**
* Return the linestrings of this multilinestring. * Return the linestrings of this multilinestring.
* @return {Array.<ol.geom.LineString>} LineStrings. * @return {Array.<module:ol/geom/LineString~LineString>} LineStrings.
* @api * @api
*/ */
MultiLineString.prototype.getLineStrings = function() { MultiLineString.prototype.getLineStrings = function() {
const flatCoordinates = this.flatCoordinates; const flatCoordinates = this.flatCoordinates;
const ends = this.ends_; const ends = this.ends_;
const layout = this.layout; const layout = this.layout;
/** @type {Array.<ol.geom.LineString>} */ /** @type {Array.<module:ol/geom/LineString~LineString>} */
const lineStrings = []; const lineStrings = [];
let offset = 0; let offset = 0;
for (let i = 0, ii = ends.length; i < ii; ++i) { for (let i = 0, ii = ends.length; i < ii; ++i) {
@@ -255,7 +255,7 @@ MultiLineString.prototype.intersectsExtent = function(extent) {
/** /**
* Set the coordinates of the multilinestring. * Set the coordinates of the multilinestring.
* @param {Array.<Array.<module:ol/coordinate~Coordinate>>} coordinates Coordinates. * @param {Array.<Array.<module:ol/coordinate~Coordinate>>} coordinates Coordinates.
* @param {ol.geom.GeometryLayout=} opt_layout Layout. * @param {module:ol/geom/GeometryLayout~GeometryLayout=} opt_layout Layout.
* @override * @override
* @api * @api
*/ */
@@ -276,7 +276,7 @@ MultiLineString.prototype.setCoordinates = function(coordinates, opt_layout) {
/** /**
* @param {ol.geom.GeometryLayout} layout Layout. * @param {module:ol/geom/GeometryLayout~GeometryLayout} layout Layout.
* @param {Array.<number>} flatCoordinates Flat coordinates. * @param {Array.<number>} flatCoordinates Flat coordinates.
* @param {Array.<number>} ends Ends. * @param {Array.<number>} ends Ends.
*/ */
@@ -288,7 +288,7 @@ MultiLineString.prototype.setFlatCoordinates = function(layout, flatCoordinates,
/** /**
* @param {Array.<ol.geom.LineString>} lineStrings LineStrings. * @param {Array.<module:ol/geom/LineString~LineString>} lineStrings LineStrings.
*/ */
MultiLineString.prototype.setLineStrings = function(lineStrings) { MultiLineString.prototype.setLineStrings = function(lineStrings) {
let layout = this.getLayout(); let layout = this.getLayout();
+9 -9
View File
@@ -17,9 +17,9 @@ import {squaredDistance as squaredDx} from '../math.js';
* Multi-point geometry. * Multi-point geometry.
* *
* @constructor * @constructor
* @extends {ol.geom.SimpleGeometry} * @extends {module:ol/geom/SimpleGeometry~SimpleGeometry}
* @param {Array.<module:ol/coordinate~Coordinate>} coordinates Coordinates. * @param {Array.<module:ol/coordinate~Coordinate>} coordinates Coordinates.
* @param {ol.geom.GeometryLayout=} opt_layout Layout. * @param {module:ol/geom/GeometryLayout~GeometryLayout=} opt_layout Layout.
* @api * @api
*/ */
const MultiPoint = function(coordinates, opt_layout) { const MultiPoint = function(coordinates, opt_layout) {
@@ -32,7 +32,7 @@ inherits(MultiPoint, SimpleGeometry);
/** /**
* Append the passed point to this multipoint. * Append the passed point to this multipoint.
* @param {ol.geom.Point} point Point. * @param {module:ol/geom/Point~Point} point Point.
* @api * @api
*/ */
MultiPoint.prototype.appendPoint = function(point) { MultiPoint.prototype.appendPoint = function(point) {
@@ -47,7 +47,7 @@ MultiPoint.prototype.appendPoint = function(point) {
/** /**
* Make a complete copy of the geometry. * Make a complete copy of the geometry.
* @return {!ol.geom.MultiPoint} Clone. * @return {!module:ol/geom/MultiPoint~MultiPoint} Clone.
* @override * @override
* @api * @api
*/ */
@@ -97,7 +97,7 @@ MultiPoint.prototype.getCoordinates = function() {
/** /**
* Return the point at the specified index. * Return the point at the specified index.
* @param {number} index Index. * @param {number} index Index.
* @return {ol.geom.Point} Point. * @return {module:ol/geom/Point~Point} Point.
* @api * @api
*/ */
MultiPoint.prototype.getPoint = function(index) { MultiPoint.prototype.getPoint = function(index) {
@@ -114,14 +114,14 @@ MultiPoint.prototype.getPoint = function(index) {
/** /**
* Return the points of this multipoint. * Return the points of this multipoint.
* @return {Array.<ol.geom.Point>} Points. * @return {Array.<module:ol/geom/Point~Point>} Points.
* @api * @api
*/ */
MultiPoint.prototype.getPoints = function() { MultiPoint.prototype.getPoints = function() {
const flatCoordinates = this.flatCoordinates; const flatCoordinates = this.flatCoordinates;
const layout = this.layout; const layout = this.layout;
const stride = this.stride; const stride = this.stride;
/** @type {Array.<ol.geom.Point>} */ /** @type {Array.<module:ol/geom/Point~Point>} */
const points = []; const points = [];
for (let i = 0, ii = flatCoordinates.length; i < ii; i += stride) { for (let i = 0, ii = flatCoordinates.length; i < ii; i += stride) {
const point = new Point(null); const point = new Point(null);
@@ -162,7 +162,7 @@ MultiPoint.prototype.intersectsExtent = function(extent) {
/** /**
* Set the coordinates of the multipoint. * Set the coordinates of the multipoint.
* @param {Array.<module:ol/coordinate~Coordinate>} coordinates Coordinates. * @param {Array.<module:ol/coordinate~Coordinate>} coordinates Coordinates.
* @param {ol.geom.GeometryLayout=} opt_layout Layout. * @param {module:ol/geom/GeometryLayout~GeometryLayout=} opt_layout Layout.
* @override * @override
* @api * @api
*/ */
@@ -182,7 +182,7 @@ MultiPoint.prototype.setCoordinates = function(coordinates, opt_layout) {
/** /**
* @param {ol.geom.GeometryLayout} layout Layout. * @param {module:ol/geom/GeometryLayout~GeometryLayout} layout Layout.
* @param {Array.<number>} flatCoordinates Flat coordinates. * @param {Array.<number>} flatCoordinates Flat coordinates.
*/ */
MultiPoint.prototype.setFlatCoordinates = function(layout, flatCoordinates) { MultiPoint.prototype.setFlatCoordinates = function(layout, flatCoordinates) {
+11 -11
View File
@@ -25,9 +25,9 @@ import {quantizeMultiArray} from '../geom/flat/simplify.js';
* Multi-polygon geometry. * Multi-polygon geometry.
* *
* @constructor * @constructor
* @extends {ol.geom.SimpleGeometry} * @extends {module:ol/geom/SimpleGeometry~SimpleGeometry}
* @param {Array.<Array.<Array.<module:ol/coordinate~Coordinate>>>} coordinates Coordinates. * @param {Array.<Array.<Array.<module:ol/coordinate~Coordinate>>>} coordinates Coordinates.
* @param {ol.geom.GeometryLayout=} opt_layout Layout. * @param {module:ol/geom/GeometryLayout~GeometryLayout=} opt_layout Layout.
* @api * @api
*/ */
const MultiPolygon = function(coordinates, opt_layout) { const MultiPolygon = function(coordinates, opt_layout) {
@@ -85,7 +85,7 @@ inherits(MultiPolygon, SimpleGeometry);
/** /**
* Append the passed polygon to this multipolygon. * Append the passed polygon to this multipolygon.
* @param {ol.geom.Polygon} polygon Polygon. * @param {module:ol/geom/Polygon~Polygon} polygon Polygon.
* @api * @api
*/ */
MultiPolygon.prototype.appendPolygon = function(polygon) { MultiPolygon.prototype.appendPolygon = function(polygon) {
@@ -110,7 +110,7 @@ MultiPolygon.prototype.appendPolygon = function(polygon) {
/** /**
* Make a complete copy of the geometry. * Make a complete copy of the geometry.
* @return {!ol.geom.MultiPolygon} Clone. * @return {!module:ol/geom/MultiPolygon~MultiPolygon} Clone.
* @override * @override
* @api * @api
*/ */
@@ -219,8 +219,8 @@ MultiPolygon.prototype.getFlatInteriorPoints = function() {
/** /**
* Return the interior points as {@link ol.geom.MultiPoint multipoint}. * Return the interior points as {@link module:ol/geom/MultiPoint~MultiPoint multipoint}.
* @return {ol.geom.MultiPoint} Interior points as XYM coordinates, where M is * @return {module:ol/geom/MultiPoint~MultiPoint} Interior points as XYM coordinates, where M is
* the length of the horizontal intersection that the point belongs to. * the length of the horizontal intersection that the point belongs to.
* @api * @api
*/ */
@@ -273,7 +273,7 @@ MultiPolygon.prototype.getSimplifiedGeometryInternal = function(squaredTolerance
/** /**
* Return the polygon at the specified index. * Return the polygon at the specified index.
* @param {number} index Index. * @param {number} index Index.
* @return {ol.geom.Polygon} Polygon. * @return {module:ol/geom/Polygon~Polygon} Polygon.
* @api * @api
*/ */
MultiPolygon.prototype.getPolygon = function(index) { MultiPolygon.prototype.getPolygon = function(index) {
@@ -303,7 +303,7 @@ MultiPolygon.prototype.getPolygon = function(index) {
/** /**
* Return the polygons of this multipolygon. * Return the polygons of this multipolygon.
* @return {Array.<ol.geom.Polygon>} Polygons. * @return {Array.<module:ol/geom/Polygon~Polygon>} Polygons.
* @api * @api
*/ */
MultiPolygon.prototype.getPolygons = function() { MultiPolygon.prototype.getPolygons = function() {
@@ -352,7 +352,7 @@ MultiPolygon.prototype.intersectsExtent = function(extent) {
/** /**
* Set the coordinates of the multipolygon. * Set the coordinates of the multipolygon.
* @param {Array.<Array.<Array.<module:ol/coordinate~Coordinate>>>} coordinates Coordinates. * @param {Array.<Array.<Array.<module:ol/coordinate~Coordinate>>>} coordinates Coordinates.
* @param {ol.geom.GeometryLayout=} opt_layout Layout. * @param {module:ol/geom/GeometryLayout~GeometryLayout=} opt_layout Layout.
* @override * @override
* @api * @api
*/ */
@@ -379,7 +379,7 @@ MultiPolygon.prototype.setCoordinates = function(coordinates, opt_layout) {
/** /**
* @param {ol.geom.GeometryLayout} layout Layout. * @param {module:ol/geom/GeometryLayout~GeometryLayout} layout Layout.
* @param {Array.<number>} flatCoordinates Flat coordinates. * @param {Array.<number>} flatCoordinates Flat coordinates.
* @param {Array.<Array.<number>>} endss Endss. * @param {Array.<Array.<number>>} endss Endss.
*/ */
@@ -391,7 +391,7 @@ MultiPolygon.prototype.setFlatCoordinates = function(layout, flatCoordinates, en
/** /**
* @param {Array.<ol.geom.Polygon>} polygons Polygons. * @param {Array.<module:ol/geom/Polygon~Polygon>} polygons Polygons.
*/ */
MultiPolygon.prototype.setPolygons = function(polygons) { MultiPolygon.prototype.setPolygons = function(polygons) {
let layout = this.getLayout(); let layout = this.getLayout();
+4 -4
View File
@@ -14,9 +14,9 @@ import {squaredDistance as squaredDx} from '../math.js';
* Point geometry. * Point geometry.
* *
* @constructor * @constructor
* @extends {ol.geom.SimpleGeometry} * @extends {module:ol/geom/SimpleGeometry~SimpleGeometry}
* @param {module:ol/coordinate~Coordinate} coordinates Coordinates. * @param {module:ol/coordinate~Coordinate} coordinates Coordinates.
* @param {ol.geom.GeometryLayout=} opt_layout Layout. * @param {module:ol/geom/GeometryLayout~GeometryLayout=} opt_layout Layout.
* @api * @api
*/ */
const Point = function(coordinates, opt_layout) { const Point = function(coordinates, opt_layout) {
@@ -29,7 +29,7 @@ inherits(Point, SimpleGeometry);
/** /**
* Make a complete copy of the geometry. * Make a complete copy of the geometry.
* @return {!ol.geom.Point} Clone. * @return {!module:ol/geom/Point~Point} Clone.
* @override * @override
* @api * @api
*/ */
@@ -116,7 +116,7 @@ Point.prototype.setCoordinates = function(coordinates, opt_layout) {
/** /**
* @param {ol.geom.GeometryLayout} layout Layout. * @param {module:ol/geom/GeometryLayout~GeometryLayout} layout Layout.
* @param {Array.<number>} flatCoordinates Flat coordinates. * @param {Array.<number>} flatCoordinates Flat coordinates.
*/ */
Point.prototype.setFlatCoordinates = function(layout, flatCoordinates) { Point.prototype.setFlatCoordinates = function(layout, flatCoordinates) {
+14 -14
View File
@@ -26,14 +26,14 @@ import {modulo} from '../math.js';
* Polygon geometry. * Polygon geometry.
* *
* @constructor * @constructor
* @extends {ol.geom.SimpleGeometry} * @extends {module:ol/geom/SimpleGeometry~SimpleGeometry}
* @param {Array.<Array.<module:ol/coordinate~Coordinate>>} coordinates Array of linear * @param {Array.<Array.<module:ol/coordinate~Coordinate>>} coordinates Array of linear
* rings that define the polygon. The first linear ring of the array * rings that define the polygon. The first linear ring of the array
* defines the outer-boundary or surface of the polygon. Each subsequent * defines the outer-boundary or surface of the polygon. Each subsequent
* linear ring defines a hole in the surface of the polygon. A linear ring * linear ring defines a hole in the surface of the polygon. A linear ring
* is an array of vertices' coordinates where the first coordinate and the * is an array of vertices' coordinates where the first coordinate and the
* last are equivalent. * last are equivalent.
* @param {ol.geom.GeometryLayout=} opt_layout Layout. * @param {module:ol/geom/GeometryLayout~GeometryLayout=} opt_layout Layout.
* @api * @api
*/ */
const Polygon = function(coordinates, opt_layout) { const Polygon = function(coordinates, opt_layout) {
@@ -91,7 +91,7 @@ inherits(Polygon, SimpleGeometry);
/** /**
* Append the passed linear ring to this polygon. * Append the passed linear ring to this polygon.
* @param {ol.geom.LinearRing} linearRing Linear ring. * @param {module:ol/geom/LinearRing~LinearRing} linearRing Linear ring.
* @api * @api
*/ */
Polygon.prototype.appendLinearRing = function(linearRing) { Polygon.prototype.appendLinearRing = function(linearRing) {
@@ -107,7 +107,7 @@ Polygon.prototype.appendLinearRing = function(linearRing) {
/** /**
* Make a complete copy of the geometry. * Make a complete copy of the geometry.
* @return {!ol.geom.Polygon} Clone. * @return {!module:ol/geom/Polygon~Polygon} Clone.
* @override * @override
* @api * @api
*/ */
@@ -209,7 +209,7 @@ Polygon.prototype.getFlatInteriorPoint = function() {
/** /**
* Return an interior point of the polygon. * Return an interior point of the polygon.
* @return {ol.geom.Point} Interior point as XYM coordinate, where M is the * @return {module:ol/geom/Point~Point} Interior point as XYM coordinate, where M is the
* length of the horizontal intersection that the point belongs to. * length of the horizontal intersection that the point belongs to.
* @api * @api
*/ */
@@ -237,7 +237,7 @@ Polygon.prototype.getLinearRingCount = function() {
* at index `1` and beyond. * at index `1` and beyond.
* *
* @param {number} index Index. * @param {number} index Index.
* @return {ol.geom.LinearRing} Linear ring. * @return {module:ol/geom/LinearRing~LinearRing} Linear ring.
* @api * @api
*/ */
Polygon.prototype.getLinearRing = function(index) { Polygon.prototype.getLinearRing = function(index) {
@@ -253,7 +253,7 @@ Polygon.prototype.getLinearRing = function(index) {
/** /**
* Return the linear rings of the polygon. * Return the linear rings of the polygon.
* @return {Array.<ol.geom.LinearRing>} Linear rings. * @return {Array.<module:ol/geom/LinearRing~LinearRing>} Linear rings.
* @api * @api
*/ */
Polygon.prototype.getLinearRings = function() { Polygon.prototype.getLinearRings = function() {
@@ -333,7 +333,7 @@ Polygon.prototype.intersectsExtent = function(extent) {
/** /**
* Set the coordinates of the polygon. * Set the coordinates of the polygon.
* @param {Array.<Array.<module:ol/coordinate~Coordinate>>} coordinates Coordinates. * @param {Array.<Array.<module:ol/coordinate~Coordinate>>} coordinates Coordinates.
* @param {ol.geom.GeometryLayout=} opt_layout Layout. * @param {module:ol/geom/GeometryLayout~GeometryLayout=} opt_layout Layout.
* @override * @override
* @api * @api
*/ */
@@ -354,7 +354,7 @@ Polygon.prototype.setCoordinates = function(coordinates, opt_layout) {
/** /**
* @param {ol.geom.GeometryLayout} layout Layout. * @param {module:ol/geom/GeometryLayout~GeometryLayout} layout Layout.
* @param {Array.<number>} flatCoordinates Flat coordinates. * @param {Array.<number>} flatCoordinates Flat coordinates.
* @param {Array.<number>} ends Ends. * @param {Array.<number>} ends Ends.
*/ */
@@ -376,7 +376,7 @@ export default Polygon;
* polygon. Default is `32`. * polygon. Default is `32`.
* @param {number=} opt_sphereRadius Optional radius for the sphere (defaults to * @param {number=} opt_sphereRadius Optional radius for the sphere (defaults to
* the Earth's mean radius using the WGS84 ellipsoid). * the Earth's mean radius using the WGS84 ellipsoid).
* @return {ol.geom.Polygon} The "circular" polygon. * @return {module:ol/geom/Polygon~Polygon} The "circular" polygon.
* @api * @api
*/ */
export function circular(center, radius, opt_n, opt_sphereRadius) { 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`. * Create a polygon from an extent. The layout used is `XY`.
* @param {module:ol/extent~Extent} extent The extent. * @param {module:ol/extent~Extent} extent The extent.
* @return {ol.geom.Polygon} The polygon. * @return {module:ol/geom/Polygon~Polygon} The polygon.
* @api * @api
*/ */
export function fromExtent(extent) { export function fromExtent(extent) {
@@ -415,11 +415,11 @@ export function fromExtent(extent) {
/** /**
* Create a regular polygon from a circle. * Create a regular polygon from a circle.
* @param {ol.geom.Circle} circle Circle geometry. * @param {module:ol/geom/Circle~Circle} circle Circle geometry.
* @param {number=} opt_sides Number of sides of the polygon. Default is 32. * @param {number=} opt_sides Number of sides of the polygon. Default is 32.
* @param {number=} opt_angle Start angle for the first vertex of the polygon in * @param {number=} opt_angle Start angle for the first vertex of the polygon in
* radians. Default is 0. * radians. Default is 0.
* @return {ol.geom.Polygon} Polygon geometry. * @return {module:ol/geom/Polygon~Polygon} Polygon geometry.
* @api * @api
*/ */
export function fromCircle(circle, opt_sides, opt_angle) { 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. * Modify the coordinates of a polygon to make it a regular polygon.
* @param {ol.geom.Polygon} polygon Polygon geometry. * @param {module:ol/geom/Polygon~Polygon} polygon Polygon geometry.
* @param {module:ol/coordinate~Coordinate} center Center of the regular polygon. * @param {module:ol/coordinate~Coordinate} center Center of the regular polygon.
* @param {number} radius Radius of the regular polygon. * @param {number} radius Radius of the regular polygon.
* @param {number=} opt_angle Start angle for the first vertex of the polygon in * @param {number=} opt_angle Start angle for the first vertex of the polygon in
+12 -12
View File
@@ -16,7 +16,7 @@ import {clear} from '../obj.js';
* *
* @constructor * @constructor
* @abstract * @abstract
* @extends {ol.geom.Geometry} * @extends {module:ol/geom/Geometry~Geometry}
* @api * @api
*/ */
const SimpleGeometry = function() { const SimpleGeometry = function() {
@@ -25,7 +25,7 @@ const SimpleGeometry = function() {
/** /**
* @protected * @protected
* @type {ol.geom.GeometryLayout} * @type {module:ol/geom/GeometryLayout~GeometryLayout}
*/ */
this.layout = GeometryLayout.XY; this.layout = GeometryLayout.XY;
@@ -48,7 +48,7 @@ inherits(SimpleGeometry, Geometry);
/** /**
* @param {number} stride Stride. * @param {number} stride Stride.
* @return {ol.geom.GeometryLayout} layout Layout. * @return {module:ol/geom/GeometryLayout~GeometryLayout} layout Layout.
*/ */
function getLayoutForStride(stride) { function getLayoutForStride(stride) {
let layout; let layout;
@@ -59,12 +59,12 @@ function getLayoutForStride(stride) {
} else if (stride == 4) { } else if (stride == 4) {
layout = GeometryLayout.XYZM; layout = GeometryLayout.XYZM;
} }
return /** @type {ol.geom.GeometryLayout} */ (layout); return /** @type {module:ol/geom/GeometryLayout~GeometryLayout} */ (layout);
} }
/** /**
* @param {ol.geom.GeometryLayout} layout Layout. * @param {module:ol/geom/GeometryLayout~GeometryLayout} layout Layout.
* @return {number} Stride. * @return {number} Stride.
*/ */
export function getStrideForLayout(layout) { export function getStrideForLayout(layout) {
@@ -131,8 +131,8 @@ SimpleGeometry.prototype.getLastCoordinate = function() {
/** /**
* Return the {@link ol.geom.GeometryLayout layout} of the geometry. * Return the {@link module:ol/geom/GeometryLayout~GeometryLayout layout} of the geometry.
* @return {ol.geom.GeometryLayout} Layout. * @return {module:ol/geom/GeometryLayout~GeometryLayout} Layout.
* @api * @api
*/ */
SimpleGeometry.prototype.getLayout = function() { SimpleGeometry.prototype.getLayout = function() {
@@ -182,7 +182,7 @@ SimpleGeometry.prototype.getSimplifiedGeometry = function(squaredTolerance) {
/** /**
* @param {number} squaredTolerance Squared tolerance. * @param {number} squaredTolerance Squared tolerance.
* @return {ol.geom.SimpleGeometry} Simplified geometry. * @return {module:ol/geom/SimpleGeometry~SimpleGeometry} Simplified geometry.
* @protected * @protected
*/ */
SimpleGeometry.prototype.getSimplifiedGeometryInternal = function(squaredTolerance) { SimpleGeometry.prototype.getSimplifiedGeometryInternal = function(squaredTolerance) {
@@ -199,7 +199,7 @@ SimpleGeometry.prototype.getStride = function() {
/** /**
* @param {ol.geom.GeometryLayout} layout Layout. * @param {module:ol/geom/GeometryLayout~GeometryLayout} layout Layout.
* @param {Array.<number>} flatCoordinates Flat coordinates. * @param {Array.<number>} flatCoordinates Flat coordinates.
* @protected * @protected
*/ */
@@ -213,13 +213,13 @@ SimpleGeometry.prototype.setFlatCoordinatesInternal = function(layout, flatCoord
/** /**
* @abstract * @abstract
* @param {Array} coordinates Coordinates. * @param {Array} coordinates Coordinates.
* @param {ol.geom.GeometryLayout=} opt_layout Layout. * @param {module:ol/geom/GeometryLayout~GeometryLayout=} opt_layout Layout.
*/ */
SimpleGeometry.prototype.setCoordinates = function(coordinates, opt_layout) {}; SimpleGeometry.prototype.setCoordinates = function(coordinates, opt_layout) {};
/** /**
* @param {ol.geom.GeometryLayout|undefined} layout Layout. * @param {module:ol/geom/GeometryLayout~GeometryLayout|undefined} layout Layout.
* @param {Array} coordinates Coordinates. * @param {Array} coordinates Coordinates.
* @param {number} nesting Nesting. * @param {number} nesting Nesting.
* @protected * @protected
@@ -316,7 +316,7 @@ SimpleGeometry.prototype.translate = function(deltaX, deltaY) {
/** /**
* @param {ol.geom.SimpleGeometry} simpleGeometry Simple geometry. * @param {module:ol/geom/SimpleGeometry~SimpleGeometry} simpleGeometry Simple geometry.
* @param {module:ol/transform~Transform} transform Transform. * @param {module:ol/transform~Transform} transform Transform.
* @param {Array.<number>=} opt_dest Destination. * @param {Array.<number>=} opt_dest Destination.
* @return {Array.<number>} Transformed flat coordinates. * @return {Array.<number>} Transformed flat coordinates.
+3 -3
View File
@@ -84,7 +84,7 @@ function line(interpolate, transform, squaredTolerance) {
* @param {number} lat1 Latitude 1 in degrees. * @param {number} lat1 Latitude 1 in degrees.
* @param {number} lon2 Longitude 2 in degrees. * @param {number} lon2 Longitude 2 in degrees.
* @param {number} lat2 Latitude 2 in degrees. * @param {number} lat2 Latitude 2 in degrees.
* @param {ol.proj.Projection} projection Projection. * @param {module:ol/proj/Projection~Projection} projection Projection.
* @param {number} squaredTolerance Squared tolerance. * @param {number} squaredTolerance Squared tolerance.
* @return {Array.<number>} Flat coordinates. * @return {Array.<number>} Flat coordinates.
*/ */
@@ -128,7 +128,7 @@ export function greatCircleArc(lon1, lat1, lon2, lat2, projection, squaredTolera
* @param {number} lon Longitude. * @param {number} lon Longitude.
* @param {number} lat1 Latitude 1. * @param {number} lat1 Latitude 1.
* @param {number} lat2 Latitude 2. * @param {number} lat2 Latitude 2.
* @param {ol.proj.Projection} projection Projection. * @param {module:ol/proj/Projection~Projection} projection Projection.
* @param {number} squaredTolerance Squared tolerance. * @param {number} squaredTolerance Squared tolerance.
* @return {Array.<number>} Flat coordinates. * @return {Array.<number>} Flat coordinates.
*/ */
@@ -151,7 +151,7 @@ export function meridian(lon, lat1, lat2, projection, squaredTolerance) {
* @param {number} lat Latitude. * @param {number} lat Latitude.
* @param {number} lon1 Longitude 1. * @param {number} lon1 Longitude 1.
* @param {number} lon2 Longitude 2. * @param {number} lon2 Longitude 2.
* @param {ol.proj.Projection} projection Projection. * @param {module:ol/proj/Projection~Projection} projection Projection.
* @param {number} squaredTolerance Squared tolerance. * @param {number} squaredTolerance Squared tolerance.
* @return {Array.<number>} Flat coordinates. * @return {Array.<number>} Flat coordinates.
*/ */
+2 -2
View File
@@ -40,9 +40,9 @@ inherits(DoubleClickZoom, Interaction);
/** /**
* Handles the {@link ol.MapBrowserEvent map browser event} (if it was a * Handles the {@link module:ol/MapBrowserEvent~MapBrowserEvent map browser event} (if it was a
* doubleclick) and eventually zooms the map. * doubleclick) and eventually zooms the map.
* @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event. * @param {module:ol/MapBrowserEvent~MapBrowserEvent} mapBrowserEvent Map browser event.
* @return {boolean} `false` to stop event propagation. * @return {boolean} `false` to stop event propagation.
* @this {ol.interaction.DoubleClickZoom} * @this {ol.interaction.DoubleClickZoom}
*/ */
+6 -6
View File
@@ -35,8 +35,8 @@ const DragAndDropEventType = {
* @implements {oli.interaction.DragAndDropEvent} * @implements {oli.interaction.DragAndDropEvent}
* @param {ol.interaction.DragAndDropEventType} type Type. * @param {ol.interaction.DragAndDropEventType} type Type.
* @param {File} file File. * @param {File} file File.
* @param {Array.<ol.Feature>=} opt_features Features. * @param {Array.<module:ol/Feature~Feature>=} opt_features Features.
* @param {ol.proj.Projection=} opt_projection Projection. * @param {module:ol/proj/Projection~Projection=} opt_projection Projection.
*/ */
const DragAndDropEvent = function(type, file, opt_features, opt_projection) { const DragAndDropEvent = function(type, file, opt_features, opt_projection) {
@@ -44,7 +44,7 @@ const DragAndDropEvent = function(type, file, opt_features, opt_projection) {
/** /**
* The features parsed from dropped data. * The features parsed from dropped data.
* @type {Array.<ol.Feature>|undefined} * @type {Array.<module:ol/Feature~Feature>|undefined}
* @api * @api
*/ */
this.features = opt_features; this.features = opt_features;
@@ -58,7 +58,7 @@ const DragAndDropEvent = function(type, file, opt_features, opt_projection) {
/** /**
* The feature projection. * The feature projection.
* @type {ol.proj.Projection|undefined} * @type {module:ol/proj/Projection~Projection|undefined}
* @api * @api
*/ */
this.projection = opt_projection; this.projection = opt_projection;
@@ -94,7 +94,7 @@ const DragAndDrop = function(opt_options) {
/** /**
* @private * @private
* @type {ol.proj.Projection} * @type {module:ol/proj/Projection~Projection}
*/ */
this.projection_ = options.projection ? this.projection_ = options.projection ?
getProjection(options.projection) : null; getProjection(options.projection) : null;
@@ -238,7 +238,7 @@ DragAndDrop.prototype.setMap = function(map) {
* @param {string} text Text. * @param {string} text Text.
* @param {module:ol/format/Feature~ReadOptions} options Read options. * @param {module:ol/format/Feature~ReadOptions} options Read options.
* @private * @private
* @return {Array.<ol.Feature>} Features. * @return {Array.<module:ol/Feature~Feature>} Features.
*/ */
DragAndDrop.prototype.tryReadFeatures_ = function(format, text, options) { DragAndDrop.prototype.tryReadFeatures_ = function(format, text, options) {
try { try {
+5 -5
View File
@@ -44,7 +44,7 @@ const DragBoxEventType = {
* *
* @param {string} type The event type. * @param {string} type The event type.
* @param {module:ol/coordinate~Coordinate} coordinate The event coordinate. * @param {module:ol/coordinate~Coordinate} coordinate The event coordinate.
* @param {ol.MapBrowserEvent} mapBrowserEvent Originating event. * @param {module:ol/MapBrowserEvent~MapBrowserEvent} mapBrowserEvent Originating event.
* @extends {ol.events.Event} * @extends {ol.events.Event}
* @constructor * @constructor
* @implements {oli.DragBoxEvent} * @implements {oli.DragBoxEvent}
@@ -62,7 +62,7 @@ const DragBoxEvent = function(type, coordinate, mapBrowserEvent) {
/** /**
* @const * @const
* @type {ol.MapBrowserEvent} * @type {module:ol/MapBrowserEvent~MapBrowserEvent}
* @api * @api
*/ */
this.mapBrowserEvent = mapBrowserEvent; this.mapBrowserEvent = mapBrowserEvent;
@@ -137,7 +137,7 @@ inherits(DragBox, PointerInteraction);
/** /**
* The default condition for determining whether the boxend event * The default condition for determining whether the boxend event
* should fire. * should fire.
* @param {ol.MapBrowserEvent} mapBrowserEvent The originating MapBrowserEvent * @param {module:ol/MapBrowserEvent~MapBrowserEvent} mapBrowserEvent The originating MapBrowserEvent
* leading to the box end. * leading to the box end.
* @param {module:ol~Pixel} startPixel The starting pixel of the box. * @param {module:ol~Pixel} startPixel The starting pixel of the box.
* @param {module:ol~Pixel} endPixel The end pixel of the box. * @param {module:ol~Pixel} endPixel The end pixel of the box.
@@ -169,7 +169,7 @@ function handleDragEvent(mapBrowserEvent) {
/** /**
* Returns geometry of last drawn box. * Returns geometry of last drawn box.
* @return {ol.geom.Polygon} Geometry. * @return {module:ol/geom/Polygon~Polygon} Geometry.
* @api * @api
*/ */
DragBox.prototype.getGeometry = function() { DragBox.prototype.getGeometry = function() {
@@ -180,7 +180,7 @@ DragBox.prototype.getGeometry = function() {
/** /**
* To be overridden by child classes. * To be overridden by child classes.
* FIXME: use constructor option instead of relying on overriding. * FIXME: use constructor option instead of relying on overriding.
* @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event. * @param {module:ol/MapBrowserEvent~MapBrowserEvent} mapBrowserEvent Map browser event.
* @protected * @protected
*/ */
DragBox.prototype.onBoxEnd = UNDEFINED; DragBox.prototype.onBoxEnd = UNDEFINED;
+36 -36
View File
@@ -70,7 +70,7 @@ const DrawEventType = {
* @extends {ol.events.Event} * @extends {ol.events.Event}
* @implements {oli.DrawEvent} * @implements {oli.DrawEvent}
* @param {ol.interaction.DrawEventType} type Type. * @param {ol.interaction.DrawEventType} type Type.
* @param {ol.Feature} feature The feature drawn. * @param {module:ol/Feature~Feature} feature The feature drawn.
*/ */
const DrawEvent = function(type, feature) { const DrawEvent = function(type, feature) {
@@ -78,7 +78,7 @@ const DrawEvent = function(type, feature) {
/** /**
* The feature being drawn. * The feature being drawn.
* @type {ol.Feature} * @type {module:ol/Feature~Feature}
* @api * @api
*/ */
this.feature = feature; this.feature = feature;
@@ -145,7 +145,7 @@ const Draw = function(options) {
/** /**
* Target collection for drawn features. * Target collection for drawn features.
* @type {ol.Collection.<ol.Feature>} * @type {ol.Collection.<module:ol/Feature~Feature>}
* @private * @private
*/ */
this.features_ = options.features ? options.features : null; this.features_ = options.features ? options.features : null;
@@ -159,10 +159,10 @@ const Draw = function(options) {
/** /**
* Geometry type. * Geometry type.
* @type {ol.geom.GeometryType} * @type {module:ol/geom/GeometryType~GeometryType}
* @private * @private
*/ */
this.type_ = /** @type {ol.geom.GeometryType} */ (options.type); this.type_ = /** @type {module:ol/geom/GeometryType~GeometryType} */ (options.type);
/** /**
* Drawing mode (derived from geometry type. * Drawing mode (derived from geometry type.
@@ -211,11 +211,11 @@ const Draw = function(options) {
/** /**
* @param {!Array.<module:ol/coordinate~Coordinate>} coordinates * @param {!Array.<module:ol/coordinate~Coordinate>} coordinates
* The coordinates. * The coordinates.
* @param {ol.geom.SimpleGeometry=} opt_geometry Optional geometry. * @param {module:ol/geom/SimpleGeometry~SimpleGeometry=} opt_geometry Optional geometry.
* @return {ol.geom.SimpleGeometry} A geometry. * @return {module:ol/geom/SimpleGeometry~SimpleGeometry} A geometry.
*/ */
geometryFunction = function(coordinates, opt_geometry) { geometryFunction = function(coordinates, opt_geometry) {
const circle = opt_geometry ? /** @type {ol.geom.Circle} */ (opt_geometry) : const circle = opt_geometry ? /** @type {module:ol/geom/Circle~Circle} */ (opt_geometry) :
new Circle([NaN, NaN]); new Circle([NaN, NaN]);
const squaredLength = squaredCoordinateDistance( const squaredLength = squaredCoordinateDistance(
coordinates[0], coordinates[1]); coordinates[0], coordinates[1]);
@@ -235,8 +235,8 @@ const Draw = function(options) {
/** /**
* @param {!Array.<module:ol/coordinate~Coordinate>} coordinates * @param {!Array.<module:ol/coordinate~Coordinate>} coordinates
* The coordinates. * The coordinates.
* @param {ol.geom.SimpleGeometry=} opt_geometry Optional geometry. * @param {module:ol/geom/SimpleGeometry~SimpleGeometry=} opt_geometry Optional geometry.
* @return {ol.geom.SimpleGeometry} A geometry. * @return {module:ol/geom/SimpleGeometry~SimpleGeometry} A geometry.
*/ */
geometryFunction = function(coordinates, opt_geometry) { geometryFunction = function(coordinates, opt_geometry) {
let geometry = opt_geometry; let geometry = opt_geometry;
@@ -281,14 +281,14 @@ const Draw = function(options) {
/** /**
* Sketch feature. * Sketch feature.
* @type {ol.Feature} * @type {module:ol/Feature~Feature}
* @private * @private
*/ */
this.sketchFeature_ = null; this.sketchFeature_ = null;
/** /**
* Sketch point. * Sketch point.
* @type {ol.Feature} * @type {module:ol/Feature~Feature}
* @private * @private
*/ */
this.sketchPoint_ = null; this.sketchPoint_ = null;
@@ -302,7 +302,7 @@ const Draw = function(options) {
/** /**
* Sketch line. Used when drawing polygon. * Sketch line. Used when drawing polygon.
* @type {ol.Feature} * @type {module:ol/Feature~Feature}
* @private * @private
*/ */
this.sketchLine_ = null; this.sketchLine_ = null;
@@ -394,9 +394,9 @@ Draw.prototype.setMap = function(map) {
/** /**
* Handles the {@link ol.MapBrowserEvent map browser event} and may actually * Handles the {@link module:ol/MapBrowserEvent~MapBrowserEvent map browser event} and may actually
* draw or finish the drawing. * draw or finish the drawing.
* @param {ol.MapBrowserEvent} event Map browser event. * @param {module:ol/MapBrowserEvent~MapBrowserEvent} event Map browser event.
* @return {boolean} `false` to stop event propagation. * @return {boolean} `false` to stop event propagation.
* @this {ol.interaction.Draw} * @this {ol.interaction.Draw}
* @api * @api
@@ -521,7 +521,7 @@ function handleUpEvent(event) {
/** /**
* Handle move events. * Handle move events.
* @param {ol.MapBrowserEvent} event A move event. * @param {module:ol/MapBrowserEvent~MapBrowserEvent} event A move event.
* @return {boolean} Pass the event to other interactions. * @return {boolean} Pass the event to other interactions.
* @private * @private
*/ */
@@ -553,7 +553,7 @@ Draw.prototype.handlePointerMove_ = function(event) {
/** /**
* Determine if an event is within the snapping tolerance of the start coord. * Determine if an event is within the snapping tolerance of the start coord.
* @param {ol.MapBrowserEvent} event Event. * @param {module:ol/MapBrowserEvent~MapBrowserEvent} event Event.
* @return {boolean} The event is within the snapping tolerance of the start. * @return {boolean} The event is within the snapping tolerance of the start.
* @private * @private
*/ */
@@ -592,7 +592,7 @@ Draw.prototype.atFinish_ = function(event) {
/** /**
* @param {ol.MapBrowserEvent} event Event. * @param {module:ol/MapBrowserEvent~MapBrowserEvent} event Event.
* @private * @private
*/ */
Draw.prototype.createOrUpdateSketchPoint_ = function(event) { Draw.prototype.createOrUpdateSketchPoint_ = function(event) {
@@ -601,7 +601,7 @@ Draw.prototype.createOrUpdateSketchPoint_ = function(event) {
this.sketchPoint_ = new Feature(new Point(coordinates)); this.sketchPoint_ = new Feature(new Point(coordinates));
this.updateSketchFeatures_(); this.updateSketchFeatures_();
} else { } else {
const sketchPointGeom = /** @type {ol.geom.Point} */ (this.sketchPoint_.getGeometry()); const sketchPointGeom = /** @type {module:ol/geom/Point~Point} */ (this.sketchPoint_.getGeometry());
sketchPointGeom.setCoordinates(coordinates); sketchPointGeom.setCoordinates(coordinates);
} }
}; };
@@ -609,7 +609,7 @@ Draw.prototype.createOrUpdateSketchPoint_ = function(event) {
/** /**
* Start the drawing. * Start the drawing.
* @param {ol.MapBrowserEvent} event Event. * @param {module:ol/MapBrowserEvent~MapBrowserEvent} event Event.
* @private * @private
*/ */
Draw.prototype.startDrawing_ = function(event) { Draw.prototype.startDrawing_ = function(event) {
@@ -640,12 +640,12 @@ Draw.prototype.startDrawing_ = function(event) {
/** /**
* Modify the drawing. * Modify the drawing.
* @param {ol.MapBrowserEvent} event Event. * @param {module:ol/MapBrowserEvent~MapBrowserEvent} event Event.
* @private * @private
*/ */
Draw.prototype.modifyDrawing_ = function(event) { Draw.prototype.modifyDrawing_ = function(event) {
let coordinate = event.coordinate; let coordinate = event.coordinate;
const geometry = /** @type {ol.geom.SimpleGeometry} */ (this.sketchFeature_.getGeometry()); const geometry = /** @type {module:ol/geom/SimpleGeometry~SimpleGeometry} */ (this.sketchFeature_.getGeometry());
let coordinates, last; let coordinates, last;
if (this.mode_ === Mode.POINT) { if (this.mode_ === Mode.POINT) {
last = this.sketchCoords_; last = this.sketchCoords_;
@@ -664,7 +664,7 @@ Draw.prototype.modifyDrawing_ = function(event) {
last[1] = coordinate[1]; last[1] = coordinate[1];
this.geometryFunction_(/** @type {!Array.<module:ol/coordinate~Coordinate>} */ (this.sketchCoords_), geometry); this.geometryFunction_(/** @type {!Array.<module:ol/coordinate~Coordinate>} */ (this.sketchCoords_), geometry);
if (this.sketchPoint_) { if (this.sketchPoint_) {
const sketchPointGeom = /** @type {ol.geom.Point} */ (this.sketchPoint_.getGeometry()); const sketchPointGeom = /** @type {module:ol/geom/Point~Point} */ (this.sketchPoint_.getGeometry());
sketchPointGeom.setCoordinates(coordinate); sketchPointGeom.setCoordinates(coordinate);
} }
let sketchLineGeom; let sketchLineGeom;
@@ -674,11 +674,11 @@ Draw.prototype.modifyDrawing_ = function(event) {
this.sketchLine_ = new Feature(new LineString(null)); this.sketchLine_ = new Feature(new LineString(null));
} }
const ring = geometry.getLinearRing(0); const ring = geometry.getLinearRing(0);
sketchLineGeom = /** @type {ol.geom.LineString} */ (this.sketchLine_.getGeometry()); sketchLineGeom = /** @type {module:ol/geom/LineString~LineString} */ (this.sketchLine_.getGeometry());
sketchLineGeom.setFlatCoordinates( sketchLineGeom.setFlatCoordinates(
ring.getLayout(), ring.getFlatCoordinates()); ring.getLayout(), ring.getFlatCoordinates());
} else if (this.sketchLineCoords_) { } else if (this.sketchLineCoords_) {
sketchLineGeom = /** @type {ol.geom.LineString} */ (this.sketchLine_.getGeometry()); sketchLineGeom = /** @type {module:ol/geom/LineString~LineString} */ (this.sketchLine_.getGeometry());
sketchLineGeom.setCoordinates(this.sketchLineCoords_); sketchLineGeom.setCoordinates(this.sketchLineCoords_);
} }
this.updateSketchFeatures_(); this.updateSketchFeatures_();
@@ -687,12 +687,12 @@ Draw.prototype.modifyDrawing_ = function(event) {
/** /**
* Add a new coordinate to the drawing. * Add a new coordinate to the drawing.
* @param {ol.MapBrowserEvent} event Event. * @param {module:ol/MapBrowserEvent~MapBrowserEvent} event Event.
* @private * @private
*/ */
Draw.prototype.addToDrawing_ = function(event) { Draw.prototype.addToDrawing_ = function(event) {
const coordinate = event.coordinate; const coordinate = event.coordinate;
const geometry = /** @type {ol.geom.SimpleGeometry} */ (this.sketchFeature_.getGeometry()); const geometry = /** @type {module:ol/geom/SimpleGeometry~SimpleGeometry} */ (this.sketchFeature_.getGeometry());
let done; let done;
let coordinates; let coordinates;
if (this.mode_ === Mode.LINE_STRING) { if (this.mode_ === Mode.LINE_STRING) {
@@ -737,7 +737,7 @@ Draw.prototype.removeLastPoint = function() {
if (!this.sketchFeature_) { if (!this.sketchFeature_) {
return; return;
} }
const geometry = /** @type {ol.geom.SimpleGeometry} */ (this.sketchFeature_.getGeometry()); const geometry = /** @type {module:ol/geom/SimpleGeometry~SimpleGeometry} */ (this.sketchFeature_.getGeometry());
let coordinates, sketchLineGeom; let coordinates, sketchLineGeom;
if (this.mode_ === Mode.LINE_STRING) { if (this.mode_ === Mode.LINE_STRING) {
coordinates = this.sketchCoords_; coordinates = this.sketchCoords_;
@@ -749,7 +749,7 @@ Draw.prototype.removeLastPoint = function() {
} else if (this.mode_ === Mode.POLYGON) { } else if (this.mode_ === Mode.POLYGON) {
coordinates = this.sketchCoords_[0]; coordinates = this.sketchCoords_[0];
coordinates.splice(-2, 1); coordinates.splice(-2, 1);
sketchLineGeom = /** @type {ol.geom.LineString} */ (this.sketchLine_.getGeometry()); sketchLineGeom = /** @type {module:ol/geom/LineString~LineString} */ (this.sketchLine_.getGeometry());
sketchLineGeom.setCoordinates(coordinates); sketchLineGeom.setCoordinates(coordinates);
this.geometryFunction_(this.sketchCoords_, geometry); this.geometryFunction_(this.sketchCoords_, geometry);
} }
@@ -774,7 +774,7 @@ Draw.prototype.finishDrawing = function() {
return; return;
} }
let coordinates = this.sketchCoords_; let coordinates = this.sketchCoords_;
const geometry = /** @type {ol.geom.SimpleGeometry} */ (sketchFeature.getGeometry()); const geometry = /** @type {module:ol/geom/SimpleGeometry~SimpleGeometry} */ (sketchFeature.getGeometry());
if (this.mode_ === Mode.LINE_STRING) { if (this.mode_ === Mode.LINE_STRING) {
// remove the redundant last point // remove the redundant last point
coordinates.pop(); coordinates.pop();
@@ -810,7 +810,7 @@ Draw.prototype.finishDrawing = function() {
/** /**
* Stop drawing without adding the sketch feature to the target layer. * Stop drawing without adding the sketch feature to the target layer.
* @return {ol.Feature} The sketch feature (or null if none). * @return {module:ol/Feature~Feature} The sketch feature (or null if none).
* @private * @private
*/ */
Draw.prototype.abortDrawing_ = function() { Draw.prototype.abortDrawing_ = function() {
@@ -830,12 +830,12 @@ Draw.prototype.abortDrawing_ = function() {
* Extend an existing geometry by adding additional points. This only works * Extend an existing geometry by adding additional points. This only works
* on features with `LineString` geometries, where the interaction will * on features with `LineString` geometries, where the interaction will
* extend lines by adding points to the end of the coordinates array. * extend lines by adding points to the end of the coordinates array.
* @param {!ol.Feature} feature Feature to be extended. * @param {!module:ol/Feature~Feature} feature Feature to be extended.
* @api * @api
*/ */
Draw.prototype.extend = function(feature) { Draw.prototype.extend = function(feature) {
const geometry = feature.getGeometry(); const geometry = feature.getGeometry();
const lineString = /** @type {ol.geom.LineString} */ (geometry); const lineString = /** @type {module:ol/geom/LineString~LineString} */ (geometry);
this.sketchFeature_ = feature; this.sketchFeature_ = feature;
this.sketchCoords_ = lineString.getCoordinates(); this.sketchCoords_ = lineString.getCoordinates();
const last = this.sketchCoords_[this.sketchCoords_.length - 1]; const last = this.sketchCoords_[this.sketchCoords_.length - 1];
@@ -889,7 +889,7 @@ Draw.prototype.updateState_ = function() {
/** /**
* Create a `geometryFunction` for `type: 'Circle'` that will create a regular * Create a `geometryFunction` for `type: 'Circle'` that will create a regular
* polygon with a user specified number of sides and start angle instead of an * polygon with a user specified number of sides and start angle instead of an
* `ol.geom.Circle` geometry. * `module:ol/geom/Circle~Circle` geometry.
* @param {number=} opt_sides Number of sides of the regular polygon. Default is * @param {number=} opt_sides Number of sides of the regular polygon. Default is
* 32. * 32.
* @param {number=} opt_angle Angle of the first point in radians. 0 means East. * @param {number=} opt_angle Angle of the first point in radians. 0 means East.
@@ -906,7 +906,7 @@ export function createRegularPolygon(opt_sides, opt_angle) {
const end = coordinates[1]; const end = coordinates[1];
const radius = Math.sqrt( const radius = Math.sqrt(
squaredCoordinateDistance(center, end)); squaredCoordinateDistance(center, end));
const geometry = opt_geometry ? /** @type {ol.geom.Polygon} */ (opt_geometry) : const geometry = opt_geometry ? /** @type {module:ol/geom/Polygon~Polygon} */ (opt_geometry) :
fromCircle(new Circle(center), opt_sides); fromCircle(new Circle(center), opt_sides);
const angle = opt_angle ? opt_angle : const angle = opt_angle ? opt_angle :
Math.atan((end[1] - center[1]) / (end[0] - center[0])); Math.atan((end[1] - center[1]) / (end[0] - center[0]));
@@ -945,7 +945,7 @@ export function createBox() {
/** /**
* Get the drawing mode. The mode for mult-part geometries is the same as for * Get the drawing mode. The mode for mult-part geometries is the same as for
* their single-part cousins. * their single-part cousins.
* @param {ol.geom.GeometryType} type Geometry type. * @param {module:ol/geom/GeometryType~GeometryType} type Geometry type.
* @return {ol.interaction.Mode} Drawing mode. * @return {ol.interaction.Mode} Drawing mode.
*/ */
function getMode(type) { function getMode(type) {
+7 -7
View File
@@ -89,14 +89,14 @@ const ExtentInteraction = function(opt_options) {
/** /**
* Feature for displaying the visible extent * Feature for displaying the visible extent
* @type {ol.Feature} * @type {module:ol/Feature~Feature}
* @private * @private
*/ */
this.extentFeature_ = null; this.extentFeature_ = null;
/** /**
* Feature for displaying the visible pointer * Feature for displaying the visible pointer
* @type {ol.Feature} * @type {module:ol/Feature~Feature}
* @private * @private
*/ */
this.vertexFeature_ = null; this.vertexFeature_ = null;
@@ -151,7 +151,7 @@ const ExtentInteraction = function(opt_options) {
inherits(ExtentInteraction, PointerInteraction); inherits(ExtentInteraction, PointerInteraction);
/** /**
* @param {ol.MapBrowserEvent} mapBrowserEvent Event. * @param {module:ol/MapBrowserEvent~MapBrowserEvent} mapBrowserEvent Event.
* @return {boolean} Propagate event? * @return {boolean} Propagate event?
* @this {ol.interaction.Extent} * @this {ol.interaction.Extent}
*/ */
@@ -366,7 +366,7 @@ ExtentInteraction.prototype.snapToVertex_ = function(pixel, map) {
}; };
/** /**
* @param {ol.MapBrowserEvent} mapBrowserEvent pointer move event * @param {module:ol/MapBrowserEvent~MapBrowserEvent} mapBrowserEvent pointer move event
* @private * @private
*/ */
ExtentInteraction.prototype.handlePointerMove_ = function(mapBrowserEvent) { ExtentInteraction.prototype.handlePointerMove_ = function(mapBrowserEvent) {
@@ -382,7 +382,7 @@ ExtentInteraction.prototype.handlePointerMove_ = function(mapBrowserEvent) {
/** /**
* @param {module:ol/extent~Extent} extent extent * @param {module:ol/extent~Extent} extent extent
* @returns {ol.Feature} extent as featrue * @returns {module:ol/Feature~Feature} extent as featrue
* @private * @private
*/ */
ExtentInteraction.prototype.createOrUpdateExtentFeature_ = function(extent) { ExtentInteraction.prototype.createOrUpdateExtentFeature_ = function(extent) {
@@ -409,7 +409,7 @@ ExtentInteraction.prototype.createOrUpdateExtentFeature_ = function(extent) {
/** /**
* @param {module:ol/coordinate~Coordinate} vertex location of feature * @param {module:ol/coordinate~Coordinate} vertex location of feature
* @returns {ol.Feature} vertex as feature * @returns {module:ol/Feature~Feature} vertex as feature
* @private * @private
*/ */
ExtentInteraction.prototype.createOrUpdatePointerFeature_ = function(vertex) { ExtentInteraction.prototype.createOrUpdatePointerFeature_ = function(vertex) {
@@ -419,7 +419,7 @@ ExtentInteraction.prototype.createOrUpdatePointerFeature_ = function(vertex) {
this.vertexFeature_ = vertexFeature; this.vertexFeature_ = vertexFeature;
this.vertexOverlay_.getSource().addFeature(vertexFeature); this.vertexOverlay_.getSource().addFeature(vertexFeature);
} else { } else {
const geometry = /** @type {ol.geom.Point} */ (vertexFeature.getGeometry()); const geometry = /** @type {module:ol/geom/Point~Point} */ (vertexFeature.getGeometry());
geometry.setCoordinates(vertex); geometry.setCoordinates(vertex);
} }
return vertexFeature; return vertexFeature;
+3 -3
View File
@@ -35,7 +35,7 @@ const KeyboardPan = function(opt_options) {
/** /**
* @private * @private
* @param {ol.MapBrowserEvent} mapBrowserEvent Browser event. * @param {module:ol/MapBrowserEvent~MapBrowserEvent} mapBrowserEvent Browser event.
* @return {boolean} Combined condition result. * @return {boolean} Combined condition result.
*/ */
this.defaultCondition_ = function(mapBrowserEvent) { this.defaultCondition_ = function(mapBrowserEvent) {
@@ -68,10 +68,10 @@ const KeyboardPan = function(opt_options) {
inherits(KeyboardPan, Interaction); inherits(KeyboardPan, Interaction);
/** /**
* Handles the {@link ol.MapBrowserEvent map browser event} if it was a * Handles the {@link module:ol/MapBrowserEvent~MapBrowserEvent map browser event} if it was a
* `KeyEvent`, and decides the direction to pan to (if an arrow key was * `KeyEvent`, and decides the direction to pan to (if an arrow key was
* pressed). * pressed).
* @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event. * @param {module:ol/MapBrowserEvent~MapBrowserEvent} mapBrowserEvent Map browser event.
* @return {boolean} `false` to stop event propagation. * @return {boolean} `false` to stop event propagation.
* @this {ol.interaction.KeyboardPan} * @this {ol.interaction.KeyboardPan}
*/ */
+2 -2
View File
@@ -55,10 +55,10 @@ inherits(KeyboardZoom, Interaction);
/** /**
* Handles the {@link ol.MapBrowserEvent map browser event} if it was a * Handles the {@link module:ol/MapBrowserEvent~MapBrowserEvent map browser event} if it was a
* `KeyEvent`, and decides whether to zoom in or out (depending on whether the * `KeyEvent`, and decides whether to zoom in or out (depending on whether the
* key pressed was '+' or '-'). * key pressed was '+' or '-').
* @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event. * @param {module:ol/MapBrowserEvent~MapBrowserEvent} mapBrowserEvent Map browser event.
* @return {boolean} `false` to stop event propagation. * @return {boolean} `false` to stop event propagation.
* @this {ol.interaction.KeyboardZoom} * @this {ol.interaction.KeyboardZoom}
*/ */
+39 -39
View File
@@ -52,7 +52,7 @@ const ModifyEventType = {
* @extends {ol.events.Event} * @extends {ol.events.Event}
* @implements {oli.ModifyEvent} * @implements {oli.ModifyEvent}
* @param {ModifyEventType} type Type. * @param {ModifyEventType} type Type.
* @param {ol.Collection.<ol.Feature>} features The features modified. * @param {ol.Collection.<module:ol/Feature~Feature>} features The features modified.
* @param {ol.MapBrowserPointerEvent} mapBrowserPointerEvent Associated * @param {ol.MapBrowserPointerEvent} mapBrowserPointerEvent Associated
* {@link ol.MapBrowserPointerEvent}. * {@link ol.MapBrowserPointerEvent}.
*/ */
@@ -62,14 +62,14 @@ export const ModifyEvent = function(type, features, mapBrowserPointerEvent) {
/** /**
* The features being modified. * The features being modified.
* @type {ol.Collection.<ol.Feature>} * @type {ol.Collection.<module:ol/Feature~Feature>}
* @api * @api
*/ */
this.features = features; this.features = features;
/** /**
* Associated {@link ol.MapBrowserEvent}. * Associated {@link module:ol/MapBrowserEvent~MapBrowserEvent}.
* @type {ol.MapBrowserEvent} * @type {module:ol/MapBrowserEvent~MapBrowserEvent}
* @api * @api
*/ */
this.mapBrowserEvent = mapBrowserPointerEvent; this.mapBrowserEvent = mapBrowserPointerEvent;
@@ -115,7 +115,7 @@ const Modify = function(options) {
/** /**
* @private * @private
* @param {ol.MapBrowserEvent} mapBrowserEvent Browser event. * @param {module:ol/MapBrowserEvent~MapBrowserEvent} mapBrowserEvent Browser event.
* @return {boolean} Combined condition result. * @return {boolean} Combined condition result.
*/ */
this.defaultDeleteCondition_ = function(mapBrowserEvent) { this.defaultDeleteCondition_ = function(mapBrowserEvent) {
@@ -138,7 +138,7 @@ const Modify = function(options) {
/** /**
* Editing vertex. * Editing vertex.
* @type {ol.Feature} * @type {module:ol/Feature~Feature}
* @private * @private
*/ */
this.vertexFeature_ = null; this.vertexFeature_ = null;
@@ -223,7 +223,7 @@ const Modify = function(options) {
/** /**
* @const * @const
* @private * @private
* @type {!Object.<string, function(ol.Feature, ol.geom.Geometry)>} * @type {!Object.<string, function(module:ol/Feature~Feature, module:ol/geom/Geometry~Geometry)>}
*/ */
this.SEGMENT_WRITERS_ = { this.SEGMENT_WRITERS_ = {
'Point': this.writePointGeometry_, 'Point': this.writePointGeometry_,
@@ -260,7 +260,7 @@ const Modify = function(options) {
} }
/** /**
* @type {ol.Collection.<ol.Feature>} * @type {ol.Collection.<module:ol/Feature~Feature>}
* @private * @private
*/ */
this.features_ = features; this.features_ = features;
@@ -298,7 +298,7 @@ const CIRCLE_CIRCUMFERENCE_INDEX = 1;
/** /**
* @param {ol.Feature} feature Feature. * @param {module:ol/Feature~Feature} feature Feature.
* @private * @private
*/ */
Modify.prototype.addFeature_ = function(feature) { Modify.prototype.addFeature_ = function(feature) {
@@ -329,7 +329,7 @@ Modify.prototype.willModifyFeatures_ = function(evt) {
/** /**
* @param {ol.Feature} feature Feature. * @param {module:ol/Feature~Feature} feature Feature.
* @private * @private
*/ */
Modify.prototype.removeFeature_ = function(feature) { Modify.prototype.removeFeature_ = function(feature) {
@@ -346,7 +346,7 @@ Modify.prototype.removeFeature_ = function(feature) {
/** /**
* @param {ol.Feature} feature Feature. * @param {module:ol/Feature~Feature} feature Feature.
* @private * @private
*/ */
Modify.prototype.removeFeatureSegmentData_ = function(feature) { Modify.prototype.removeFeatureSegmentData_ = function(feature) {
@@ -415,7 +415,7 @@ Modify.prototype.handleSourceRemove_ = function(event) {
* @private * @private
*/ */
Modify.prototype.handleFeatureAdd_ = function(evt) { Modify.prototype.handleFeatureAdd_ = function(evt) {
this.addFeature_(/** @type {ol.Feature} */ (evt.element)); this.addFeature_(/** @type {module:ol/Feature~Feature} */ (evt.element));
}; };
@@ -425,7 +425,7 @@ Modify.prototype.handleFeatureAdd_ = function(evt) {
*/ */
Modify.prototype.handleFeatureChange_ = function(evt) { Modify.prototype.handleFeatureChange_ = function(evt) {
if (!this.changingFeature_) { if (!this.changingFeature_) {
const feature = /** @type {ol.Feature} */ (evt.target); const feature = /** @type {module:ol/Feature~Feature} */ (evt.target);
this.removeFeature_(feature); this.removeFeature_(feature);
this.addFeature_(feature); this.addFeature_(feature);
} }
@@ -437,14 +437,14 @@ Modify.prototype.handleFeatureChange_ = function(evt) {
* @private * @private
*/ */
Modify.prototype.handleFeatureRemove_ = function(evt) { Modify.prototype.handleFeatureRemove_ = function(evt) {
const feature = /** @type {ol.Feature} */ (evt.element); const feature = /** @type {module:ol/Feature~Feature} */ (evt.element);
this.removeFeature_(feature); this.removeFeature_(feature);
}; };
/** /**
* @param {ol.Feature} feature Feature * @param {module:ol/Feature~Feature} feature Feature
* @param {ol.geom.Point} geometry Geometry. * @param {module:ol/geom/Point~Point} geometry Geometry.
* @private * @private
*/ */
Modify.prototype.writePointGeometry_ = function(feature, geometry) { Modify.prototype.writePointGeometry_ = function(feature, geometry) {
@@ -459,8 +459,8 @@ Modify.prototype.writePointGeometry_ = function(feature, geometry) {
/** /**
* @param {ol.Feature} feature Feature * @param {module:ol/Feature~Feature} feature Feature
* @param {ol.geom.MultiPoint} geometry Geometry. * @param {module:ol/geom/MultiPoint~MultiPoint} geometry Geometry.
* @private * @private
*/ */
Modify.prototype.writeMultiPointGeometry_ = function(feature, geometry) { Modify.prototype.writeMultiPointGeometry_ = function(feature, geometry) {
@@ -480,8 +480,8 @@ Modify.prototype.writeMultiPointGeometry_ = function(feature, geometry) {
/** /**
* @param {ol.Feature} feature Feature * @param {module:ol/Feature~Feature} feature Feature
* @param {ol.geom.LineString} geometry Geometry. * @param {module:ol/geom/LineString~LineString} geometry Geometry.
* @private * @private
*/ */
Modify.prototype.writeLineStringGeometry_ = function(feature, geometry) { Modify.prototype.writeLineStringGeometry_ = function(feature, geometry) {
@@ -500,8 +500,8 @@ Modify.prototype.writeLineStringGeometry_ = function(feature, geometry) {
/** /**
* @param {ol.Feature} feature Feature * @param {module:ol/Feature~Feature} feature Feature
* @param {ol.geom.MultiLineString} geometry Geometry. * @param {module:ol/geom/MultiLineString~MultiLineString} geometry Geometry.
* @private * @private
*/ */
Modify.prototype.writeMultiLineStringGeometry_ = function(feature, geometry) { Modify.prototype.writeMultiLineStringGeometry_ = function(feature, geometry) {
@@ -524,8 +524,8 @@ Modify.prototype.writeMultiLineStringGeometry_ = function(feature, geometry) {
/** /**
* @param {ol.Feature} feature Feature * @param {module:ol/Feature~Feature} feature Feature
* @param {ol.geom.Polygon} geometry Geometry. * @param {module:ol/geom/Polygon~Polygon} geometry Geometry.
* @private * @private
*/ */
Modify.prototype.writePolygonGeometry_ = function(feature, geometry) { Modify.prototype.writePolygonGeometry_ = function(feature, geometry) {
@@ -548,8 +548,8 @@ Modify.prototype.writePolygonGeometry_ = function(feature, geometry) {
/** /**
* @param {ol.Feature} feature Feature * @param {module:ol/Feature~Feature} feature Feature
* @param {ol.geom.MultiPolygon} geometry Geometry. * @param {module:ol/geom/MultiPolygon~MultiPolygon} geometry Geometry.
* @private * @private
*/ */
Modify.prototype.writeMultiPolygonGeometry_ = function(feature, geometry) { Modify.prototype.writeMultiPolygonGeometry_ = function(feature, geometry) {
@@ -581,8 +581,8 @@ Modify.prototype.writeMultiPolygonGeometry_ = function(feature, geometry) {
* {@link CIRCLE_CIRCUMFERENCE_INDEX} is * {@link CIRCLE_CIRCUMFERENCE_INDEX} is
* the circumference, and is not a line segment. * the circumference, and is not a line segment.
* *
* @param {ol.Feature} feature Feature. * @param {module:ol/Feature~Feature} feature Feature.
* @param {ol.geom.Circle} geometry Geometry. * @param {module:ol/geom/Circle~Circle} geometry Geometry.
* @private * @private
*/ */
Modify.prototype.writeCircleGeometry_ = function(feature, geometry) { Modify.prototype.writeCircleGeometry_ = function(feature, geometry) {
@@ -607,8 +607,8 @@ Modify.prototype.writeCircleGeometry_ = function(feature, geometry) {
/** /**
* @param {ol.Feature} feature Feature * @param {module:ol/Feature~Feature} feature Feature
* @param {ol.geom.GeometryCollection} geometry Geometry. * @param {module:ol/geom/GeometryCollection~GeometryCollection} geometry Geometry.
* @private * @private
*/ */
Modify.prototype.writeGeometryCollectionGeometry_ = function(feature, geometry) { Modify.prototype.writeGeometryCollectionGeometry_ = function(feature, geometry) {
@@ -621,7 +621,7 @@ Modify.prototype.writeGeometryCollectionGeometry_ = function(feature, geometry)
/** /**
* @param {module:ol/coordinate~Coordinate} coordinates Coordinates. * @param {module:ol/coordinate~Coordinate} coordinates Coordinates.
* @return {ol.Feature} Vertex feature. * @return {module:ol/Feature~Feature} Vertex feature.
* @private * @private
*/ */
Modify.prototype.createOrUpdateVertexFeature_ = function(coordinates) { Modify.prototype.createOrUpdateVertexFeature_ = function(coordinates) {
@@ -631,7 +631,7 @@ Modify.prototype.createOrUpdateVertexFeature_ = function(coordinates) {
this.vertexFeature_ = vertexFeature; this.vertexFeature_ = vertexFeature;
this.overlay_.getSource().addFeature(vertexFeature); this.overlay_.getSource().addFeature(vertexFeature);
} else { } else {
const geometry = /** @type {ol.geom.Point} */ (vertexFeature.getGeometry()); const geometry = /** @type {module:ol/geom/Point~Point} */ (vertexFeature.getGeometry());
geometry.setCoordinates(coordinates); geometry.setCoordinates(coordinates);
} }
return vertexFeature; return vertexFeature;
@@ -664,7 +664,7 @@ function handleDownEvent(evt) {
const vertexFeature = this.vertexFeature_; const vertexFeature = this.vertexFeature_;
if (vertexFeature) { if (vertexFeature) {
const insertVertices = []; const insertVertices = [];
const geometry = /** @type {ol.geom.Point} */ (vertexFeature.getGeometry()); const geometry = /** @type {module:ol/geom/Point~Point} */ (vertexFeature.getGeometry());
const vertex = geometry.getCoordinates(); const vertex = geometry.getCoordinates();
const vertexExtent = boundingExtent([vertex]); const vertexExtent = boundingExtent([vertex]);
const segmentDataMatches = this.rBush_.getInExtent(vertexExtent); const segmentDataMatches = this.rBush_.getInExtent(vertexExtent);
@@ -831,9 +831,9 @@ function handleUpEvent(evt) {
/** /**
* Handles the {@link ol.MapBrowserEvent map browser event} and may modify the * Handles the {@link module:ol/MapBrowserEvent~MapBrowserEvent map browser event} and may modify the
* geometry. * geometry.
* @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event. * @param {module:ol/MapBrowserEvent~MapBrowserEvent} mapBrowserEvent Map browser event.
* @return {boolean} `false` to stop event propagation. * @return {boolean} `false` to stop event propagation.
* @this {ol.interaction.Modify} * @this {ol.interaction.Modify}
*/ */
@@ -866,7 +866,7 @@ function handleEvent(mapBrowserEvent) {
/** /**
* @param {ol.MapBrowserEvent} evt Event. * @param {module:ol/MapBrowserEvent~MapBrowserEvent} evt Event.
* @private * @private
*/ */
Modify.prototype.handlePointerMove_ = function(evt) { Modify.prototype.handlePointerMove_ = function(evt) {
@@ -956,7 +956,7 @@ function pointDistanceToSegmentDataSquared(pointCoordinates, segmentData) {
const geometry = segmentData.geometry; const geometry = segmentData.geometry;
if (geometry.getType() === GeometryType.CIRCLE) { if (geometry.getType() === GeometryType.CIRCLE) {
const circleGeometry = /** @type {ol.geom.Circle} */ (geometry); const circleGeometry = /** @type {module:ol/geom/Circle~Circle} */ (geometry);
if (segmentData.index === CIRCLE_CIRCUMFERENCE_INDEX) { if (segmentData.index === CIRCLE_CIRCUMFERENCE_INDEX) {
const distanceToCenterSquared = const distanceToCenterSquared =
@@ -1191,7 +1191,7 @@ Modify.prototype.removeVertex_ = function() {
/** /**
* @param {ol.geom.SimpleGeometry} geometry Geometry. * @param {module:ol/geom/SimpleGeometry~SimpleGeometry} geometry Geometry.
* @param {Array} coordinates Coordinates. * @param {Array} coordinates Coordinates.
* @private * @private
*/ */
@@ -1203,7 +1203,7 @@ Modify.prototype.setGeometryCoordinates_ = function(geometry, coordinates) {
/** /**
* @param {ol.geom.SimpleGeometry} geometry Geometry. * @param {module:ol/geom/SimpleGeometry~SimpleGeometry} geometry Geometry.
* @param {number} index Index. * @param {number} index Index.
* @param {Array.<number>|undefined} depth Depth. * @param {Array.<number>|undefined} depth Depth.
* @param {number} delta Delta (1 or -1). * @param {number} delta Delta (1 or -1).
+2 -2
View File
@@ -136,9 +136,9 @@ inherits(MouseWheelZoom, Interaction);
/** /**
* Handles the {@link ol.MapBrowserEvent map browser event} (if it was a * Handles the {@link module:ol/MapBrowserEvent~MapBrowserEvent map browser event} (if it was a
* mousewheel-event) and eventually zooms the map. * mousewheel-event) and eventually zooms the map.
* @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event. * @param {module:ol/MapBrowserEvent~MapBrowserEvent} mapBrowserEvent Map browser event.
* @return {boolean} Allow event propagation. * @return {boolean} Allow event propagation.
* @this {ol.interaction.MouseWheelZoom} * @this {ol.interaction.MouseWheelZoom}
*/ */
+2 -2
View File
@@ -166,10 +166,10 @@ PointerInteraction.prototype.updateTrackedPointers_ = function(mapBrowserEvent)
/** /**
* Handles the {@link ol.MapBrowserEvent map browser event} and may call into * Handles the {@link module:ol/MapBrowserEvent~MapBrowserEvent map browser event} and may call into
* other functions, if event sequences like e.g. 'drag' or 'down-up' etc. are * other functions, if event sequences like e.g. 'drag' or 'down-up' etc. are
* detected. * detected.
* @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event. * @param {module:ol/MapBrowserEvent~MapBrowserEvent} mapBrowserEvent Map browser event.
* @return {boolean} `false` to stop event propagation. * @return {boolean} `false` to stop event propagation.
* @this {ol.interaction.Pointer} * @this {ol.interaction.Pointer}
* @api * @api
+18 -18
View File
@@ -35,10 +35,10 @@ const SelectEventType = {
* this type. * this type.
* *
* @param {SelectEventType} type The event type. * @param {SelectEventType} type The event type.
* @param {Array.<ol.Feature>} selected Selected features. * @param {Array.<module:ol/Feature~Feature>} selected Selected features.
* @param {Array.<ol.Feature>} deselected Deselected features. * @param {Array.<module:ol/Feature~Feature>} deselected Deselected features.
* @param {ol.MapBrowserEvent} mapBrowserEvent Associated * @param {module:ol/MapBrowserEvent~MapBrowserEvent} mapBrowserEvent Associated
* {@link ol.MapBrowserEvent}. * {@link module:ol/MapBrowserEvent~MapBrowserEvent}.
* @implements {oli.SelectEvent} * @implements {oli.SelectEvent}
* @extends {ol.events.Event} * @extends {ol.events.Event}
* @constructor * @constructor
@@ -48,21 +48,21 @@ const SelectEvent = function(type, selected, deselected, mapBrowserEvent) {
/** /**
* Selected features array. * Selected features array.
* @type {Array.<ol.Feature>} * @type {Array.<module:ol/Feature~Feature>}
* @api * @api
*/ */
this.selected = selected; this.selected = selected;
/** /**
* Deselected features array. * Deselected features array.
* @type {Array.<ol.Feature>} * @type {Array.<module:ol/Feature~Feature>}
* @api * @api
*/ */
this.deselected = deselected; this.deselected = deselected;
/** /**
* Associated {@link ol.MapBrowserEvent}. * Associated {@link module:ol/MapBrowserEvent~MapBrowserEvent}.
* @type {ol.MapBrowserEvent} * @type {module:ol/MapBrowserEvent~MapBrowserEvent}
* @api * @api
*/ */
this.mapBrowserEvent = mapBrowserEvent; this.mapBrowserEvent = mapBrowserEvent;
@@ -198,7 +198,7 @@ inherits(Select, Interaction);
/** /**
* @param {ol.Feature|ol.render.Feature} feature Feature. * @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
* @param {ol.layer.Layer} layer Layer. * @param {ol.layer.Layer} layer Layer.
* @private * @private
*/ */
@@ -210,7 +210,7 @@ Select.prototype.addFeatureLayerAssociation_ = function(feature, layer) {
/** /**
* Get the selected features. * Get the selected features.
* @return {ol.Collection.<ol.Feature>} Features collection. * @return {ol.Collection.<module:ol/Feature~Feature>} Features collection.
* @api * @api
*/ */
Select.prototype.getFeatures = function() { Select.prototype.getFeatures = function() {
@@ -233,7 +233,7 @@ Select.prototype.getHitTolerance = function() {
* the (last) selected feature. Note that this will not work with any * the (last) selected feature. Note that this will not work with any
* programmatic method like pushing features to * programmatic method like pushing features to
* {@link ol.interaction.Select#getFeatures collection}. * {@link ol.interaction.Select#getFeatures collection}.
* @param {ol.Feature|ol.render.Feature} feature Feature * @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature
* @return {ol.layer.Vector} Layer. * @return {ol.layer.Vector} Layer.
* @api * @api
*/ */
@@ -244,9 +244,9 @@ Select.prototype.getLayer = function(feature) {
/** /**
* Handles the {@link ol.MapBrowserEvent map browser event} and may change the * Handles the {@link module:ol/MapBrowserEvent~MapBrowserEvent map browser event} and may change the
* selected state of features. * selected state of features.
* @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event. * @param {module:ol/MapBrowserEvent~MapBrowserEvent} mapBrowserEvent Map browser event.
* @return {boolean} `false` to stop event propagation. * @return {boolean} `false` to stop event propagation.
* @this {ol.interaction.Select} * @this {ol.interaction.Select}
*/ */
@@ -270,7 +270,7 @@ function handleEvent(mapBrowserEvent) {
map.forEachFeatureAtPixel(mapBrowserEvent.pixel, map.forEachFeatureAtPixel(mapBrowserEvent.pixel,
( (
/** /**
* @param {ol.Feature|ol.render.Feature} feature Feature. * @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
* @param {ol.layer.Layer} layer Layer. * @param {ol.layer.Layer} layer Layer.
* @return {boolean|undefined} Continue to iterate over the features. * @return {boolean|undefined} Continue to iterate over the features.
*/ */
@@ -303,7 +303,7 @@ function handleEvent(mapBrowserEvent) {
map.forEachFeatureAtPixel(mapBrowserEvent.pixel, map.forEachFeatureAtPixel(mapBrowserEvent.pixel,
( (
/** /**
* @param {ol.Feature|ol.render.Feature} feature Feature. * @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
* @param {ol.layer.Layer} layer Layer. * @param {ol.layer.Layer} layer Layer.
* @return {boolean|undefined} Continue to iterate over the features. * @return {boolean|undefined} Continue to iterate over the features.
*/ */
@@ -394,7 +394,7 @@ function getDefaultStyleFunction() {
Select.prototype.addFeature_ = function(evt) { Select.prototype.addFeature_ = function(evt) {
const map = this.getMap(); const map = this.getMap();
if (map) { if (map) {
map.skipFeature(/** @type {ol.Feature} */ (evt.element)); map.skipFeature(/** @type {module:ol/Feature~Feature} */ (evt.element));
} }
}; };
@@ -406,13 +406,13 @@ Select.prototype.addFeature_ = function(evt) {
Select.prototype.removeFeature_ = function(evt) { Select.prototype.removeFeature_ = function(evt) {
const map = this.getMap(); const map = this.getMap();
if (map) { if (map) {
map.unskipFeature(/** @type {ol.Feature} */ (evt.element)); map.unskipFeature(/** @type {module:ol/Feature~Feature} */ (evt.element));
} }
}; };
/** /**
* @param {ol.Feature|ol.render.Feature} feature Feature. * @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
* @private * @private
*/ */
Select.prototype.removeFeatureLayerAssociation_ = function(feature) { Select.prototype.removeFeatureLayerAssociation_ = function(feature) {
+31 -31
View File
@@ -68,7 +68,7 @@ const Snap = function(opt_options) {
this.edge_ = options.edge !== undefined ? options.edge : true; this.edge_ = options.edge !== undefined ? options.edge : true;
/** /**
* @type {ol.Collection.<ol.Feature>} * @type {ol.Collection.<module:ol/Feature~Feature>}
* @private * @private
*/ */
this.features_ = options.features ? options.features : null; this.features_ = options.features ? options.features : null;
@@ -97,7 +97,7 @@ const Snap = function(opt_options) {
* If a feature geometry changes while a pointer drag|move event occurs, the * If a feature geometry changes while a pointer drag|move event occurs, the
* feature doesn't get updated right away. It will be at the next 'pointerup' * feature doesn't get updated right away. It will be at the next 'pointerup'
* event fired. * event fired.
* @type {!Object.<number, ol.Feature>} * @type {!Object.<number, module:ol/Feature~Feature>}
* @private * @private
*/ */
this.pendingFeatures_ = {}; this.pendingFeatures_ = {};
@@ -134,7 +134,7 @@ const Snap = function(opt_options) {
/** /**
* @const * @const
* @private * @private
* @type {Object.<string, function(ol.Feature, ol.geom.Geometry)>} * @type {Object.<string, function(module:ol/Feature~Feature, module:ol/geom/Geometry~Geometry)>}
*/ */
this.SEGMENT_WRITERS_ = { this.SEGMENT_WRITERS_ = {
'Point': this.writePointGeometry_, 'Point': this.writePointGeometry_,
@@ -154,7 +154,7 @@ inherits(Snap, PointerInteraction);
/** /**
* Add a feature to the collection of features that we may snap to. * Add a feature to the collection of features that we may snap to.
* @param {ol.Feature} feature Feature. * @param {module:ol/Feature~Feature} feature Feature.
* @param {boolean=} opt_listen Whether to listen to the feature change or not * @param {boolean=} opt_listen Whether to listen to the feature change or not
* Defaults to `true`. * Defaults to `true`.
* @api * @api
@@ -181,7 +181,7 @@ Snap.prototype.addFeature = function(feature, opt_listen) {
/** /**
* @param {ol.Feature} feature Feature. * @param {module:ol/Feature~Feature} feature Feature.
* @private * @private
*/ */
Snap.prototype.forEachFeatureAdd_ = function(feature) { Snap.prototype.forEachFeatureAdd_ = function(feature) {
@@ -190,7 +190,7 @@ Snap.prototype.forEachFeatureAdd_ = function(feature) {
/** /**
* @param {ol.Feature} feature Feature. * @param {module:ol/Feature~Feature} feature Feature.
* @private * @private
*/ */
Snap.prototype.forEachFeatureRemove_ = function(feature) { Snap.prototype.forEachFeatureRemove_ = function(feature) {
@@ -199,7 +199,7 @@ Snap.prototype.forEachFeatureRemove_ = function(feature) {
/** /**
* @return {ol.Collection.<ol.Feature>|Array.<ol.Feature>} Features. * @return {ol.Collection.<module:ol/Feature~Feature>|Array.<module:ol/Feature~Feature>} Features.
* @private * @private
*/ */
Snap.prototype.getFeatures_ = function() { Snap.prototype.getFeatures_ = function() {
@@ -209,7 +209,7 @@ Snap.prototype.getFeatures_ = function() {
} else if (this.source_) { } else if (this.source_) {
features = this.source_.getFeatures(); features = this.source_.getFeatures();
} }
return /** @type {!Array.<ol.Feature>|!ol.Collection.<ol.Feature>} */ (features); return /** @type {!Array.<module:ol/Feature~Feature>|!ol.Collection.<module:ol/Feature~Feature>} */ (features);
}; };
@@ -224,7 +224,7 @@ Snap.prototype.handleFeatureAdd_ = function(evt) {
} else if (evt instanceof CollectionEvent) { } else if (evt instanceof CollectionEvent) {
feature = evt.element; feature = evt.element;
} }
this.addFeature(/** @type {ol.Feature} */ (feature)); this.addFeature(/** @type {module:ol/Feature~Feature} */ (feature));
}; };
@@ -239,7 +239,7 @@ Snap.prototype.handleFeatureRemove_ = function(evt) {
} else if (evt instanceof CollectionEvent) { } else if (evt instanceof CollectionEvent) {
feature = evt.element; feature = evt.element;
} }
this.removeFeature(/** @type {ol.Feature} */ (feature)); this.removeFeature(/** @type {module:ol/Feature~Feature} */ (feature));
}; };
@@ -248,7 +248,7 @@ Snap.prototype.handleFeatureRemove_ = function(evt) {
* @private * @private
*/ */
Snap.prototype.handleFeatureChange_ = function(evt) { Snap.prototype.handleFeatureChange_ = function(evt) {
const feature = /** @type {ol.Feature} */ (evt.target); const feature = /** @type {module:ol/Feature~Feature} */ (evt.target);
if (this.handlingDownUpSequence) { if (this.handlingDownUpSequence) {
const uid = getUid(feature); const uid = getUid(feature);
if (!(uid in this.pendingFeatures_)) { if (!(uid in this.pendingFeatures_)) {
@@ -262,7 +262,7 @@ Snap.prototype.handleFeatureChange_ = function(evt) {
/** /**
* Remove a feature from the collection of features that we may snap to. * Remove a feature from the collection of features that we may snap to.
* @param {ol.Feature} feature Feature * @param {module:ol/Feature~Feature} feature Feature
* @param {boolean=} opt_unlisten Whether to unlisten to the feature change * @param {boolean=} opt_unlisten Whether to unlisten to the feature change
* or not. Defaults to `true`. * or not. Defaults to `true`.
* @api * @api
@@ -383,7 +383,7 @@ Snap.prototype.snapTo = function(pixel, pixelCoordinate, map) {
} else if (this.edge_) { } else if (this.edge_) {
if (isCircle) { if (isCircle) {
vertex = closestOnCircle(pixelCoordinate, vertex = closestOnCircle(pixelCoordinate,
/** @type {ol.geom.Circle} */ (segments[0].feature.getGeometry())); /** @type {module:ol/geom/Circle~Circle} */ (segments[0].feature.getGeometry()));
} else { } else {
vertex = closestOnSegment(pixelCoordinate, closestSegment); vertex = closestOnSegment(pixelCoordinate, closestSegment);
} }
@@ -417,7 +417,7 @@ Snap.prototype.snapTo = function(pixel, pixelCoordinate, map) {
/** /**
* @param {ol.Feature} feature Feature * @param {module:ol/Feature~Feature} feature Feature
* @private * @private
*/ */
Snap.prototype.updateFeature_ = function(feature) { Snap.prototype.updateFeature_ = function(feature) {
@@ -427,8 +427,8 @@ Snap.prototype.updateFeature_ = function(feature) {
/** /**
* @param {ol.Feature} feature Feature * @param {module:ol/Feature~Feature} feature Feature
* @param {ol.geom.Circle} geometry Geometry. * @param {module:ol/geom/Circle~Circle} geometry Geometry.
* @private * @private
*/ */
Snap.prototype.writeCircleGeometry_ = function(feature, geometry) { Snap.prototype.writeCircleGeometry_ = function(feature, geometry) {
@@ -446,8 +446,8 @@ Snap.prototype.writeCircleGeometry_ = function(feature, geometry) {
/** /**
* @param {ol.Feature} feature Feature * @param {module:ol/Feature~Feature} feature Feature
* @param {ol.geom.GeometryCollection} geometry Geometry. * @param {module:ol/geom/GeometryCollection~GeometryCollection} geometry Geometry.
* @private * @private
*/ */
Snap.prototype.writeGeometryCollectionGeometry_ = function(feature, geometry) { Snap.prototype.writeGeometryCollectionGeometry_ = function(feature, geometry) {
@@ -462,8 +462,8 @@ Snap.prototype.writeGeometryCollectionGeometry_ = function(feature, geometry) {
/** /**
* @param {ol.Feature} feature Feature * @param {module:ol/Feature~Feature} feature Feature
* @param {ol.geom.LineString} geometry Geometry. * @param {module:ol/geom/LineString~LineString} geometry Geometry.
* @private * @private
*/ */
Snap.prototype.writeLineStringGeometry_ = function(feature, geometry) { Snap.prototype.writeLineStringGeometry_ = function(feature, geometry) {
@@ -480,8 +480,8 @@ Snap.prototype.writeLineStringGeometry_ = function(feature, geometry) {
/** /**
* @param {ol.Feature} feature Feature * @param {module:ol/Feature~Feature} feature Feature
* @param {ol.geom.MultiLineString} geometry Geometry. * @param {module:ol/geom/MultiLineString~MultiLineString} geometry Geometry.
* @private * @private
*/ */
Snap.prototype.writeMultiLineStringGeometry_ = function(feature, geometry) { Snap.prototype.writeMultiLineStringGeometry_ = function(feature, geometry) {
@@ -501,8 +501,8 @@ Snap.prototype.writeMultiLineStringGeometry_ = function(feature, geometry) {
/** /**
* @param {ol.Feature} feature Feature * @param {module:ol/Feature~Feature} feature Feature
* @param {ol.geom.MultiPoint} geometry Geometry. * @param {module:ol/geom/MultiPoint~MultiPoint} geometry Geometry.
* @private * @private
*/ */
Snap.prototype.writeMultiPointGeometry_ = function(feature, geometry) { Snap.prototype.writeMultiPointGeometry_ = function(feature, geometry) {
@@ -519,8 +519,8 @@ Snap.prototype.writeMultiPointGeometry_ = function(feature, geometry) {
/** /**
* @param {ol.Feature} feature Feature * @param {module:ol/Feature~Feature} feature Feature
* @param {ol.geom.MultiPolygon} geometry Geometry. * @param {module:ol/geom/MultiPolygon~MultiPolygon} geometry Geometry.
* @private * @private
*/ */
Snap.prototype.writeMultiPolygonGeometry_ = function(feature, geometry) { Snap.prototype.writeMultiPolygonGeometry_ = function(feature, geometry) {
@@ -543,8 +543,8 @@ Snap.prototype.writeMultiPolygonGeometry_ = function(feature, geometry) {
/** /**
* @param {ol.Feature} feature Feature * @param {module:ol/Feature~Feature} feature Feature
* @param {ol.geom.Point} geometry Geometry. * @param {module:ol/geom/Point~Point} geometry Geometry.
* @private * @private
*/ */
Snap.prototype.writePointGeometry_ = function(feature, geometry) { Snap.prototype.writePointGeometry_ = function(feature, geometry) {
@@ -558,8 +558,8 @@ Snap.prototype.writePointGeometry_ = function(feature, geometry) {
/** /**
* @param {ol.Feature} feature Feature * @param {module:ol/Feature~Feature} feature Feature
* @param {ol.geom.Polygon} geometry Geometry. * @param {module:ol/geom/Polygon~Polygon} geometry Geometry.
* @private * @private
*/ */
Snap.prototype.writePolygonGeometry_ = function(feature, geometry) { Snap.prototype.writePolygonGeometry_ = function(feature, geometry) {
@@ -580,7 +580,7 @@ Snap.prototype.writePolygonGeometry_ = function(feature, geometry) {
/** /**
* Handle all pointer events events. * Handle all pointer events events.
* @param {ol.MapBrowserEvent} evt A move event. * @param {module:ol/MapBrowserEvent~MapBrowserEvent} evt A move event.
* @return {boolean} Pass the event to other interactions. * @return {boolean} Pass the event to other interactions.
* @this {ol.interaction.Snap} * @this {ol.interaction.Snap}
*/ */
+6 -6
View File
@@ -46,7 +46,7 @@ const TranslateEventType = {
* @extends {ol.events.Event} * @extends {ol.events.Event}
* @implements {oli.interaction.TranslateEvent} * @implements {oli.interaction.TranslateEvent}
* @param {ol.interaction.TranslateEventType} type Type. * @param {ol.interaction.TranslateEventType} type Type.
* @param {ol.Collection.<ol.Feature>} features The features translated. * @param {ol.Collection.<module:ol/Feature~Feature>} features The features translated.
* @param {module:ol/coordinate~Coordinate} coordinate The event coordinate. * @param {module:ol/coordinate~Coordinate} coordinate The event coordinate.
*/ */
export const TranslateEvent = function(type, features, coordinate) { export const TranslateEvent = function(type, features, coordinate) {
@@ -55,7 +55,7 @@ export const TranslateEvent = function(type, features, coordinate) {
/** /**
* The features being translated. * The features being translated.
* @type {ol.Collection.<ol.Feature>} * @type {ol.Collection.<module:ol/Feature~Feature>}
* @api * @api
*/ */
this.features = features; this.features = features;
@@ -101,7 +101,7 @@ const Translate = function(opt_options) {
/** /**
* @type {ol.Collection.<ol.Feature>} * @type {ol.Collection.<module:ol/Feature~Feature>}
* @private * @private
*/ */
this.features_ = options.features !== undefined ? options.features : null; this.features_ = options.features !== undefined ? options.features : null;
@@ -134,7 +134,7 @@ const Translate = function(opt_options) {
this.hitTolerance_ = options.hitTolerance ? options.hitTolerance : 0; this.hitTolerance_ = options.hitTolerance ? options.hitTolerance : 0;
/** /**
* @type {ol.Feature} * @type {module:ol/Feature~Feature}
* @private * @private
*/ */
this.lastFeature_ = null; this.lastFeature_ = null;
@@ -221,7 +221,7 @@ function handleDragEvent(event) {
/** /**
* @param {ol.MapBrowserEvent} event Event. * @param {module:ol/MapBrowserEvent~MapBrowserEvent} event Event.
* @this {ol.interaction.Translate} * @this {ol.interaction.Translate}
*/ */
function handleMoveEvent(event) { function handleMoveEvent(event) {
@@ -243,7 +243,7 @@ function handleMoveEvent(event) {
* features. * features.
* @param {module:ol~Pixel} pixel Pixel coordinate to test for intersection. * @param {module:ol~Pixel} pixel Pixel coordinate to test for intersection.
* @param {ol.PluggableMap} map Map to test the intersection on. * @param {ol.PluggableMap} map Map to test the intersection on.
* @return {ol.Feature} Returns the feature found at the specified pixel * @return {module:ol/Feature~Feature} Returns the feature found at the specified pixel
* coordinates. * coordinates.
* @private * @private
*/ */
+1 -1
View File
@@ -129,7 +129,7 @@ VectorLayer.prototype.getRenderBuffer = function() {
/** /**
* @return {function(ol.Feature, ol.Feature): number|null|undefined} Render * @return {function(module:ol/Feature~Feature, module:ol/Feature~Feature): number|null|undefined} Render
* order. * order.
*/ */
VectorLayer.prototype.getRenderOrder = function() { VectorLayer.prototype.getRenderOrder = function() {
+10 -10
View File
@@ -7,7 +7,7 @@ import {METERS_PER_UNIT} from '../proj/Units.js';
/** /**
* @typedef {Object} Options * @typedef {Object} Options
* @property {string} code The SRS identifier code, e.g. `EPSG:4326`. * @property {string} code The SRS identifier code, e.g. `EPSG:4326`.
* @property {ol.proj.Units|string|undefined} units Units. Required unless a * @property {module:ol/proj/Units~Units|string|undefined} units Units. Required unless a
* proj4 projection is defined for `code`. * proj4 projection is defined for `code`.
* @property {ol.Extent|undefined} extent The validity extent for the SRS. * @property {ol.Extent|undefined} extent The validity extent for the SRS.
* @property {string|undefined} axisOrientation The axis orientation as specified * @property {string|undefined} axisOrientation The axis orientation as specified
@@ -15,7 +15,7 @@ import {METERS_PER_UNIT} from '../proj/Units.js';
* @property {boolean|undefined} global Whether the projection is valid for the * @property {boolean|undefined} global Whether the projection is valid for the
* whole globe. Default is `false`. * whole globe. Default is `false`.
* @property {number|undefined} metersPerUnit The meters per unit for the SRS. * @property {number|undefined} metersPerUnit The meters per unit for the SRS.
* If not provided, the `units` are used to get the meters per unit from the {@link ol.proj.METERS_PER_UNIT} * If not provided, the `units` are used to get the meters per unit from the {@link module:ol/proj/Units~METERS_PER_UNIT}
* lookup table. * lookup table.
* @property {ol.Extent|undefined} worldExtent The world extent for the SRS. * @property {ol.Extent|undefined} worldExtent The world extent for the SRS.
* @property {(function(number, ol.Coordinate):number|undefined)} getPointResolution * @property {(function(number, ol.Coordinate):number|undefined)} getPointResolution
@@ -34,7 +34,7 @@ import {METERS_PER_UNIT} from '../proj/Units.js';
* and options use {@link module:ol/proj~ProjectionLike} which means the simple string * and options use {@link module:ol/proj~ProjectionLike} which means the simple string
* code will suffice. * code will suffice.
* *
* You can use {@link ol.proj.get} to retrieve the object for a particular * You can use {@link module:ol/proj~get} to retrieve the object for a particular
* projection. * projection.
* *
* The library includes definitions for `EPSG:4326` and `EPSG:3857`, together * The library includes definitions for `EPSG:4326` and `EPSG:3857`, together
@@ -49,7 +49,7 @@ import {METERS_PER_UNIT} from '../proj/Units.js';
* *
* If you use proj4js, aliases can be added using `proj4.defs()`; see * If you use proj4js, aliases can be added using `proj4.defs()`; see
* [documentation](https://github.com/proj4js/proj4js). To set an alternative * [documentation](https://github.com/proj4js/proj4js). To set an alternative
* namespace for proj4, use {@link ol.proj.setProj4}. * namespace for proj4, use {@link module:ol/proj~setProj4}.
* *
* @constructor * @constructor
* @param {module:ol/proj/Projection~Options} options Projection options. * @param {module:ol/proj/Projection~Options} options Projection options.
@@ -64,17 +64,17 @@ const Projection = function(options) {
this.code_ = options.code; this.code_ = options.code;
/** /**
* Units of projected coordinates. When set to `ol.proj.Units.TILE_PIXELS`, a * Units of projected coordinates. When set to `TILE_PIXELS`, a
* `this.extent_` and `this.worldExtent_` must be configured properly for each * `this.extent_` and `this.worldExtent_` must be configured properly for each
* tile. * tile.
* @private * @private
* @type {ol.proj.Units} * @type {module:ol/proj/Units~Units}
*/ */
this.units_ = /** @type {ol.proj.Units} */ (options.units); this.units_ = /** @type {module:ol/proj/Units~Units} */ (options.units);
/** /**
* Validity extent of the projection in projected coordinates. For projections * Validity extent of the projection in projected coordinates. For projections
* with `ol.proj.Units.TILE_PIXELS` units, this is the extent of the tile in * with `TILE_PIXELS` units, this is the extent of the tile in
* tile pixel space. * tile pixel space.
* @private * @private
* @type {module:ol/extent~Extent} * @type {module:ol/extent~Extent}
@@ -83,7 +83,7 @@ const Projection = function(options) {
/** /**
* Extent of the world in EPSG:4326. For projections with * Extent of the world in EPSG:4326. For projections with
* `ol.proj.Units.TILE_PIXELS` units, this is the extent of the tile in * `TILE_PIXELS` units, this is the extent of the tile in
* projected coordinate space. * projected coordinate space.
* @private * @private
* @type {module:ol/extent~Extent} * @type {module:ol/extent~Extent}
@@ -160,7 +160,7 @@ Projection.prototype.getExtent = function() {
/** /**
* Get the units of this projection. * Get the units of this projection.
* @return {ol.proj.Units} Units. * @return {module:ol/proj/Units~Units} Units.
* @api * @api
*/ */
Projection.prototype.getUnits = function() { Projection.prototype.getUnits = function() {
+1 -1
View File
@@ -20,7 +20,7 @@ const Units = {
/** /**
* Meters per unit lookup table. * Meters per unit lookup table.
* @const * @const
* @type {Object.<ol.proj.Units, number>} * @type {Object.<module:ol/proj/Units~Units, number>}
* @api * @api
*/ */
export const METERS_PER_UNIT = {}; export const METERS_PER_UNIT = {};
+2 -2
View File
@@ -45,7 +45,7 @@ export const WORLD_EXTENT = [-180, -85, 180, 85];
* Projection object for web/spherical Mercator (EPSG:3857). * Projection object for web/spherical Mercator (EPSG:3857).
* *
* @constructor * @constructor
* @extends {ol.proj.Projection} * @extends {module:ol/proj/Projection~Projection}
* @param {string} code Code. * @param {string} code Code.
*/ */
function EPSG3857Projection(code) { function EPSG3857Projection(code) {
@@ -67,7 +67,7 @@ inherits(EPSG3857Projection, Projection);
* Projections equal to EPSG:3857. * Projections equal to EPSG:3857.
* *
* @const * @const
* @type {Array.<ol.proj.Projection>} * @type {Array.<module:ol/proj/Projection~Projection>}
*/ */
export const PROJECTIONS = [ export const PROJECTIONS = [
new EPSG3857Projection('EPSG:3857'), new EPSG3857Projection('EPSG:3857'),
+2 -2
View File
@@ -40,7 +40,7 @@ export const METERS_PER_UNIT = Math.PI * RADIUS / 180;
* OpenLayers treats EPSG:4326 as a pseudo-projection, with x,y coordinates. * OpenLayers treats EPSG:4326 as a pseudo-projection, with x,y coordinates.
* *
* @constructor * @constructor
* @extends {ol.proj.Projection} * @extends {module:ol/proj/Projection~Projection}
* @param {string} code Code. * @param {string} code Code.
* @param {string=} opt_axisOrientation Axis orientation. * @param {string=} opt_axisOrientation Axis orientation.
*/ */
@@ -62,7 +62,7 @@ inherits(EPSG4326Projection, Projection);
* Projections equal to EPSG:4326. * Projections equal to EPSG:4326.
* *
* @const * @const
* @type {Array.<ol.proj.Projection>} * @type {Array.<module:ol/proj/Projection~Projection>}
*/ */
export const PROJECTIONS = [ export const PROJECTIONS = [
new EPSG4326Projection('CRS:84'), new EPSG4326Projection('CRS:84'),
+3 -3
View File
@@ -4,7 +4,7 @@
/** /**
* @type {Object.<string, ol.proj.Projection>} * @type {Object.<string, module:ol/proj/Projection~Projection>}
*/ */
let cache = {}; let cache = {};
@@ -20,7 +20,7 @@ export function clear() {
/** /**
* Get a cached projection by code. * Get a cached projection by code.
* @param {string} code The code for the projection. * @param {string} code The code for the projection.
* @return {ol.proj.Projection} The projection (if cached). * @return {module:ol/proj/Projection~Projection} The projection (if cached).
*/ */
export function get(code) { export function get(code) {
return cache[code] || null; return cache[code] || null;
@@ -30,7 +30,7 @@ export function get(code) {
/** /**
* Add a projection to the cache. * Add a projection to the cache.
* @param {string} code The projection code. * @param {string} code The projection code.
* @param {ol.proj.Projection} projection The projection to cache. * @param {module:ol/proj/Projection~Projection} projection The projection to cache.
*/ */
export function add(code, projection) { export function add(code, projection) {
cache[code] = projection; cache[code] = projection;
+4 -4
View File
@@ -23,8 +23,8 @@ export function clear() {
* Registers a conversion function to convert coordinates from the source * Registers a conversion function to convert coordinates from the source
* projection to the destination projection. * projection to the destination projection.
* *
* @param {ol.proj.Projection} source Source. * @param {module:ol/proj/Projection~Projection} source Source.
* @param {ol.proj.Projection} destination Destination. * @param {module:ol/proj/Projection~Projection} destination Destination.
* @param {module:ol/proj~TransformFunction} transformFn Transform. * @param {module:ol/proj~TransformFunction} transformFn Transform.
*/ */
export function add(source, destination, transformFn) { export function add(source, destination, transformFn) {
@@ -42,8 +42,8 @@ export function add(source, destination, transformFn) {
* projection to the destination projection. This method is used to clean up * projection to the destination projection. This method is used to clean up
* cached transforms during testing. * cached transforms during testing.
* *
* @param {ol.proj.Projection} source Source projection. * @param {module:ol/proj/Projection~Projection} source Source projection.
* @param {ol.proj.Projection} destination Destination projection. * @param {module:ol/proj/Projection~Projection} destination Destination projection.
* @return {module:ol/proj~TransformFunction} transformFn The unregistered transform. * @return {module:ol/proj~TransformFunction} transformFn The unregistered transform.
*/ */
export function remove(source, destination) { export function remove(source, destination) {
+2 -2
View File
@@ -15,7 +15,7 @@ import Polygon from '../geom/Polygon.js';
const RenderBox = function(className) { const RenderBox = function(className) {
/** /**
* @type {ol.geom.Polygon} * @type {module:ol/geom/Polygon~Polygon}
* @private * @private
*/ */
this.geometry_ = null; this.geometry_ = null;
@@ -126,7 +126,7 @@ RenderBox.prototype.createOrUpdateGeometry = function() {
/** /**
* @return {ol.geom.Polygon} Geometry. * @return {module:ol/geom/Polygon~Polygon} Geometry.
*/ */
RenderBox.prototype.getGeometry = function() { RenderBox.prototype.getGeometry = function() {
return this.geometry_; return this.geometry_;
+5 -5
View File
@@ -12,12 +12,12 @@ import {transform2D} from '../geom/flat/transform.js';
import {create as createTransform, compose as composeTransform} from '../transform.js'; import {create as createTransform, compose as composeTransform} from '../transform.js';
/** /**
* Lightweight, read-only, {@link ol.Feature} and {@link ol.geom.Geometry} like * Lightweight, read-only, {@link module:ol/Feature~Feature} and {@link module:ol/geom/Geometry~Geometry} like
* structure, optimized for vector tile rendering and styling. Geometry access * structure, optimized for vector tile rendering and styling. Geometry access
* through the API is limited to getting the type and extent of the geometry. * through the API is limited to getting the type and extent of the geometry.
* *
* @constructor * @constructor
* @param {ol.geom.GeometryType} type Geometry type. * @param {module:ol/geom/GeometryType~GeometryType} type Geometry type.
* @param {Array.<number>} flatCoordinates Flat coordinates. These always need * @param {Array.<number>} flatCoordinates Flat coordinates. These always need
* to be right-handed for polygons. * to be right-handed for polygons.
* @param {Array.<number>|Array.<Array.<number>>} ends Ends or Endss. * @param {Array.<number>|Array.<Array.<number>>} ends Ends or Endss.
@@ -39,7 +39,7 @@ const RenderFeature = function(type, flatCoordinates, ends, properties, id) {
/** /**
* @private * @private
* @type {ol.geom.GeometryType} * @type {module:ol/geom/GeometryType~GeometryType}
*/ */
this.type_ = type; this.type_ = type;
@@ -205,7 +205,7 @@ RenderFeature.prototype.getFlatCoordinates =
/** /**
* For API compatibility with {@link ol.Feature}, this method is useful when * For API compatibility with {@link module:ol/Feature~Feature}, this method is useful when
* determining the geometry type in style function (see {@link #getType}). * determining the geometry type in style function (see {@link #getType}).
* @return {ol.render.Feature} Feature. * @return {ol.render.Feature} Feature.
* @api * @api
@@ -249,7 +249,7 @@ RenderFeature.prototype.getStyleFunction = UNDEFINED;
/** /**
* Get the type of this feature's geometry. * Get the type of this feature's geometry.
* @return {ol.geom.GeometryType} Geometry type. * @return {module:ol/geom/GeometryType~GeometryType} Geometry type.
* @api * @api
*/ */
RenderFeature.prototype.getType = function() { RenderFeature.prototype.getType = function() {
+22 -22
View File
@@ -16,8 +16,8 @@ const VectorContext = function() {
/** /**
* Render a geometry with a custom renderer. * Render a geometry with a custom renderer.
* *
* @param {ol.geom.SimpleGeometry} geometry Geometry. * @param {module:ol/geom/SimpleGeometry~SimpleGeometry} geometry Geometry.
* @param {ol.Feature|ol.render.Feature} feature Feature. * @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
* @param {Function} renderer Renderer. * @param {Function} renderer Renderer.
*/ */
VectorContext.prototype.drawCustom = function(geometry, feature, renderer) {}; VectorContext.prototype.drawCustom = function(geometry, feature, renderer) {};
@@ -26,7 +26,7 @@ VectorContext.prototype.drawCustom = function(geometry, feature, renderer) {};
/** /**
* Render a geometry. * Render a geometry.
* *
* @param {ol.geom.Geometry} geometry The geometry to render. * @param {module:ol/geom/Geometry~Geometry} geometry The geometry to render.
*/ */
VectorContext.prototype.drawGeometry = function(geometry) {}; VectorContext.prototype.drawGeometry = function(geometry) {};
@@ -40,76 +40,76 @@ VectorContext.prototype.setStyle = function(style) {};
/** /**
* @param {ol.geom.Circle} circleGeometry Circle geometry. * @param {module:ol/geom/Circle~Circle} circleGeometry Circle geometry.
* @param {ol.Feature} feature Feature. * @param {module:ol/Feature~Feature} feature Feature.
*/ */
VectorContext.prototype.drawCircle = function(circleGeometry, feature) {}; VectorContext.prototype.drawCircle = function(circleGeometry, feature) {};
/** /**
* @param {ol.Feature} feature Feature. * @param {module:ol/Feature~Feature} feature Feature.
* @param {ol.style.Style} style Style. * @param {ol.style.Style} style Style.
*/ */
VectorContext.prototype.drawFeature = function(feature, style) {}; VectorContext.prototype.drawFeature = function(feature, style) {};
/** /**
* @param {ol.geom.GeometryCollection} geometryCollectionGeometry Geometry * @param {module:ol/geom/GeometryCollection~GeometryCollection} geometryCollectionGeometry Geometry
* collection. * collection.
* @param {ol.Feature} feature Feature. * @param {module:ol/Feature~Feature} feature Feature.
*/ */
VectorContext.prototype.drawGeometryCollection = function(geometryCollectionGeometry, feature) {}; VectorContext.prototype.drawGeometryCollection = function(geometryCollectionGeometry, feature) {};
/** /**
* @param {ol.geom.LineString|ol.render.Feature} lineStringGeometry Line * @param {module:ol/geom/LineString~LineString|ol.render.Feature} lineStringGeometry Line
* string geometry. * string geometry.
* @param {ol.Feature|ol.render.Feature} feature Feature. * @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
*/ */
VectorContext.prototype.drawLineString = function(lineStringGeometry, feature) {}; VectorContext.prototype.drawLineString = function(lineStringGeometry, feature) {};
/** /**
* @param {ol.geom.MultiLineString|ol.render.Feature} multiLineStringGeometry * @param {module:ol/geom/MultiLineString~MultiLineString|ol.render.Feature} multiLineStringGeometry
* MultiLineString geometry. * MultiLineString geometry.
* @param {ol.Feature|ol.render.Feature} feature Feature. * @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
*/ */
VectorContext.prototype.drawMultiLineString = function(multiLineStringGeometry, feature) {}; VectorContext.prototype.drawMultiLineString = function(multiLineStringGeometry, feature) {};
/** /**
* @param {ol.geom.MultiPoint|ol.render.Feature} multiPointGeometry MultiPoint * @param {module:ol/geom/MultiPoint~MultiPoint|ol.render.Feature} multiPointGeometry MultiPoint
* geometry. * geometry.
* @param {ol.Feature|ol.render.Feature} feature Feature. * @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
*/ */
VectorContext.prototype.drawMultiPoint = function(multiPointGeometry, feature) {}; VectorContext.prototype.drawMultiPoint = function(multiPointGeometry, feature) {};
/** /**
* @param {ol.geom.MultiPolygon} multiPolygonGeometry MultiPolygon geometry. * @param {module:ol/geom/MultiPolygon~MultiPolygon} multiPolygonGeometry MultiPolygon geometry.
* @param {ol.Feature|ol.render.Feature} feature Feature. * @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
*/ */
VectorContext.prototype.drawMultiPolygon = function(multiPolygonGeometry, feature) {}; VectorContext.prototype.drawMultiPolygon = function(multiPolygonGeometry, feature) {};
/** /**
* @param {ol.geom.Point|ol.render.Feature} pointGeometry Point geometry. * @param {module:ol/geom/Point~Point|ol.render.Feature} pointGeometry Point geometry.
* @param {ol.Feature|ol.render.Feature} feature Feature. * @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
*/ */
VectorContext.prototype.drawPoint = function(pointGeometry, feature) {}; VectorContext.prototype.drawPoint = function(pointGeometry, feature) {};
/** /**
* @param {ol.geom.Polygon|ol.render.Feature} polygonGeometry Polygon * @param {module:ol/geom/Polygon~Polygon|ol.render.Feature} polygonGeometry Polygon
* geometry. * geometry.
* @param {ol.Feature|ol.render.Feature} feature Feature. * @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
*/ */
VectorContext.prototype.drawPolygon = function(polygonGeometry, feature) {}; VectorContext.prototype.drawPolygon = function(polygonGeometry, feature) {};
/** /**
* @param {ol.geom.Geometry|ol.render.Feature} geometry Geometry. * @param {module:ol/geom/Geometry~Geometry|ol.render.Feature} geometry Geometry.
* @param {ol.Feature|ol.render.Feature} feature Feature. * @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
*/ */
VectorContext.prototype.drawText = function(geometry, feature) {}; VectorContext.prototype.drawText = function(geometry, feature) {};
+18 -18
View File
@@ -394,7 +394,7 @@ CanvasImmediateRenderer.prototype.drawRings_ = function(flatCoordinates, offset,
* Render a circle geometry into the canvas. Rendering is immediate and uses * Render a circle geometry into the canvas. Rendering is immediate and uses
* the current fill and stroke styles. * the current fill and stroke styles.
* *
* @param {ol.geom.Circle} geometry Circle geometry. * @param {module:ol/geom/Circle~Circle} geometry Circle geometry.
* @override * @override
* @api * @api
*/ */
@@ -450,7 +450,7 @@ CanvasImmediateRenderer.prototype.setStyle = function(style) {
* Render a geometry into the canvas. Call * Render a geometry into the canvas. Call
* {@link ol.render.canvas.Immediate#setStyle} first to set the rendering style. * {@link ol.render.canvas.Immediate#setStyle} first to set the rendering style.
* *
* @param {ol.geom.Geometry|ol.render.Feature} geometry The geometry to render. * @param {module:ol/geom/Geometry~Geometry|ol.render.Feature} geometry The geometry to render.
* @override * @override
* @api * @api
*/ */
@@ -458,28 +458,28 @@ CanvasImmediateRenderer.prototype.drawGeometry = function(geometry) {
const type = geometry.getType(); const type = geometry.getType();
switch (type) { switch (type) {
case GeometryType.POINT: case GeometryType.POINT:
this.drawPoint(/** @type {ol.geom.Point} */ (geometry)); this.drawPoint(/** @type {module:ol/geom/Point~Point} */ (geometry));
break; break;
case GeometryType.LINE_STRING: case GeometryType.LINE_STRING:
this.drawLineString(/** @type {ol.geom.LineString} */ (geometry)); this.drawLineString(/** @type {module:ol/geom/LineString~LineString} */ (geometry));
break; break;
case GeometryType.POLYGON: case GeometryType.POLYGON:
this.drawPolygon(/** @type {ol.geom.Polygon} */ (geometry)); this.drawPolygon(/** @type {module:ol/geom/Polygon~Polygon} */ (geometry));
break; break;
case GeometryType.MULTI_POINT: case GeometryType.MULTI_POINT:
this.drawMultiPoint(/** @type {ol.geom.MultiPoint} */ (geometry)); this.drawMultiPoint(/** @type {module:ol/geom/MultiPoint~MultiPoint} */ (geometry));
break; break;
case GeometryType.MULTI_LINE_STRING: case GeometryType.MULTI_LINE_STRING:
this.drawMultiLineString(/** @type {ol.geom.MultiLineString} */ (geometry)); this.drawMultiLineString(/** @type {module:ol/geom/MultiLineString~MultiLineString} */ (geometry));
break; break;
case GeometryType.MULTI_POLYGON: case GeometryType.MULTI_POLYGON:
this.drawMultiPolygon(/** @type {ol.geom.MultiPolygon} */ (geometry)); this.drawMultiPolygon(/** @type {module:ol/geom/MultiPolygon~MultiPolygon} */ (geometry));
break; break;
case GeometryType.GEOMETRY_COLLECTION: case GeometryType.GEOMETRY_COLLECTION:
this.drawGeometryCollection(/** @type {ol.geom.GeometryCollection} */ (geometry)); this.drawGeometryCollection(/** @type {module:ol/geom/GeometryCollection~GeometryCollection} */ (geometry));
break; break;
case GeometryType.CIRCLE: case GeometryType.CIRCLE:
this.drawCircle(/** @type {ol.geom.Circle} */ (geometry)); this.drawCircle(/** @type {module:ol/geom/Circle~Circle} */ (geometry));
break; break;
default: default:
} }
@@ -492,7 +492,7 @@ CanvasImmediateRenderer.prototype.drawGeometry = function(geometry) {
* this method is called. If you need `zIndex` support, you should be using an * this method is called. If you need `zIndex` support, you should be using an
* {@link ol.layer.Vector} instead. * {@link ol.layer.Vector} instead.
* *
* @param {ol.Feature} feature Feature. * @param {module:ol/Feature~Feature} feature Feature.
* @param {ol.style.Style} style Style. * @param {ol.style.Style} style Style.
* @override * @override
* @api * @api
@@ -511,7 +511,7 @@ CanvasImmediateRenderer.prototype.drawFeature = function(feature, style) {
* Render a GeometryCollection to the canvas. Rendering is immediate and * Render a GeometryCollection to the canvas. Rendering is immediate and
* uses the current styles appropriate for each geometry in the collection. * uses the current styles appropriate for each geometry in the collection.
* *
* @param {ol.geom.GeometryCollection} geometry Geometry collection. * @param {module:ol/geom/GeometryCollection~GeometryCollection} geometry Geometry collection.
* @override * @override
*/ */
CanvasImmediateRenderer.prototype.drawGeometryCollection = function(geometry) { CanvasImmediateRenderer.prototype.drawGeometryCollection = function(geometry) {
@@ -526,7 +526,7 @@ CanvasImmediateRenderer.prototype.drawGeometryCollection = function(geometry) {
* Render a Point geometry into the canvas. Rendering is immediate and uses * Render a Point geometry into the canvas. Rendering is immediate and uses
* the current style. * the current style.
* *
* @param {ol.geom.Point|ol.render.Feature} geometry Point geometry. * @param {module:ol/geom/Point~Point|ol.render.Feature} geometry Point geometry.
* @override * @override
*/ */
CanvasImmediateRenderer.prototype.drawPoint = function(geometry) { CanvasImmediateRenderer.prototype.drawPoint = function(geometry) {
@@ -545,7 +545,7 @@ CanvasImmediateRenderer.prototype.drawPoint = function(geometry) {
* Render a MultiPoint geometry into the canvas. Rendering is immediate and * Render a MultiPoint geometry into the canvas. Rendering is immediate and
* uses the current style. * uses the current style.
* *
* @param {ol.geom.MultiPoint|ol.render.Feature} geometry MultiPoint geometry. * @param {module:ol/geom/MultiPoint~MultiPoint|ol.render.Feature} geometry MultiPoint geometry.
* @override * @override
*/ */
CanvasImmediateRenderer.prototype.drawMultiPoint = function(geometry) { CanvasImmediateRenderer.prototype.drawMultiPoint = function(geometry) {
@@ -564,7 +564,7 @@ CanvasImmediateRenderer.prototype.drawMultiPoint = function(geometry) {
* Render a LineString into the canvas. Rendering is immediate and uses * Render a LineString into the canvas. Rendering is immediate and uses
* the current style. * the current style.
* *
* @param {ol.geom.LineString|ol.render.Feature} geometry LineString geometry. * @param {module:ol/geom/LineString~LineString|ol.render.Feature} geometry LineString geometry.
* @override * @override
*/ */
CanvasImmediateRenderer.prototype.drawLineString = function(geometry) { CanvasImmediateRenderer.prototype.drawLineString = function(geometry) {
@@ -591,7 +591,7 @@ CanvasImmediateRenderer.prototype.drawLineString = function(geometry) {
* Render a MultiLineString geometry into the canvas. Rendering is immediate * Render a MultiLineString geometry into the canvas. Rendering is immediate
* and uses the current style. * and uses the current style.
* *
* @param {ol.geom.MultiLineString|ol.render.Feature} geometry MultiLineString * @param {module:ol/geom/MultiLineString~MultiLineString|ol.render.Feature} geometry MultiLineString
* geometry. * geometry.
* @override * @override
*/ */
@@ -624,7 +624,7 @@ CanvasImmediateRenderer.prototype.drawMultiLineString = function(geometry) {
* Render a Polygon geometry into the canvas. Rendering is immediate and uses * Render a Polygon geometry into the canvas. Rendering is immediate and uses
* the current style. * the current style.
* *
* @param {ol.geom.Polygon|ol.render.Feature} geometry Polygon geometry. * @param {module:ol/geom/Polygon~Polygon|ol.render.Feature} geometry Polygon geometry.
* @override * @override
*/ */
CanvasImmediateRenderer.prototype.drawPolygon = function(geometry) { CanvasImmediateRenderer.prototype.drawPolygon = function(geometry) {
@@ -659,7 +659,7 @@ CanvasImmediateRenderer.prototype.drawPolygon = function(geometry) {
/** /**
* Render MultiPolygon geometry into the canvas. Rendering is immediate and * Render MultiPolygon geometry into the canvas. Rendering is immediate and
* uses the current style. * uses the current style.
* @param {ol.geom.MultiPolygon} geometry MultiPolygon geometry. * @param {module:ol/geom/MultiPolygon~MultiPolygon} geometry MultiPolygon geometry.
* @override * @override
*/ */
CanvasImmediateRenderer.prototype.drawMultiPolygon = function(geometry) { CanvasImmediateRenderer.prototype.drawMultiPolygon = function(geometry) {
+1 -1
View File
@@ -201,7 +201,7 @@ CanvasPolygonReplay.prototype.finish = function() {
/** /**
* @private * @private
* @param {ol.geom.Geometry|ol.render.Feature} geometry Geometry. * @param {module:ol/geom/Geometry~Geometry|ol.render.Feature} geometry Geometry.
*/ */
CanvasPolygonReplay.prototype.setFillStrokeStyles_ = function(geometry) { CanvasPolygonReplay.prototype.setFillStrokeStyles_ = function(geometry) {
const state = this.state; const state = this.state;
+17 -17
View File
@@ -407,7 +407,7 @@ CanvasReplay.prototype.drawCustom = function(geometry, feature, renderer) {
let flatCoordinates, replayEnd, replayEnds, replayEndss; let flatCoordinates, replayEnd, replayEnds, replayEndss;
let offset; let offset;
if (type == GeometryType.MULTI_POLYGON) { if (type == GeometryType.MULTI_POLYGON) {
geometry = /** @type {ol.geom.MultiPolygon} */ (geometry); geometry = /** @type {module:ol/geom/MultiPolygon~MultiPolygon} */ (geometry);
flatCoordinates = geometry.getOrientedFlatCoordinates(); flatCoordinates = geometry.getOrientedFlatCoordinates();
replayEndss = []; replayEndss = [];
const endss = geometry.getEndss(); const endss = geometry.getEndss();
@@ -422,10 +422,10 @@ CanvasReplay.prototype.drawCustom = function(geometry, feature, renderer) {
} else if (type == GeometryType.POLYGON || type == GeometryType.MULTI_LINE_STRING) { } else if (type == GeometryType.POLYGON || type == GeometryType.MULTI_LINE_STRING) {
replayEnds = []; replayEnds = [];
flatCoordinates = (type == GeometryType.POLYGON) ? flatCoordinates = (type == GeometryType.POLYGON) ?
/** @type {ol.geom.Polygon} */ (geometry).getOrientedFlatCoordinates() : /** @type {module:ol/geom/Polygon~Polygon} */ (geometry).getOrientedFlatCoordinates() :
geometry.getFlatCoordinates(); geometry.getFlatCoordinates();
offset = this.drawCustomCoordinates_(flatCoordinates, 0, offset = this.drawCustomCoordinates_(flatCoordinates, 0,
/** @type {ol.geom.Polygon|ol.geom.MultiLineString} */ (geometry).getEnds(), /** @type {module:ol/geom/Polygon~Polygon|module:ol/geom/MultiLineString~MultiLineString} */ (geometry).getEnds(),
stride, replayEnds); stride, replayEnds);
this.instructions.push([CanvasInstruction.CUSTOM, this.instructions.push([CanvasInstruction.CUSTOM,
replayBegin, replayEnds, geometry, renderer, inflateCoordinatesArray]); replayBegin, replayEnds, geometry, renderer, inflateCoordinatesArray]);
@@ -448,8 +448,8 @@ CanvasReplay.prototype.drawCustom = function(geometry, feature, renderer) {
/** /**
* @protected * @protected
* @param {ol.geom.Geometry|ol.render.Feature} geometry Geometry. * @param {module:ol/geom/Geometry~Geometry|ol.render.Feature} geometry Geometry.
* @param {ol.Feature|ol.render.Feature} feature Feature. * @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
*/ */
CanvasReplay.prototype.beginGeometry = function(geometry, feature) { CanvasReplay.prototype.beginGeometry = function(geometry, feature) {
this.beginGeometryInstruction1_ = [CanvasInstruction.BEGIN_GEOMETRY, feature, 0]; this.beginGeometryInstruction1_ = [CanvasInstruction.BEGIN_GEOMETRY, feature, 0];
@@ -496,7 +496,7 @@ CanvasReplay.prototype.setStrokeStyle_ = function(context, instruction) {
/** /**
* @param {ol.DeclutterGroup} declutterGroup Declutter group. * @param {ol.DeclutterGroup} declutterGroup Declutter group.
* @param {ol.Feature|ol.render.Feature} feature Feature. * @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
*/ */
CanvasReplay.prototype.renderDeclutter_ = function(declutterGroup, feature) { CanvasReplay.prototype.renderDeclutter_ = function(declutterGroup, feature) {
if (declutterGroup && declutterGroup.length > 5) { if (declutterGroup && declutterGroup.length > 5) {
@@ -538,7 +538,7 @@ CanvasReplay.prototype.renderDeclutter_ = function(declutterGroup, feature) {
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features * @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
* to skip. * to skip.
* @param {Array.<*>} instructions Instructions array. * @param {Array.<*>} instructions Instructions array.
* @param {function((ol.Feature|ol.render.Feature)): T|undefined} * @param {function((module:ol/Feature~Feature|ol.render.Feature)): T|undefined}
* featureCallback Feature callback. * featureCallback Feature callback.
* @param {module:ol/extent~Extent=} opt_hitExtent Only check features that intersect this * @param {module:ol/extent~Extent=} opt_hitExtent Only check features that intersect this
* extent. * extent.
@@ -584,14 +584,14 @@ CanvasReplay.prototype.replay_ = function(
// When the batch size gets too big, performance decreases. 200 is a good // When the batch size gets too big, performance decreases. 200 is a good
// balance between batch size and number of fill/stroke instructions. // balance between batch size and number of fill/stroke instructions.
const batchSize = this.instructions != instructions || this.overlaps ? 0 : 200; const batchSize = this.instructions != instructions || this.overlaps ? 0 : 200;
let /** @type {ol.Feature|ol.render.Feature} */ feature; let /** @type {module:ol/Feature~Feature|ol.render.Feature} */ feature;
let x, y; let x, y;
while (i < ii) { while (i < ii) {
const instruction = instructions[i]; const instruction = instructions[i];
const type = /** @type {ol.render.canvas.Instruction} */ (instruction[0]); const type = /** @type {ol.render.canvas.Instruction} */ (instruction[0]);
switch (type) { switch (type) {
case CanvasInstruction.BEGIN_GEOMETRY: case CanvasInstruction.BEGIN_GEOMETRY:
feature = /** @type {ol.Feature|ol.render.Feature} */ (instruction[1]); feature = /** @type {module:ol/Feature~Feature|ol.render.Feature} */ (instruction[1]);
if ((skipFeatures && if ((skipFeatures &&
skippedFeaturesHash[getUid(feature).toString()]) || skippedFeaturesHash[getUid(feature).toString()]) ||
!feature.getGeometry()) { !feature.getGeometry()) {
@@ -638,7 +638,7 @@ CanvasReplay.prototype.replay_ = function(
case CanvasInstruction.CUSTOM: case CanvasInstruction.CUSTOM:
d = /** @type {number} */ (instruction[1]); d = /** @type {number} */ (instruction[1]);
dd = instruction[2]; dd = instruction[2];
const geometry = /** @type {ol.geom.SimpleGeometry} */ (instruction[3]); const geometry = /** @type {module:ol/geom/SimpleGeometry~SimpleGeometry} */ (instruction[3]);
const renderer = instruction[4]; const renderer = instruction[4];
const fn = instruction.length == 6 ? instruction[5] : undefined; const fn = instruction.length == 6 ? instruction[5] : undefined;
state.geometry = geometry; state.geometry = geometry;
@@ -760,7 +760,7 @@ CanvasReplay.prototype.replay_ = function(
break; break;
case CanvasInstruction.END_GEOMETRY: case CanvasInstruction.END_GEOMETRY:
if (featureCallback !== undefined) { if (featureCallback !== undefined) {
feature = /** @type {ol.Feature|ol.render.Feature} */ (instruction[1]); feature = /** @type {module:ol/Feature~Feature|ol.render.Feature} */ (instruction[1]);
const result = featureCallback(feature); const result = featureCallback(feature);
if (result) { if (result) {
return result; return result;
@@ -870,7 +870,7 @@ CanvasReplay.prototype.replay = function(
* @param {number} viewRotation View rotation. * @param {number} viewRotation View rotation.
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features * @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
* to skip. * to skip.
* @param {function((ol.Feature|ol.render.Feature)): T=} opt_featureCallback * @param {function((module:ol/Feature~Feature|ol.render.Feature)): T=} opt_featureCallback
* Feature callback. * Feature callback.
* @param {module:ol/extent~Extent=} opt_hitExtent Only check features that intersect this * @param {module:ol/extent~Extent=} opt_hitExtent Only check features that intersect this
* extent. * extent.
@@ -967,7 +967,7 @@ CanvasReplay.prototype.setFillStrokeStyle = function(fillStyle, strokeStyle) {
/** /**
* @param {ol.CanvasFillStrokeState} state State. * @param {ol.CanvasFillStrokeState} state State.
* @param {ol.geom.Geometry|ol.render.Feature} geometry Geometry. * @param {module:ol/geom/Geometry~Geometry|ol.render.Feature} geometry Geometry.
* @return {Array.<*>} Fill instruction. * @return {Array.<*>} Fill instruction.
*/ */
CanvasReplay.prototype.createFill = function(state, geometry) { CanvasReplay.prototype.createFill = function(state, geometry) {
@@ -1005,8 +1005,8 @@ CanvasReplay.prototype.createStroke = function(state) {
/** /**
* @param {ol.CanvasFillStrokeState} state State. * @param {ol.CanvasFillStrokeState} state State.
* @param {function(this:ol.render.canvas.Replay, ol.CanvasFillStrokeState, (ol.geom.Geometry|ol.render.Feature)):Array.<*>} createFill Create fill. * @param {function(this:ol.render.canvas.Replay, ol.CanvasFillStrokeState, (module:ol/geom/Geometry~Geometry|ol.render.Feature)):Array.<*>} createFill Create fill.
* @param {ol.geom.Geometry|ol.render.Feature} geometry Geometry. * @param {module:ol/geom/Geometry~Geometry|ol.render.Feature} geometry Geometry.
*/ */
CanvasReplay.prototype.updateFillStyle = function(state, createFill, geometry) { CanvasReplay.prototype.updateFillStyle = function(state, createFill, geometry) {
const fillStyle = state.fillStyle; const fillStyle = state.fillStyle;
@@ -1053,8 +1053,8 @@ CanvasReplay.prototype.updateStrokeStyle = function(state, applyStroke) {
/** /**
* @param {ol.geom.Geometry|ol.render.Feature} geometry Geometry. * @param {module:ol/geom/Geometry~Geometry|ol.render.Feature} geometry Geometry.
* @param {ol.Feature|ol.render.Feature} feature Feature. * @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
*/ */
CanvasReplay.prototype.endGeometry = function(geometry, feature) { CanvasReplay.prototype.endGeometry = function(geometry, feature) {
this.beginGeometryInstruction1_[2] = this.instructions.length; this.beginGeometryInstruction1_[2] = this.instructions.length;
+2 -2
View File
@@ -288,7 +288,7 @@ CanvasReplayGroup.prototype.finish = function() {
* @param {number} hitTolerance Hit tolerance in pixels. * @param {number} hitTolerance Hit tolerance in pixels.
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features * @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
* to skip. * to skip.
* @param {function((ol.Feature|ol.render.Feature)): T} callback Feature * @param {function((module:ol/Feature~Feature|ol.render.Feature)): T} callback Feature
* callback. * callback.
* @param {Object.<string, ol.DeclutterGroup>} declutterReplays Declutter * @param {Object.<string, ol.DeclutterGroup>} declutterReplays Declutter
* replays. * replays.
@@ -335,7 +335,7 @@ CanvasReplayGroup.prototype.forEachFeatureAtCoordinate = function(
let replayType; let replayType;
/** /**
* @param {ol.Feature|ol.render.Feature} feature Feature. * @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
* @return {?} Callback result. * @return {?} Callback result.
*/ */
function featureCallback(feature) { function featureCallback(feature) {
+5 -5
View File
@@ -226,24 +226,24 @@ CanvasTextReplay.prototype.drawText = function(geometry, feature) {
end = flatCoordinates.length; end = flatCoordinates.length;
break; break;
case GeometryType.LINE_STRING: case GeometryType.LINE_STRING:
flatCoordinates = /** @type {ol.geom.LineString} */ (geometry).getFlatMidpoint(); flatCoordinates = /** @type {module:ol/geom/LineString~LineString} */ (geometry).getFlatMidpoint();
break; break;
case GeometryType.CIRCLE: case GeometryType.CIRCLE:
flatCoordinates = /** @type {ol.geom.Circle} */ (geometry).getCenter(); flatCoordinates = /** @type {module:ol/geom/Circle~Circle} */ (geometry).getCenter();
break; break;
case GeometryType.MULTI_LINE_STRING: case GeometryType.MULTI_LINE_STRING:
flatCoordinates = /** @type {ol.geom.MultiLineString} */ (geometry).getFlatMidpoints(); flatCoordinates = /** @type {module:ol/geom/MultiLineString~MultiLineString} */ (geometry).getFlatMidpoints();
end = flatCoordinates.length; end = flatCoordinates.length;
break; break;
case GeometryType.POLYGON: case GeometryType.POLYGON:
flatCoordinates = /** @type {ol.geom.Polygon} */ (geometry).getFlatInteriorPoint(); flatCoordinates = /** @type {module:ol/geom/Polygon~Polygon} */ (geometry).getFlatInteriorPoint();
if (!textState.overflow && flatCoordinates[2] / this.resolution < width) { if (!textState.overflow && flatCoordinates[2] / this.resolution < width) {
return; return;
} }
stride = 3; stride = 3;
break; break;
case GeometryType.MULTI_POLYGON: case GeometryType.MULTI_POLYGON:
const interiorPoints = /** @type {ol.geom.MultiPolygon} */ (geometry).getFlatInteriorPoints(); const interiorPoints = /** @type {module:ol/geom/MultiPolygon~MultiPolygon} */ (geometry).getFlatInteriorPoints();
flatCoordinates = []; flatCoordinates = [];
for (i = 0, ii = interiorPoints.length; i < ii; i += 3) { for (i = 0, ii = interiorPoints.length; i < ii; i += 3) {
if (textState.overflow || interiorPoints[i + 2] / this.resolution >= width) { if (textState.overflow || interiorPoints[i + 2] / this.resolution >= width) {
+10 -10
View File
@@ -89,7 +89,7 @@ inherits(WebGLImmediateRenderer, VectorContext);
/** /**
* @param {ol.render.webgl.ReplayGroup} replayGroup Replay group. * @param {ol.render.webgl.ReplayGroup} replayGroup Replay group.
* @param {ol.geom.Geometry|ol.render.Feature} geometry Geometry. * @param {module:ol/geom/Geometry~Geometry|ol.render.Feature} geometry Geometry.
* @private * @private
*/ */
WebGLImmediateRenderer.prototype.drawText_ = function(replayGroup, geometry) { WebGLImmediateRenderer.prototype.drawText_ = function(replayGroup, geometry) {
@@ -130,7 +130,7 @@ WebGLImmediateRenderer.prototype.setStyle = function(style) {
* Render a geometry into the canvas. Call * Render a geometry into the canvas. Call
* {@link ol.render.webgl.Immediate#setStyle} first to set the rendering style. * {@link ol.render.webgl.Immediate#setStyle} first to set the rendering style.
* *
* @param {ol.geom.Geometry|ol.render.Feature} geometry The geometry to render. * @param {module:ol/geom/Geometry~Geometry|ol.render.Feature} geometry The geometry to render.
* @override * @override
* @api * @api
*/ */
@@ -138,28 +138,28 @@ WebGLImmediateRenderer.prototype.drawGeometry = function(geometry) {
const type = geometry.getType(); const type = geometry.getType();
switch (type) { switch (type) {
case GeometryType.POINT: case GeometryType.POINT:
this.drawPoint(/** @type {ol.geom.Point} */ (geometry), null); this.drawPoint(/** @type {module:ol/geom/Point~Point} */ (geometry), null);
break; break;
case GeometryType.LINE_STRING: case GeometryType.LINE_STRING:
this.drawLineString(/** @type {ol.geom.LineString} */ (geometry), null); this.drawLineString(/** @type {module:ol/geom/LineString~LineString} */ (geometry), null);
break; break;
case GeometryType.POLYGON: case GeometryType.POLYGON:
this.drawPolygon(/** @type {ol.geom.Polygon} */ (geometry), null); this.drawPolygon(/** @type {module:ol/geom/Polygon~Polygon} */ (geometry), null);
break; break;
case GeometryType.MULTI_POINT: case GeometryType.MULTI_POINT:
this.drawMultiPoint(/** @type {ol.geom.MultiPoint} */ (geometry), null); this.drawMultiPoint(/** @type {module:ol/geom/MultiPoint~MultiPoint} */ (geometry), null);
break; break;
case GeometryType.MULTI_LINE_STRING: case GeometryType.MULTI_LINE_STRING:
this.drawMultiLineString(/** @type {ol.geom.MultiLineString} */ (geometry), null); this.drawMultiLineString(/** @type {module:ol/geom/MultiLineString~MultiLineString} */ (geometry), null);
break; break;
case GeometryType.MULTI_POLYGON: case GeometryType.MULTI_POLYGON:
this.drawMultiPolygon(/** @type {ol.geom.MultiPolygon} */ (geometry), null); this.drawMultiPolygon(/** @type {module:ol/geom/MultiPolygon~MultiPolygon} */ (geometry), null);
break; break;
case GeometryType.GEOMETRY_COLLECTION: case GeometryType.GEOMETRY_COLLECTION:
this.drawGeometryCollection(/** @type {ol.geom.GeometryCollection} */ (geometry), null); this.drawGeometryCollection(/** @type {module:ol/geom/GeometryCollection~GeometryCollection} */ (geometry), null);
break; break;
case GeometryType.CIRCLE: case GeometryType.CIRCLE:
this.drawCircle(/** @type {ol.geom.Circle} */ (geometry), null); this.drawCircle(/** @type {module:ol/geom/Circle~Circle} */ (geometry), null);
break; break;
default: default:
// pass // pass
+1 -1
View File
@@ -396,7 +396,7 @@ WebGLLineStringReplay.prototype.drawPolygonCoordinates = function(
/** /**
* @param {ol.Feature|ol.render.Feature} feature Feature. * @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
* @param {number=} opt_index Index count. * @param {number=} opt_index Index count.
*/ */
WebGLLineStringReplay.prototype.setPolygonStyle = function(feature, opt_index) { WebGLLineStringReplay.prototype.setPolygonStyle = function(feature, opt_index) {
+5 -5
View File
@@ -95,7 +95,7 @@ const WebGLReplay = function(tolerance, maxExtent) {
/** /**
* Start index per feature (the feature). * Start index per feature (the feature).
* @protected * @protected
* @type {Array.<ol.Feature|ol.render.Feature>} * @type {Array.<module:ol/Feature~Feature|ol.render.Feature>}
*/ */
this.startIndicesFeature = []; this.startIndicesFeature = [];
@@ -184,7 +184,7 @@ WebGLReplay.prototype.drawReplay = function(gl, context, skippedFeaturesHash, hi
* @param {ol.webgl.Context} context Context. * @param {ol.webgl.Context} context Context.
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features * @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
* to skip. * to skip.
* @param {function((ol.Feature|ol.render.Feature)): T|undefined} featureCallback Feature callback. * @param {function((module:ol/Feature~Feature|ol.render.Feature)): T|undefined} featureCallback Feature callback.
* @param {module:ol/extent~Extent=} opt_hitExtent Hit extent: Only features intersecting * @param {module:ol/extent~Extent=} opt_hitExtent Hit extent: Only features intersecting
* this extent are checked. * this extent are checked.
* @return {T|undefined} Callback result. * @return {T|undefined} Callback result.
@@ -199,7 +199,7 @@ WebGLReplay.prototype.drawHitDetectionReplayOneByOne = function(gl, context, ski
* @param {ol.webgl.Context} context Context. * @param {ol.webgl.Context} context Context.
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features * @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
* to skip. * to skip.
* @param {function((ol.Feature|ol.render.Feature)): T|undefined} featureCallback Feature callback. * @param {function((module:ol/Feature~Feature|ol.render.Feature)): T|undefined} featureCallback Feature callback.
* @param {boolean} oneByOne Draw features one-by-one for the hit-detecion. * @param {boolean} oneByOne Draw features one-by-one for the hit-detecion.
* @param {module:ol/extent~Extent=} opt_hitExtent Hit extent: Only features intersecting * @param {module:ol/extent~Extent=} opt_hitExtent Hit extent: Only features intersecting
* this extent are checked. * this extent are checked.
@@ -226,7 +226,7 @@ WebGLReplay.prototype.drawHitDetectionReplay = function(gl, context, skippedFeat
* @param {ol.webgl.Context} context Context. * @param {ol.webgl.Context} context Context.
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features * @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
* to skip. * to skip.
* @param {function((ol.Feature|ol.render.Feature)): T|undefined} featureCallback Feature callback. * @param {function((module:ol/Feature~Feature|ol.render.Feature)): T|undefined} featureCallback Feature callback.
* @return {T|undefined} Callback result. * @return {T|undefined} Callback result.
* @template T * @template T
*/ */
@@ -254,7 +254,7 @@ WebGLReplay.prototype.drawHitDetectionReplayAll = function(gl, context, skippedF
* @param {number} opacity Global opacity. * @param {number} opacity Global opacity.
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features * @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
* to skip. * to skip.
* @param {function((ol.Feature|ol.render.Feature)): T|undefined} featureCallback Feature callback. * @param {function((module:ol/Feature~Feature|ol.render.Feature)): T|undefined} featureCallback Feature callback.
* @param {boolean} oneByOne Draw features one-by-one for the hit-detecion. * @param {boolean} oneByOne Draw features one-by-one for the hit-detecion.
* @param {module:ol/extent~Extent=} opt_hitExtent Hit extent: Only features intersecting * @param {module:ol/extent~Extent=} opt_hitExtent Hit extent: Only features intersecting
* this extent are checked. * this extent are checked.
+4 -4
View File
@@ -195,7 +195,7 @@ WebGLReplayGroup.prototype.replay = function(context,
* @param {number} opacity Global opacity. * @param {number} opacity Global opacity.
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features * @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
* to skip. * to skip.
* @param {function((ol.Feature|ol.render.Feature)): T|undefined} featureCallback Feature callback. * @param {function((module:ol/Feature~Feature|ol.render.Feature)): T|undefined} featureCallback Feature callback.
* @param {boolean} oneByOne Draw features one-by-one for the hit-detecion. * @param {boolean} oneByOne Draw features one-by-one for the hit-detecion.
* @param {module:ol/extent~Extent=} opt_hitExtent Hit extent: Only features intersecting * @param {module:ol/extent~Extent=} opt_hitExtent Hit extent: Only features intersecting
* this extent are checked. * this extent are checked.
@@ -241,7 +241,7 @@ WebGLReplayGroup.prototype.replayHitDetection_ = function(context,
* @param {number} opacity Global opacity. * @param {number} opacity Global opacity.
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features * @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
* to skip. * to skip.
* @param {function((ol.Feature|ol.render.Feature)): T|undefined} callback Feature callback. * @param {function((module:ol/Feature~Feature|ol.render.Feature)): T|undefined} callback Feature callback.
* @return {T|undefined} Callback result. * @return {T|undefined} Callback result.
* @template T * @template T
*/ */
@@ -268,7 +268,7 @@ WebGLReplayGroup.prototype.forEachFeatureAtCoordinate = function(
coordinate, resolution, rotation, HIT_DETECTION_SIZE, coordinate, resolution, rotation, HIT_DETECTION_SIZE,
pixelRatio, opacity, skippedFeaturesHash, pixelRatio, opacity, skippedFeaturesHash,
/** /**
* @param {ol.Feature|ol.render.Feature} feature Feature. * @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
* @return {?} Callback result. * @return {?} Callback result.
*/ */
function(feature) { function(feature) {
@@ -309,7 +309,7 @@ WebGLReplayGroup.prototype.hasFeatureAtCoordinate = function(
coordinate, resolution, rotation, HIT_DETECTION_SIZE, coordinate, resolution, rotation, HIT_DETECTION_SIZE,
pixelRatio, opacity, skippedFeaturesHash, pixelRatio, opacity, skippedFeaturesHash,
/** /**
* @param {ol.Feature|ol.render.Feature} feature Feature. * @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
* @return {boolean} Is there a feature? * @return {boolean} Is there a feature?
*/ */
function(feature) { function(feature) {
+5 -5
View File
@@ -136,20 +136,20 @@ WebGLTextReplay.prototype.drawText = function(geometry, feature) {
stride = geometry.getStride(); stride = geometry.getStride();
break; break;
case GeometryType.CIRCLE: case GeometryType.CIRCLE:
flatCoordinates = /** @type {ol.geom.Circle} */ (geometry).getCenter(); flatCoordinates = /** @type {module:ol/geom/Circle~Circle} */ (geometry).getCenter();
break; break;
case GeometryType.LINE_STRING: case GeometryType.LINE_STRING:
flatCoordinates = /** @type {ol.geom.LineString} */ (geometry).getFlatMidpoint(); flatCoordinates = /** @type {module:ol/geom/LineString~LineString} */ (geometry).getFlatMidpoint();
break; break;
case GeometryType.MULTI_LINE_STRING: case GeometryType.MULTI_LINE_STRING:
flatCoordinates = /** @type {ol.geom.MultiLineString} */ (geometry).getFlatMidpoints(); flatCoordinates = /** @type {module:ol/geom/MultiLineString~MultiLineString} */ (geometry).getFlatMidpoints();
end = flatCoordinates.length; end = flatCoordinates.length;
break; break;
case GeometryType.POLYGON: case GeometryType.POLYGON:
flatCoordinates = /** @type {ol.geom.Polygon} */ (geometry).getFlatInteriorPoint(); flatCoordinates = /** @type {module:ol/geom/Polygon~Polygon} */ (geometry).getFlatInteriorPoint();
break; break;
case GeometryType.MULTI_POLYGON: case GeometryType.MULTI_POLYGON:
flatCoordinates = /** @type {ol.geom.MultiPolygon} */ (geometry).getFlatInteriorPoints(); flatCoordinates = /** @type {module:ol/geom/MultiPolygon~MultiPolygon} */ (geometry).getFlatInteriorPoints();
end = flatCoordinates.length; end = flatCoordinates.length;
break; break;
default: default:
+7 -7
View File
@@ -36,7 +36,7 @@ inherits(LayerRenderer, Observable);
* @param {module:ol/coordinate~Coordinate} coordinate Coordinate. * @param {module:ol/coordinate~Coordinate} coordinate Coordinate.
* @param {olx.FrameState} frameState Frame state. * @param {olx.FrameState} frameState Frame state.
* @param {number} hitTolerance Hit tolerance in pixels. * @param {number} hitTolerance Hit tolerance in pixels.
* @param {function(this: S, (ol.Feature|ol.render.Feature), ol.layer.Layer): T} * @param {function(this: S, (module:ol/Feature~Feature|ol.render.Feature), ol.layer.Layer): T}
* callback Feature callback. * callback Feature callback.
* @param {S} thisArg Value to use as `this` when executing `callback`. * @param {S} thisArg Value to use as `this` when executing `callback`.
* @return {T|undefined} Callback result. * @return {T|undefined} Callback result.
@@ -56,10 +56,10 @@ LayerRenderer.prototype.hasFeatureAtCoordinate = FALSE;
/** /**
* Create a function that adds loaded tiles to the tile lookup. * Create a function that adds loaded tiles to the tile lookup.
* @param {ol.source.Tile} source Tile source. * @param {ol.source.Tile} source Tile source.
* @param {ol.proj.Projection} projection Projection of the tiles. * @param {module:ol/proj/Projection~Projection} projection Projection of the tiles.
* @param {Object.<number, Object.<string, ol.Tile>>} tiles Lookup of loaded * @param {Object.<number, Object.<string, ol.Tile>>} tiles Lookup of loaded
* tiles by zoom level. * tiles by zoom level.
* @return {function(number, ol.TileRange):boolean} A function that can be * @return {function(number, module:ol/TileRange~TileRange):boolean} A function that can be
* called with a zoom level and a tile range to add loaded tiles to the * called with a zoom level and a tile range to add loaded tiles to the
* lookup. * lookup.
* @protected * @protected
@@ -68,7 +68,7 @@ LayerRenderer.prototype.createLoadedTileFinder = function(source, projection, ti
return ( return (
/** /**
* @param {number} zoom Zoom level. * @param {number} zoom Zoom level.
* @param {ol.TileRange} tileRange Tile range. * @param {module:ol/TileRange~TileRange} tileRange Tile range.
* @return {boolean} The tile range is fully loaded. * @return {boolean} The tile range is fully loaded.
*/ */
function(zoom, tileRange) { function(zoom, tileRange) {
@@ -164,10 +164,10 @@ LayerRenderer.prototype.scheduleExpireCache = function(frameState, tileSource) {
/** /**
* @param {!Object.<string, !Object.<string, ol.TileRange>>} usedTiles Used tiles. * @param {!Object.<string, !Object.<string, module:ol/TileRange~TileRange>>} usedTiles Used tiles.
* @param {ol.source.Tile} tileSource Tile source. * @param {ol.source.Tile} tileSource Tile source.
* @param {number} z Z. * @param {number} z Z.
* @param {ol.TileRange} tileRange Tile range. * @param {module:ol/TileRange~TileRange} tileRange Tile range.
* @protected * @protected
*/ */
LayerRenderer.prototype.updateUsedTiles = function(usedTiles, tileSource, z, tileRange) { LayerRenderer.prototype.updateUsedTiles = function(usedTiles, tileSource, z, tileRange) {
@@ -198,7 +198,7 @@ LayerRenderer.prototype.updateUsedTiles = function(usedTiles, tileSource, z, til
* @param {ol.source.Tile} tileSource Tile source. * @param {ol.source.Tile} tileSource Tile source.
* @param {ol.tilegrid.TileGrid} tileGrid Tile grid. * @param {ol.tilegrid.TileGrid} tileGrid Tile grid.
* @param {number} pixelRatio Pixel ratio. * @param {number} pixelRatio Pixel ratio.
* @param {ol.proj.Projection} projection Projection. * @param {module:ol/proj/Projection~Projection} projection Projection.
* @param {module:ol/extent~Extent} extent Extent. * @param {module:ol/extent~Extent} extent Extent.
* @param {number} currentZ Current Z. * @param {number} currentZ Current Z.
* @param {number} preload Load low resolution tiles up to 'preload' levels. * @param {number} preload Load low resolution tiles up to 'preload' levels.
+2 -2
View File
@@ -90,7 +90,7 @@ function expireIconCache(map, frameState) {
* @param {module:ol/coordinate~Coordinate} coordinate Coordinate. * @param {module:ol/coordinate~Coordinate} coordinate Coordinate.
* @param {olx.FrameState} frameState FrameState. * @param {olx.FrameState} frameState FrameState.
* @param {number} hitTolerance Hit tolerance in pixels. * @param {number} hitTolerance Hit tolerance in pixels.
* @param {function(this: S, (ol.Feature|ol.render.Feature), * @param {function(this: S, (module:ol/Feature~Feature|ol.render.Feature),
* ol.layer.Layer): T} callback Feature callback. * ol.layer.Layer): T} callback Feature callback.
* @param {S} thisArg Value to use as `this` when executing `callback`. * @param {S} thisArg Value to use as `this` when executing `callback`.
* @param {function(this: U, ol.layer.Layer): boolean} layerFilter Layer filter * @param {function(this: U, ol.layer.Layer): boolean} layerFilter Layer filter
@@ -108,7 +108,7 @@ MapRenderer.prototype.forEachFeatureAtCoordinate = function(coordinate, frameSta
const viewResolution = viewState.resolution; const viewResolution = viewState.resolution;
/** /**
* @param {ol.Feature|ol.render.Feature} feature Feature. * @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
* @param {ol.layer.Layer} layer Layer. * @param {ol.layer.Layer} layer Layer.
* @return {?} Callback result. * @return {?} Callback result.
*/ */
+1 -1
View File
@@ -107,7 +107,7 @@ IntermediateCanvasRenderer.prototype.forEachFeatureAtCoordinate = function(coord
return source.forEachFeatureAtCoordinate( return source.forEachFeatureAtCoordinate(
coordinate, resolution, rotation, hitTolerance, skippedFeatureUids, coordinate, resolution, rotation, hitTolerance, skippedFeatureUids,
/** /**
* @param {ol.Feature|ol.render.Feature} feature Feature. * @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
* @return {?} Callback result. * @return {?} Callback result.
*/ */
function(feature) { function(feature) {
+1 -1
View File
@@ -60,7 +60,7 @@ const CanvasTileLayerRenderer = function(tileLayer) {
/** /**
* @private * @private
* @type {ol.TileRange} * @type {module:ol/TileRange~TileRange}
*/ */
this.tmpTileRange_ = new TileRange(0, 0, 0, 0); this.tmpTileRange_ = new TileRange(0, 0, 0, 0);
+6 -6
View File
@@ -58,7 +58,7 @@ const CanvasVectorLayerRenderer = function(vectorLayer) {
/** /**
* @private * @private
* @type {function(ol.Feature, ol.Feature): number|null} * @type {function(module:ol/Feature~Feature, module:ol/Feature~Feature): number|null}
*/ */
this.renderedRenderOrder_ = null; this.renderedRenderOrder_ = null;
@@ -257,7 +257,7 @@ CanvasVectorLayerRenderer.prototype.forEachFeatureAtCoordinate = function(coordi
const features = {}; const features = {};
const result = this.replayGroup_.forEachFeatureAtCoordinate(coordinate, resolution, rotation, hitTolerance, {}, const result = this.replayGroup_.forEachFeatureAtCoordinate(coordinate, resolution, rotation, hitTolerance, {},
/** /**
* @param {ol.Feature|ol.render.Feature} feature Feature. * @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
* @return {?} Callback result. * @return {?} Callback result.
*/ */
function(feature) { function(feature) {
@@ -358,7 +358,7 @@ CanvasVectorLayerRenderer.prototype.prepareFrame = function(frameState, layerSta
pixelRatio, vectorSource.getOverlaps(), this.declutterTree_, vectorLayer.getRenderBuffer()); pixelRatio, vectorSource.getOverlaps(), this.declutterTree_, vectorLayer.getRenderBuffer());
vectorSource.loadFeatures(extent, resolution, projection); vectorSource.loadFeatures(extent, resolution, projection);
/** /**
* @param {ol.Feature} feature Feature. * @param {module:ol/Feature~Feature} feature Feature.
* @this {ol.renderer.canvas.VectorLayer} * @this {ol.renderer.canvas.VectorLayer}
*/ */
const render = function(feature) { const render = function(feature) {
@@ -374,11 +374,11 @@ CanvasVectorLayerRenderer.prototype.prepareFrame = function(frameState, layerSta
} }
}.bind(this); }.bind(this);
if (vectorLayerRenderOrder) { if (vectorLayerRenderOrder) {
/** @type {Array.<ol.Feature>} */ /** @type {Array.<module:ol/Feature~Feature>} */
const features = []; const features = [];
vectorSource.forEachFeatureInExtent(extent, vectorSource.forEachFeatureInExtent(extent,
/** /**
* @param {ol.Feature} feature Feature. * @param {module:ol/Feature~Feature} feature Feature.
*/ */
function(feature) { function(feature) {
features.push(feature); features.push(feature);
@@ -404,7 +404,7 @@ CanvasVectorLayerRenderer.prototype.prepareFrame = function(frameState, layerSta
/** /**
* @param {ol.Feature} feature Feature. * @param {module:ol/Feature~Feature} feature Feature.
* @param {number} resolution Resolution. * @param {number} resolution Resolution.
* @param {number} pixelRatio Pixel ratio. * @param {number} pixelRatio Pixel ratio.
* @param {(ol.style.Style|Array.<ol.style.Style>)} styles The style or array of * @param {(ol.style.Style|Array.<ol.style.Style>)} styles The style or array of
+3 -3
View File
@@ -197,7 +197,7 @@ CanvasVectorTileLayerRenderer.prototype.createReplayGroup_ = function(tile, fram
const squaredTolerance = getSquaredRenderTolerance(resolution, pixelRatio); const squaredTolerance = getSquaredRenderTolerance(resolution, pixelRatio);
/** /**
* @param {ol.Feature|ol.render.Feature} feature Feature. * @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
* @this {ol.renderer.canvas.VectorTileLayer} * @this {ol.renderer.canvas.VectorTileLayer}
*/ */
const render = function(feature) { const render = function(feature) {
@@ -292,7 +292,7 @@ CanvasVectorTileLayerRenderer.prototype.forEachFeatureAtCoordinate = function(co
replayGroup = sourceTile.getReplayGroup(layer, tile.tileCoord.toString()); replayGroup = sourceTile.getReplayGroup(layer, tile.tileCoord.toString());
found = found || replayGroup.forEachFeatureAtCoordinate(coordinate, resolution, rotation, hitTolerance, {}, found = found || replayGroup.forEachFeatureAtCoordinate(coordinate, resolution, rotation, hitTolerance, {},
/** /**
* @param {ol.Feature|ol.render.Feature} feature Feature. * @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
* @return {?} Callback result. * @return {?} Callback result.
*/ */
function(feature) { function(feature) {
@@ -446,7 +446,7 @@ CanvasVectorTileLayerRenderer.prototype.postCompose = function(context, frameSta
/** /**
* @param {ol.Feature|ol.render.Feature} feature Feature. * @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
* @param {number} squaredTolerance Squared tolerance. * @param {number} squaredTolerance Squared tolerance.
* @param {(ol.style.Style|Array.<ol.style.Style>)} styles The style or array of * @param {(ol.style.Style|Array.<ol.style.Style>)} styles The style or array of
* styles. * styles.
+26 -26
View File
@@ -16,8 +16,8 @@ const SIMPLIFY_TOLERANCE = 0.5;
/** /**
* @const * @const
* @type {Object.<ol.geom.GeometryType, * @type {Object.<module:ol/geom/GeometryType~GeometryType,
* function(ol.render.ReplayGroup, ol.geom.Geometry, * function(ol.render.ReplayGroup, module:ol/geom/Geometry~Geometry,
* ol.style.Style, Object)>} * ol.style.Style, Object)>}
*/ */
const GEOMETRY_RENDERERS = { const GEOMETRY_RENDERERS = {
@@ -33,8 +33,8 @@ const GEOMETRY_RENDERERS = {
/** /**
* @param {ol.Feature|ol.render.Feature} feature1 Feature 1. * @param {module:ol/Feature~Feature|ol.render.Feature} feature1 Feature 1.
* @param {ol.Feature|ol.render.Feature} feature2 Feature 2. * @param {module:ol/Feature~Feature|ol.render.Feature} feature2 Feature 2.
* @return {number} Order. * @return {number} Order.
*/ */
export function defaultOrder(feature1, feature2) { export function defaultOrder(feature1, feature2) {
@@ -65,9 +65,9 @@ export function getTolerance(resolution, pixelRatio) {
/** /**
* @param {ol.render.ReplayGroup} replayGroup Replay group. * @param {ol.render.ReplayGroup} replayGroup Replay group.
* @param {ol.geom.Circle} geometry Geometry. * @param {module:ol/geom/Circle~Circle} geometry Geometry.
* @param {ol.style.Style} style Style. * @param {ol.style.Style} style Style.
* @param {ol.Feature} feature Feature. * @param {module:ol/Feature~Feature} feature Feature.
*/ */
function renderCircleGeometry(replayGroup, geometry, style, feature) { function renderCircleGeometry(replayGroup, geometry, style, feature) {
const fillStyle = style.getFill(); const fillStyle = style.getFill();
@@ -88,7 +88,7 @@ function renderCircleGeometry(replayGroup, geometry, style, feature) {
/** /**
* @param {ol.render.ReplayGroup} replayGroup Replay group. * @param {ol.render.ReplayGroup} replayGroup Replay group.
* @param {ol.Feature|ol.render.Feature} feature Feature. * @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
* @param {ol.style.Style} style Style. * @param {ol.style.Style} style Style.
* @param {number} squaredTolerance Squared tolerance. * @param {number} squaredTolerance Squared tolerance.
* @param {function(this: T, ol.events.Event)} listener Listener function. * @param {function(this: T, ol.events.Event)} listener Listener function.
@@ -120,7 +120,7 @@ export function renderFeature(replayGroup, feature, style, squaredTolerance, lis
/** /**
* @param {ol.render.ReplayGroup} replayGroup Replay group. * @param {ol.render.ReplayGroup} replayGroup Replay group.
* @param {ol.Feature|ol.render.Feature} feature Feature. * @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
* @param {ol.style.Style} style Style. * @param {ol.style.Style} style Style.
* @param {number} squaredTolerance Squared tolerance. * @param {number} squaredTolerance Squared tolerance.
*/ */
@@ -142,28 +142,28 @@ function renderFeatureInternal(replayGroup, feature, style, squaredTolerance) {
/** /**
* @param {ol.render.ReplayGroup} replayGroup Replay group. * @param {ol.render.ReplayGroup} replayGroup Replay group.
* @param {ol.geom.Geometry} geometry Geometry. * @param {module:ol/geom/Geometry~Geometry} geometry Geometry.
* @param {ol.style.Style} style Style. * @param {ol.style.Style} style Style.
* @param {ol.Feature|ol.render.Feature} feature Feature. * @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
*/ */
function renderGeometry(replayGroup, geometry, style, feature) { function renderGeometry(replayGroup, geometry, style, feature) {
if (geometry.getType() == GeometryType.GEOMETRY_COLLECTION) { if (geometry.getType() == GeometryType.GEOMETRY_COLLECTION) {
const geometries = /** @type {ol.geom.GeometryCollection} */ (geometry).getGeometries(); const geometries = /** @type {module:ol/geom/GeometryCollection~GeometryCollection} */ (geometry).getGeometries();
for (let i = 0, ii = geometries.length; i < ii; ++i) { for (let i = 0, ii = geometries.length; i < ii; ++i) {
renderGeometry(replayGroup, geometries[i], style, feature); renderGeometry(replayGroup, geometries[i], style, feature);
} }
return; return;
} }
const replay = replayGroup.getReplay(style.getZIndex(), ReplayType.DEFAULT); const replay = replayGroup.getReplay(style.getZIndex(), ReplayType.DEFAULT);
replay.drawCustom(/** @type {ol.geom.SimpleGeometry} */ (geometry), feature, style.getRenderer()); replay.drawCustom(/** @type {module:ol/geom/SimpleGeometry~SimpleGeometry} */ (geometry), feature, style.getRenderer());
} }
/** /**
* @param {ol.render.ReplayGroup} replayGroup Replay group. * @param {ol.render.ReplayGroup} replayGroup Replay group.
* @param {ol.geom.GeometryCollection} geometry Geometry. * @param {module:ol/geom/GeometryCollection~GeometryCollection} geometry Geometry.
* @param {ol.style.Style} style Style. * @param {ol.style.Style} style Style.
* @param {ol.Feature} feature Feature. * @param {module:ol/Feature~Feature} feature Feature.
*/ */
function renderGeometryCollectionGeometry(replayGroup, geometry, style, feature) { function renderGeometryCollectionGeometry(replayGroup, geometry, style, feature) {
const geometries = geometry.getGeometriesArray(); const geometries = geometry.getGeometriesArray();
@@ -178,9 +178,9 @@ function renderGeometryCollectionGeometry(replayGroup, geometry, style, feature)
/** /**
* @param {ol.render.ReplayGroup} replayGroup Replay group. * @param {ol.render.ReplayGroup} replayGroup Replay group.
* @param {ol.geom.LineString|ol.render.Feature} geometry Geometry. * @param {module:ol/geom/LineString~LineString|ol.render.Feature} geometry Geometry.
* @param {ol.style.Style} style Style. * @param {ol.style.Style} style Style.
* @param {ol.Feature|ol.render.Feature} feature Feature. * @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
*/ */
function renderLineStringGeometry(replayGroup, geometry, style, feature) { function renderLineStringGeometry(replayGroup, geometry, style, feature) {
const strokeStyle = style.getStroke(); const strokeStyle = style.getStroke();
@@ -200,9 +200,9 @@ function renderLineStringGeometry(replayGroup, geometry, style, feature) {
/** /**
* @param {ol.render.ReplayGroup} replayGroup Replay group. * @param {ol.render.ReplayGroup} replayGroup Replay group.
* @param {ol.geom.MultiLineString|ol.render.Feature} geometry Geometry. * @param {module:ol/geom/MultiLineString~MultiLineString|ol.render.Feature} geometry Geometry.
* @param {ol.style.Style} style Style. * @param {ol.style.Style} style Style.
* @param {ol.Feature|ol.render.Feature} feature Feature. * @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
*/ */
function renderMultiLineStringGeometry(replayGroup, geometry, style, feature) { function renderMultiLineStringGeometry(replayGroup, geometry, style, feature) {
const strokeStyle = style.getStroke(); const strokeStyle = style.getStroke();
@@ -222,9 +222,9 @@ function renderMultiLineStringGeometry(replayGroup, geometry, style, feature) {
/** /**
* @param {ol.render.ReplayGroup} replayGroup Replay group. * @param {ol.render.ReplayGroup} replayGroup Replay group.
* @param {ol.geom.MultiPolygon} geometry Geometry. * @param {module:ol/geom/MultiPolygon~MultiPolygon} geometry Geometry.
* @param {ol.style.Style} style Style. * @param {ol.style.Style} style Style.
* @param {ol.Feature} feature Feature. * @param {module:ol/Feature~Feature} feature Feature.
*/ */
function renderMultiPolygonGeometry(replayGroup, geometry, style, feature) { function renderMultiPolygonGeometry(replayGroup, geometry, style, feature) {
const fillStyle = style.getFill(); const fillStyle = style.getFill();
@@ -245,9 +245,9 @@ function renderMultiPolygonGeometry(replayGroup, geometry, style, feature) {
/** /**
* @param {ol.render.ReplayGroup} replayGroup Replay group. * @param {ol.render.ReplayGroup} replayGroup Replay group.
* @param {ol.geom.Point|ol.render.Feature} geometry Geometry. * @param {module:ol/geom/Point~Point|ol.render.Feature} geometry Geometry.
* @param {ol.style.Style} style Style. * @param {ol.style.Style} style Style.
* @param {ol.Feature|ol.render.Feature} feature Feature. * @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
*/ */
function renderPointGeometry(replayGroup, geometry, style, feature) { function renderPointGeometry(replayGroup, geometry, style, feature) {
const imageStyle = style.getImage(); const imageStyle = style.getImage();
@@ -270,9 +270,9 @@ function renderPointGeometry(replayGroup, geometry, style, feature) {
/** /**
* @param {ol.render.ReplayGroup} replayGroup Replay group. * @param {ol.render.ReplayGroup} replayGroup Replay group.
* @param {ol.geom.MultiPoint|ol.render.Feature} geometry Geometry. * @param {module:ol/geom/MultiPoint~MultiPoint|ol.render.Feature} geometry Geometry.
* @param {ol.style.Style} style Style. * @param {ol.style.Style} style Style.
* @param {ol.Feature|ol.render.Feature} feature Feature. * @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
*/ */
function renderMultiPointGeometry(replayGroup, geometry, style, feature) { function renderMultiPointGeometry(replayGroup, geometry, style, feature) {
const imageStyle = style.getImage(); const imageStyle = style.getImage();
@@ -295,9 +295,9 @@ function renderMultiPointGeometry(replayGroup, geometry, style, feature) {
/** /**
* @param {ol.render.ReplayGroup} replayGroup Replay group. * @param {ol.render.ReplayGroup} replayGroup Replay group.
* @param {ol.geom.Polygon|ol.render.Feature} geometry Geometry. * @param {module:ol/geom/Polygon~Polygon|ol.render.Feature} geometry Geometry.
* @param {ol.style.Style} style Style. * @param {ol.style.Style} style Style.
* @param {ol.Feature|ol.render.Feature} feature Feature. * @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
*/ */
function renderPolygonGeometry(replayGroup, geometry, style, feature) { function renderPolygonGeometry(replayGroup, geometry, style, feature) {
const fillStyle = style.getFill(); const fillStyle = style.getFill();
+1 -1
View File
@@ -116,7 +116,7 @@ WebGLImageLayerRenderer.prototype.forEachFeatureAtCoordinate = function(coordina
coordinate, resolution, rotation, hitTolerance, skippedFeatureUids, coordinate, resolution, rotation, hitTolerance, skippedFeatureUids,
/** /**
* @param {ol.Feature|ol.render.Feature} feature Feature. * @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
* @return {?} Callback result. * @return {?} Callback result.
*/ */
function(feature) { function(feature) {
+2 -2
View File
@@ -68,7 +68,7 @@ const WebGLTileLayerRenderer = function(mapRenderer, tileLayer) {
/** /**
* @private * @private
* @type {ol.TileRange} * @type {module:ol/TileRange~TileRange}
*/ */
this.renderedTileRange_ = null; this.renderedTileRange_ = null;
@@ -139,7 +139,7 @@ WebGLTileLayerRenderer.prototype.createLoadedTileFinder = function(source, proje
return ( return (
/** /**
* @param {number} zoom Zoom level. * @param {number} zoom Zoom level.
* @param {ol.TileRange} tileRange Tile range. * @param {module:ol/TileRange~TileRange} tileRange Tile range.
* @return {boolean} The tile range is fully loaded. * @return {boolean} The tile range is fully loaded.
*/ */
function(zoom, tileRange) { function(zoom, tileRange) {
+6 -6
View File
@@ -48,7 +48,7 @@ const WebGLVectorLayerRenderer = function(mapRenderer, vectorLayer) {
/** /**
* @private * @private
* @type {function(ol.Feature, ol.Feature): number|null} * @type {function(module:ol/Feature~Feature, module:ol/Feature~Feature): number|null}
*/ */
this.renderedRenderOrder_ = null; this.renderedRenderOrder_ = null;
@@ -150,7 +150,7 @@ WebGLVectorLayerRenderer.prototype.forEachFeatureAtCoordinate = function(coordin
frameState.size, frameState.pixelRatio, layerState.opacity, frameState.size, frameState.pixelRatio, layerState.opacity,
{}, {},
/** /**
* @param {ol.Feature|ol.render.Feature} feature Feature. * @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
* @return {?} Callback result. * @return {?} Callback result.
*/ */
function(feature) { function(feature) {
@@ -261,7 +261,7 @@ WebGLVectorLayerRenderer.prototype.prepareFrame = function(frameState, layerStat
extent, vectorLayer.getRenderBuffer()); extent, vectorLayer.getRenderBuffer());
vectorSource.loadFeatures(extent, resolution, projection); vectorSource.loadFeatures(extent, resolution, projection);
/** /**
* @param {ol.Feature} feature Feature. * @param {module:ol/Feature~Feature} feature Feature.
* @this {ol.renderer.webgl.VectorLayer} * @this {ol.renderer.webgl.VectorLayer}
*/ */
const render = function(feature) { const render = function(feature) {
@@ -277,11 +277,11 @@ WebGLVectorLayerRenderer.prototype.prepareFrame = function(frameState, layerStat
} }
}; };
if (vectorLayerRenderOrder) { if (vectorLayerRenderOrder) {
/** @type {Array.<ol.Feature>} */ /** @type {Array.<module:ol/Feature~Feature>} */
const features = []; const features = [];
vectorSource.forEachFeatureInExtent(extent, vectorSource.forEachFeatureInExtent(extent,
/** /**
* @param {ol.Feature} feature Feature. * @param {module:ol/Feature~Feature} feature Feature.
*/ */
function(feature) { function(feature) {
features.push(feature); features.push(feature);
@@ -304,7 +304,7 @@ WebGLVectorLayerRenderer.prototype.prepareFrame = function(frameState, layerStat
/** /**
* @param {ol.Feature} feature Feature. * @param {module:ol/Feature~Feature} feature Feature.
* @param {number} resolution Resolution. * @param {number} resolution Resolution.
* @param {number} pixelRatio Pixel ratio. * @param {number} pixelRatio Pixel ratio.
* @param {(ol.style.Style|Array.<ol.style.Style>)} styles The style or array of * @param {(ol.style.Style|Array.<ol.style.Style>)} styles The style or array of
+4 -4
View File
@@ -18,8 +18,8 @@ import Triangulation from '../reproj/Triangulation.js';
* *
* @constructor * @constructor
* @extends {ol.ImageBase} * @extends {ol.ImageBase}
* @param {ol.proj.Projection} sourceProj Source projection (of the data). * @param {module:ol/proj/Projection~Projection} sourceProj Source projection (of the data).
* @param {ol.proj.Projection} targetProj Target projection. * @param {module:ol/proj/Projection~Projection} targetProj Target projection.
* @param {module:ol/extent~Extent} targetExtent Target extent. * @param {module:ol/extent~Extent} targetExtent Target extent.
* @param {number} targetResolution Target resolution. * @param {number} targetResolution Target resolution.
* @param {number} pixelRatio Pixel ratio. * @param {number} pixelRatio Pixel ratio.
@@ -31,7 +31,7 @@ const ReprojImage = function(sourceProj, targetProj,
/** /**
* @private * @private
* @type {ol.proj.Projection} * @type {module:ol/proj/Projection~Projection}
*/ */
this.targetProj_ = targetProj; this.targetProj_ = targetProj;
@@ -132,7 +132,7 @@ ReprojImage.prototype.getImage = function() {
/** /**
* @return {ol.proj.Projection} Projection. * @return {module:ol/proj/Projection~Projection} Projection.
*/ */
ReprojImage.prototype.getProjection = function() { ReprojImage.prototype.getProjection = function() {
return this.targetProj_; return this.targetProj_;
+2 -2
View File
@@ -19,9 +19,9 @@ import Triangulation from '../reproj/Triangulation.js';
* *
* @constructor * @constructor
* @extends {ol.Tile} * @extends {ol.Tile}
* @param {ol.proj.Projection} sourceProj Source projection. * @param {module:ol/proj/Projection~Projection} sourceProj Source projection.
* @param {ol.tilegrid.TileGrid} sourceTileGrid Source tile grid. * @param {ol.tilegrid.TileGrid} sourceTileGrid Source tile grid.
* @param {ol.proj.Projection} targetProj Target projection. * @param {module:ol/proj/Projection~Projection} targetProj Target projection.
* @param {ol.tilegrid.TileGrid} targetTileGrid Target tile grid. * @param {ol.tilegrid.TileGrid} targetTileGrid Target tile grid.
* @param {module:ol/tilecoord~TileCoord} tileCoord Coordinate of the tile. * @param {module:ol/tilecoord~TileCoord} tileCoord Coordinate of the tile.
* @param {module:ol/tilecoord~TileCoord} wrappedTileCoord Coordinate of the tile wrapped in X. * @param {module:ol/tilecoord~TileCoord} wrappedTileCoord Coordinate of the tile wrapped in X.
+4 -4
View File
@@ -33,8 +33,8 @@ const MAX_TRIANGLE_WIDTH = 0.25;
* Class containing triangulation of the given target extent. * Class containing triangulation of the given target extent.
* Used for determining source data and the reprojection itself. * Used for determining source data and the reprojection itself.
* *
* @param {ol.proj.Projection} sourceProj Source projection. * @param {module:ol/proj/Projection~Projection} sourceProj Source projection.
* @param {ol.proj.Projection} targetProj Target projection. * @param {module:ol/proj/Projection~Projection} targetProj Target projection.
* @param {module:ol/extent~Extent} targetExtent Target extent to triangulate. * @param {module:ol/extent~Extent} targetExtent Target extent to triangulate.
* @param {module:ol/extent~Extent} maxSourceExtent Maximal source extent that can be used. * @param {module:ol/extent~Extent} maxSourceExtent Maximal source extent that can be used.
* @param {number} errorThreshold Acceptable error (in source units). * @param {number} errorThreshold Acceptable error (in source units).
@@ -44,13 +44,13 @@ const Triangulation = function(sourceProj, targetProj, targetExtent,
maxSourceExtent, errorThreshold) { maxSourceExtent, errorThreshold) {
/** /**
* @type {ol.proj.Projection} * @type {module:ol/proj/Projection~Projection}
* @private * @private
*/ */
this.sourceProj_ = sourceProj; this.sourceProj_ = sourceProj;
/** /**
* @type {ol.proj.Projection} * @type {module:ol/proj/Projection~Projection}
* @private * @private
*/ */
this.targetProj_ = targetProj; this.targetProj_ = targetProj;
+1 -1
View File
@@ -151,7 +151,7 @@ BingMaps.prototype.handleImageryMetadataResponse = function(response) {
/** /**
* @param {module:ol/tilecoord~TileCoord} tileCoord Tile coordinate. * @param {module:ol/tilecoord~TileCoord} tileCoord Tile coordinate.
* @param {number} pixelRatio Pixel ratio. * @param {number} pixelRatio Pixel ratio.
* @param {ol.proj.Projection} projection Projection. * @param {module:ol/proj/Projection~Projection} projection Projection.
* @return {string|undefined} Tile URL. * @return {string|undefined} Tile URL.
*/ */
function(tileCoord, pixelRatio, projection) { function(tileCoord, pixelRatio, projection) {

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