Merge pull request #7971 from tschaub/module-types
Use module syntax for type annotations
This commit is contained in:
@@ -43,7 +43,7 @@ Unknown `serverType` configured.
|
||||
|
||||
### 10
|
||||
|
||||
The default `geometryFunction` can only handle `ol.geom.Point` geometries.
|
||||
The default `geometryFunction` can only handle `ol/geom/Point` geometries.
|
||||
|
||||
### 11
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ const style = new Style({
|
||||
* The styling function for the vector layer, will return an array of styles
|
||||
* which either contains the aboove gradient or pattern.
|
||||
*
|
||||
* @param {ol.Feature} feature The feature to style.
|
||||
* @param {module:ol/Feature~Feature} feature The feature to style.
|
||||
* @param {number} resolution Resolution.
|
||||
* @return {ol.style.Style} The style to use for the feature.
|
||||
*/
|
||||
|
||||
@@ -61,7 +61,7 @@ const map = new Map({
|
||||
const zoomtoswitzerlandbest = document.getElementById('zoomtoswitzerlandbest');
|
||||
zoomtoswitzerlandbest.addEventListener('click', function() {
|
||||
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});
|
||||
}, false);
|
||||
|
||||
@@ -69,7 +69,7 @@ const zoomtoswitzerlandconstrained =
|
||||
document.getElementById('zoomtoswitzerlandconstrained');
|
||||
zoomtoswitzerlandconstrained.addEventListener('click', function() {
|
||||
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]});
|
||||
}, false);
|
||||
|
||||
@@ -77,21 +77,21 @@ const zoomtoswitzerlandnearest =
|
||||
document.getElementById('zoomtoswitzerlandnearest');
|
||||
zoomtoswitzerlandnearest.addEventListener('click', function() {
|
||||
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});
|
||||
}, false);
|
||||
|
||||
const zoomtolausanne = document.getElementById('zoomtolausanne');
|
||||
zoomtolausanne.addEventListener('click', function() {
|
||||
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});
|
||||
}, false);
|
||||
|
||||
const centerlausanne = document.getElementById('centerlausanne');
|
||||
centerlausanne.addEventListener('click', function() {
|
||||
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());
|
||||
view.centerOn(point.getCoordinates(), size, [570, 500]);
|
||||
}, false);
|
||||
|
||||
@@ -49,7 +49,7 @@ app.Drag = function() {
|
||||
this.cursor_ = 'pointer';
|
||||
|
||||
/**
|
||||
* @type {ol.Feature}
|
||||
* @type {module:ol/Feature~Feature}
|
||||
* @private
|
||||
*/
|
||||
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.
|
||||
*/
|
||||
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) {
|
||||
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) {
|
||||
if (this.cursor_) {
|
||||
|
||||
2
examples/d3.js
vendored
2
examples/d3.js
vendored
@@ -37,7 +37,7 @@ d3.json('data/topojson/us.json', function(error, us) {
|
||||
* @param {number} resolution Resolution.
|
||||
* @param {number} pixelRatio Pixel ratio.
|
||||
* @param {ol.Size} size Size.
|
||||
* @param {ol.proj.Projection} projection Projection.
|
||||
* @param {module:ol/proj/Projection~Projection} projection Projection.
|
||||
* @return {HTMLCanvasElement} A canvas element.
|
||||
*/
|
||||
const canvasFunction = function(extent, resolution, pixelRatio, size, projection) {
|
||||
|
||||
@@ -57,7 +57,7 @@ const polyline = [
|
||||
'~@ym@yjA??a@cFd@kBrCgDbAUnAcBhAyAdk@et@??kF}D??OL'
|
||||
].join('');
|
||||
|
||||
const route = /** @type {ol.geom.LineString} */ (new Polyline({
|
||||
const route = /** @type {module:ol/geom/LineString~LineString} */ (new Polyline({
|
||||
factor: 1e6
|
||||
}).readGeometry(polyline, {
|
||||
dataProjection: 'EPSG:4326',
|
||||
@@ -197,7 +197,7 @@ function stopAnimation(ended) {
|
||||
|
||||
// if animation cancelled set the marker at the beginning
|
||||
const coord = ended ? routeCoords[routeLength - 1] : routeCoords[0];
|
||||
/** @type {ol.geom.Point} */ (geoMarker.getGeometry())
|
||||
/** @type {module:ol/geom/Point~Point} */ (geoMarker.getGeometry())
|
||||
.setCoordinates(coord);
|
||||
//remove listener
|
||||
map.un('postcompose', moveFeature);
|
||||
|
||||
@@ -43,7 +43,7 @@ map.addOverlay(marker);
|
||||
// is time aware.
|
||||
// The Z dimension is actually used to store the rotation (heading).
|
||||
const positions = new LineString([],
|
||||
/** @type {ol.geom.GeometryLayout} */ ('XYZM'));
|
||||
/** @type {module:ol/geom/GeometryLayout~GeometryLayout} */ ('XYZM'));
|
||||
|
||||
// Geolocation Control
|
||||
const geolocation = new Geolocation({
|
||||
|
||||
@@ -192,7 +192,7 @@ document.getElementById('time').addEventListener('input', function() {
|
||||
const value = parseInt(this.value, 10) / 100;
|
||||
const m = time.start + (time.duration * value);
|
||||
vectorSource.forEachFeature(function(feature) {
|
||||
const geometry = /** @type {ol.geom.LineString} */ (feature.getGeometry());
|
||||
const geometry = /** @type {module:ol/geom/LineString~LineString} */ (feature.getGeometry());
|
||||
const coordinate = geometry.getCoordinateAtM(m, true);
|
||||
let highlight = feature.get('highlight');
|
||||
if (highlight === undefined) {
|
||||
|
||||
@@ -44,7 +44,7 @@ const vector = new VectorLayer({
|
||||
|
||||
/**
|
||||
* Currently drawn feature.
|
||||
* @type {ol.Feature}
|
||||
* @type {module:ol/Feature~Feature}
|
||||
*/
|
||||
let sketch;
|
||||
|
||||
@@ -93,7 +93,7 @@ const continueLineMsg = 'Click to continue drawing the line';
|
||||
|
||||
/**
|
||||
* Handle pointer move.
|
||||
* @param {ol.MapBrowserEvent} evt The event.
|
||||
* @param {module:ol/MapBrowserEvent~MapBrowserEvent} evt The event.
|
||||
*/
|
||||
const pointerMoveHandler = function(evt) {
|
||||
if (evt.dragging) {
|
||||
@@ -140,7 +140,7 @@ let draw; // global so we can remove it later
|
||||
|
||||
/**
|
||||
* Format length output.
|
||||
* @param {ol.geom.LineString} line The line.
|
||||
* @param {module:ol/geom/LineString~LineString} line The line.
|
||||
* @return {string} The formatted length.
|
||||
*/
|
||||
const formatLength = function(line) {
|
||||
@@ -159,7 +159,7 @@ const formatLength = function(line) {
|
||||
|
||||
/**
|
||||
* Format area output.
|
||||
* @param {ol.geom.Polygon} polygon The polygon.
|
||||
* @param {module:ol/geom/Polygon~Polygon} polygon The polygon.
|
||||
* @return {string} Formatted area.
|
||||
*/
|
||||
const formatArea = function(polygon) {
|
||||
|
||||
@@ -10,7 +10,7 @@ import TileWMS from '../src/ol/source/TileWMS.js';
|
||||
|
||||
// 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
|
||||
// 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.
|
||||
|
||||
const projection = new Projection({
|
||||
@@ -23,7 +23,7 @@ const projection = new Projection({
|
||||
addProjection(projection);
|
||||
|
||||
// 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).
|
||||
|
||||
addCoordinateTransforms('EPSG:4326', projection,
|
||||
|
||||
@@ -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.Icon, olx.style.IconOptions=)} Icon Icon 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>}
|
||||
*/
|
||||
var createMapboxStreetsV6Style = function(Style, Fill, Stroke, Icon, Text) {};
|
||||
|
||||
@@ -74,7 +74,7 @@ oli.DragBoxEvent.prototype.coordinate;
|
||||
|
||||
|
||||
/**
|
||||
* @type {ol.MapBrowserEvent}
|
||||
* @type {module:ol/MapBrowserEvent~MapBrowserEvent}
|
||||
*/
|
||||
oli.DragBoxEvent.prototype.mapBrowserEvent;
|
||||
|
||||
@@ -86,7 +86,7 @@ oli.DrawEvent = function() {};
|
||||
|
||||
|
||||
/**
|
||||
* @type {ol.Feature}
|
||||
* @type {module:ol/Feature~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;
|
||||
|
||||
|
||||
/**
|
||||
* @type {ol.MapBrowserEvent}
|
||||
* @type {module:ol/MapBrowserEvent~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;
|
||||
|
||||
|
||||
/**
|
||||
* @type {Array.<ol.Feature>}
|
||||
* @type {Array.<module:ol/Feature~Feature>}
|
||||
*/
|
||||
oli.SelectEvent.prototype.selected;
|
||||
|
||||
|
||||
/**
|
||||
* @type {ol.MapBrowserEvent}
|
||||
* @type {module:ol/MapBrowserEvent~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;
|
||||
|
||||
|
||||
/**
|
||||
* @type {ol.proj.Projection|undefined}
|
||||
* @type {module:ol/proj/Projection~Projection|undefined}
|
||||
*/
|
||||
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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
114
externs/olx.js
114
externs/olx.js
@@ -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.
|
||||
* Default is {@link ol.events.condition.always}.
|
||||
* @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.
|
||||
* Default is `true` if the area of the box is bigger than the `minArea` option.
|
||||
* @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.
|
||||
* Default is {@link ol.events.condition.noModifierKeys}.
|
||||
* @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.
|
||||
* Default is {@link ol.events.condition.shiftKeyOnly}.
|
||||
* @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.
|
||||
* Default is {@link ol.events.condition.altShiftKeysOnly}.
|
||||
* @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.
|
||||
* Default is {@link ol.events.condition.shiftKeyOnly}.
|
||||
* @type {ol.EventsConditionType|undefined}
|
||||
@@ -239,11 +239,11 @@ olx.interaction.DragZoomOptions.prototype.out;
|
||||
|
||||
/**
|
||||
* @typedef {{clickTolerance: (number|undefined),
|
||||
* features: (ol.Collection.<ol.Feature>|undefined),
|
||||
* features: (ol.Collection.<module:ol/Feature~Feature>|undefined),
|
||||
* source: (ol.source.Vector|undefined),
|
||||
* dragVertexDelay: (number|undefined),
|
||||
* snapTolerance: (number|undefined),
|
||||
* type: (ol.geom.GeometryType|string),
|
||||
* type: (module:ol/geom/GeometryType~GeometryType|string),
|
||||
* stopClick: (boolean|undefined),
|
||||
* maxPoints: (number|undefined),
|
||||
* minPoints: (number|undefined),
|
||||
@@ -273,7 +273,7 @@ olx.interaction.DrawOptions.prototype.clickTolerance;
|
||||
|
||||
/**
|
||||
* Destination collection for the drawn features.
|
||||
* @type {ol.Collection.<ol.Feature>|undefined}
|
||||
* @type {ol.Collection.<module:ol/Feature~Feature>|undefined}
|
||||
* @api
|
||||
*/
|
||||
olx.interaction.DrawOptions.prototype.features;
|
||||
@@ -306,7 +306,7 @@ olx.interaction.DrawOptions.prototype.snapTolerance;
|
||||
/**
|
||||
* Drawing type ('Point', 'LineString', 'Polygon', 'MultiPoint',
|
||||
* 'MultiLineString', 'MultiPolygon' or 'Circle').
|
||||
* @type {ol.geom.GeometryType|string}
|
||||
* @type {module:ol/geom/GeometryType~GeometryType|string}
|
||||
* @api
|
||||
*/
|
||||
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.
|
||||
* @type {ol.EventsConditionType|undefined}
|
||||
* @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.
|
||||
* By default {@link ol.events.condition.noModifierKeys}, i.e. a click, adds a
|
||||
* vertex or deactivates freehand drawing.
|
||||
@@ -395,7 +395,7 @@ olx.interaction.DrawOptions.prototype.freehand;
|
||||
|
||||
/**
|
||||
* 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
|
||||
* {@link ol.events.condition.shiftKeyOnly}, meaning that the Shift key
|
||||
* activates freehand drawing.
|
||||
@@ -432,7 +432,7 @@ olx.interaction.ExtentOptions.prototype.extent;
|
||||
|
||||
/**
|
||||
* 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}
|
||||
* @api
|
||||
*/
|
||||
@@ -448,7 +448,7 @@ olx.interaction.ExtentOptions.prototype.pixelTolerance;
|
||||
|
||||
/**
|
||||
* 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}
|
||||
* @api
|
||||
*/
|
||||
@@ -465,7 +465,7 @@ olx.interaction.ExtentOptions.prototype.wrapX;
|
||||
|
||||
/**
|
||||
* @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),
|
||||
* hitTolerance: (number|undefined)
|
||||
* }}
|
||||
@@ -476,7 +476,7 @@ olx.interaction.TranslateOptions;
|
||||
/**
|
||||
* 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.
|
||||
* @type {ol.Collection.<ol.Feature>|undefined}
|
||||
* @type {ol.Collection.<module:ol/Feature~Feature>|undefined}
|
||||
* @api
|
||||
*/
|
||||
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.
|
||||
* Default is {@link ol.events.condition.noModifierKeys} and
|
||||
* {@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.
|
||||
* Default is {@link ol.events.condition.targetNotEditable}.
|
||||
* @type {ol.EventsConditionType|undefined}
|
||||
@@ -581,7 +581,7 @@ olx.interaction.KeyboardZoomOptions.prototype.delta;
|
||||
* pixelTolerance: (number|undefined),
|
||||
* style: (ol.style.Style|Array.<ol.style.Style>|ol.StyleFunction|undefined),
|
||||
* source: (ol.source.Vector|undefined),
|
||||
* features: (ol.Collection.<ol.Feature>|undefined),
|
||||
* features: (ol.Collection.<module:ol/Feature~Feature>|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 the sketch.
|
||||
* 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.
|
||||
* By default, {@link ol.events.condition.singleClick} with
|
||||
* {@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.
|
||||
* Default is {@link ol.events.condition.always}
|
||||
* @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
|
||||
* 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
|
||||
*/
|
||||
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}.
|
||||
* @type {ol.EventsConditionType|undefined}
|
||||
* @api
|
||||
@@ -769,7 +769,7 @@ olx.interaction.PinchZoomOptions.prototype.constrainResolution;
|
||||
/**
|
||||
* @typedef {{handleDownEvent: (function(ol.MapBrowserPointerEvent):boolean|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),
|
||||
* 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
|
||||
* propagation of the event to other interactions in the map's interactions
|
||||
* chain.
|
||||
* @type {(function(ol.MapBrowserEvent):boolean|undefined)}
|
||||
* @type {(function(module:ol/MapBrowserEvent~MapBrowserEvent):boolean|undefined)}
|
||||
* @api
|
||||
*/
|
||||
olx.interaction.PointerOptions.prototype.handleEvent;
|
||||
@@ -832,7 +832,7 @@ olx.interaction.PointerOptions.prototype.handleUpEvent;
|
||||
* removeCondition: (ol.EventsConditionType|undefined),
|
||||
* toggleCondition: (ol.EventsConditionType|undefined),
|
||||
* multi: (boolean|undefined),
|
||||
* features: (ol.Collection.<ol.Feature>|undefined),
|
||||
* features: (ol.Collection.<module:ol/Feature~Feature>|undefined),
|
||||
* filter: (ol.SelectFilterFunction|undefined),
|
||||
* wrapX: (boolean|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.
|
||||
* 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`.
|
||||
@@ -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.
|
||||
* 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
|
||||
@@ -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.
|
||||
* 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`.
|
||||
@@ -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.
|
||||
* This is in addition to the `condition` event. By default,
|
||||
* {@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
|
||||
* used by the interaction is returned by
|
||||
* {@link ol.interaction.Select#getFeatures}.
|
||||
* @type {ol.Collection.<ol.Feature>|undefined}
|
||||
* @type {ol.Collection.<module:ol/Feature~Feature>|undefined}
|
||||
* @api
|
||||
*/
|
||||
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.
|
||||
* @type {ol.SelectFilterFunction|undefined}
|
||||
* @api
|
||||
@@ -962,7 +962,7 @@ olx.interaction.SelectOptions.prototype.hitTolerance;
|
||||
/**
|
||||
* Options for snap
|
||||
* @typedef {{
|
||||
* features: (ol.Collection.<ol.Feature>|undefined),
|
||||
* features: (ol.Collection.<module:ol/Feature~Feature>|undefined),
|
||||
* pixelTolerance: (number|undefined),
|
||||
* source: (ol.source.Vector|undefined),
|
||||
* edge: (boolean|undefined),
|
||||
@@ -974,7 +974,7 @@ olx.interaction.SnapOptions;
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
olx.interaction.SnapOptions.prototype.features;
|
||||
@@ -1220,7 +1220,7 @@ olx.layer.GroupOptions.prototype.layers;
|
||||
* radius: (number|undefined),
|
||||
* blur: (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),
|
||||
* minResolution: (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
|
||||
* weight from a feature. Weight values should range from 0 to 1 (and values
|
||||
* 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
|
||||
*/
|
||||
olx.layer.HeatmapOptions.prototype.weight;
|
||||
@@ -1867,8 +1867,8 @@ olx.layer.VectorTileOptions.prototype.zIndex;
|
||||
|
||||
/**
|
||||
* @typedef {{context: CanvasRenderingContext2D,
|
||||
* feature: (ol.Feature|ol.render.Feature),
|
||||
* geometry: ol.geom.SimpleGeometry,
|
||||
* feature: (module:ol/Feature~Feature|ol.render.Feature),
|
||||
* geometry: module:ol/geom/SimpleGeometry~SimpleGeometry,
|
||||
* pixelRatio: number,
|
||||
* resolution: number,
|
||||
* rotation: number}}
|
||||
@@ -2017,7 +2017,7 @@ olx.source.BingMapsOptions.prototype.transition;
|
||||
* distance: (number|undefined),
|
||||
* extent: (ol.Extent|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,
|
||||
* source: ol.source.Vector,
|
||||
* wrapX: (boolean|undefined)}}
|
||||
@@ -2050,8 +2050,8 @@ olx.source.ClusterOptions.prototype.extent;
|
||||
|
||||
|
||||
/**
|
||||
* Function that takes an {@link ol.Feature} as argument and returns an
|
||||
* {@link ol.geom.Point} as cluster calculation point for the feature. When a
|
||||
* Function that takes an {@link module:ol/Feature~Feature} as argument and returns an
|
||||
* {@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
|
||||
* `null`. The default, which works when the underyling source contains point
|
||||
* features only, is
|
||||
@@ -2060,9 +2060,9 @@ olx.source.ClusterOptions.prototype.extent;
|
||||
* 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.
|
||||
* @type {undefined|function(ol.Feature):ol.geom.Point}
|
||||
* @type {undefined|function(module:ol/Feature~Feature):module:ol/geom/Point~Point}
|
||||
* @api
|
||||
*/
|
||||
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
|
||||
* as an image. The arguments passed to the function are: `{ol.Extent}` the
|
||||
* 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
|
||||
* the value returned by the function is later changed then
|
||||
* `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),
|
||||
* 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),
|
||||
* loader: (ol.FeatureLoader|undefined),
|
||||
* loader: (module:ol/Feature~FeatureLoader|undefined),
|
||||
* overlaps: (boolean|undefined),
|
||||
* strategy: (ol.LoadingStrategy|undefined),
|
||||
* url: (string|ol.FeatureUrlFunction|undefined),
|
||||
* url: (string|module:ol/Feature~FeatureUrlFunction|undefined),
|
||||
* useSpatialIndex: (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
|
||||
* 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
|
||||
*/
|
||||
olx.source.VectorOptions.prototype.features;
|
||||
@@ -3766,7 +3766,7 @@ olx.source.VectorOptions.prototype.format;
|
||||
* strategy: ol.loadingstrategy.bbox
|
||||
* });
|
||||
* ```
|
||||
* @type {ol.FeatureLoader|undefined}
|
||||
* @type {module:ol/Feature~FeatureLoader|undefined}
|
||||
* @api
|
||||
*/
|
||||
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
|
||||
* (see {@link ol.featureloader.xhr}). Use a `string` and an
|
||||
* {@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.
|
||||
* Requires `format` to be set as well.
|
||||
* 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.
|
||||
* 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.
|
||||
* @type {string|ol.FeatureUrlFunction|undefined}
|
||||
* @type {string|module:ol/Feature~FeatureUrlFunction|undefined}
|
||||
* @api
|
||||
*/
|
||||
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),
|
||||
* image: (ol.style.Image|undefined),
|
||||
* renderer: (ol.StyleRenderFunction|undefined),
|
||||
@@ -5093,7 +5093,7 @@ olx.style.StyleOptions;
|
||||
/**
|
||||
* Feature property or geometry or function returning a geometry to render for
|
||||
* this style.
|
||||
* @type {undefined|string|ol.geom.Geometry|ol.StyleGeometryFunction}
|
||||
* @type {undefined|string|module:ol/geom/Geometry~Geometry|ol.StyleGeometryFunction}
|
||||
* @api
|
||||
*/
|
||||
olx.style.StyleOptions.prototype.geometry;
|
||||
@@ -5385,7 +5385,7 @@ olx.tilegrid.XYZOptions.prototype.tileSize;
|
||||
|
||||
/**
|
||||
* @typedef {{center: ol.Coordinate,
|
||||
* projection: ol.proj.Projection,
|
||||
* projection: module:ol/proj/Projection~Projection,
|
||||
* resolution: number,
|
||||
* rotation: number,
|
||||
* zoom: number}}
|
||||
@@ -5401,7 +5401,7 @@ olx.ViewState.prototype.center;
|
||||
|
||||
|
||||
/**
|
||||
* @type {ol.proj.Projection}
|
||||
* @type {module:ol/proj/Projection~Projection}
|
||||
* @api
|
||||
*/
|
||||
olx.ViewState.prototype.projection;
|
||||
|
||||
@@ -22,12 +22,12 @@
|
||||
/**
|
||||
* @typedef {Object} interaction_DragBoxOptions
|
||||
* @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.
|
||||
* Default is {@link ol.events.condition.always}.
|
||||
* @property {number|undefined} minArea The minimum area of the box in pixel, this value is used by the default
|
||||
* `boxEndCondition` function. Default is `64`.
|
||||
* @property {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.
|
||||
* Default is `true` if the area of the box is bigger than the `minArea` option.
|
||||
*/
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
/**
|
||||
* @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.
|
||||
* Default is {@link ol.events.condition.noModifierKeys}.
|
||||
* @property {ol.Kinetic|undefined} kinetic Kinetic inertia to apply to the pan.
|
||||
@@ -44,7 +44,7 @@
|
||||
|
||||
/**
|
||||
* @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.
|
||||
* Default is {@link ol.events.condition.shiftKeyOnly}.
|
||||
* @property {number|undefined} duration Animation duration in milliseconds. Default is `400`.
|
||||
@@ -53,7 +53,7 @@
|
||||
|
||||
/**
|
||||
* @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.
|
||||
* Default is {@link ol.events.condition.altShiftKeysOnly}.
|
||||
* @property {number|undefined} duration Animation duration in milliseconds. Default is `250`.
|
||||
@@ -63,7 +63,7 @@
|
||||
/**
|
||||
* @typedef {Object} interaction_DragZoomOptions
|
||||
* @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.
|
||||
* Default is {@link ol.events.condition.shiftKeyOnly}.
|
||||
* @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
|
||||
* the draw interaction to behave correctly on mouse as well as on touch
|
||||
* 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 {number|undefined} dragVertexDelay Delay in milliseconds after pointerdown before the current vertex can be
|
||||
* 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 {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').
|
||||
* @property {boolean|undefined} stopClick Stop click, singleclick, and doubleclick events from firing during drawing.
|
||||
* Default is `false`.
|
||||
@@ -91,12 +91,12 @@
|
||||
* 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
|
||||
* 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.
|
||||
* @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 {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.
|
||||
* By default {@link ol.events.condition.noModifierKeys}, i.e. a click, adds a
|
||||
* vertex or deactivates freehand drawing.
|
||||
@@ -104,7 +104,7 @@
|
||||
* interaction always operate in freehand mode and takes precedence over any
|
||||
* `freehandCondition` option.
|
||||
* @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
|
||||
* {@link ol.events.condition.shiftKeyOnly}, meaning that the Shift key
|
||||
* activates freehand drawing.
|
||||
@@ -116,11 +116,11 @@
|
||||
* @typedef {Object} interaction_ExtentOptions
|
||||
* @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.
|
||||
* 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
|
||||
* 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.
|
||||
* 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?
|
||||
* Only affects visuals, not functionality. Defaults to false.
|
||||
*/
|
||||
@@ -128,7 +128,7 @@
|
||||
|
||||
/**
|
||||
* @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.
|
||||
* @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
|
||||
@@ -143,7 +143,7 @@
|
||||
|
||||
/**
|
||||
* @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.
|
||||
* Default is {@link ol.events.condition.noModifierKeys} and
|
||||
* {@link ol.events.condition.targetNotEditable}.
|
||||
@@ -155,7 +155,7 @@
|
||||
/**
|
||||
* @typedef {Object} interaction_KeyboardZoomOptions
|
||||
* @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.
|
||||
* Default is {@link ol.events.condition.targetNotEditable}.
|
||||
* @property {number|undefined} delta The amount to zoom on each key press. Default is `1`.
|
||||
@@ -164,15 +164,15 @@
|
||||
|
||||
/**
|
||||
* @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 the sketch.
|
||||
* 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.
|
||||
* By default, {@link ol.events.condition.singleClick} with
|
||||
* {@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.
|
||||
* Default is {@link ol.events.condition.always}
|
||||
* @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}).
|
||||
* @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.
|
||||
* @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.
|
||||
* @property {boolean|undefined} wrapX Wrap the world horizontally on the sketch overlay. Default is `false`.
|
||||
*/
|
||||
@@ -189,7 +189,7 @@
|
||||
|
||||
/**
|
||||
* @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}.
|
||||
* @property {number|undefined} duration Animation duration in milliseconds. Default is `250`.
|
||||
* @property {number|undefined} timeout Mouse wheel timeout duration in milliseconds. Default is `80`.
|
||||
@@ -222,7 +222,7 @@
|
||||
* sequence is started.
|
||||
* @property {(function(ol.MapBrowserPointerEvent)|undefined)} handleDragEvent Function handling "drag" events. This function is called on "move" events
|
||||
* 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
|
||||
* propagation of the event to other interactions in the map's interactions
|
||||
* chain.
|
||||
@@ -236,11 +236,11 @@
|
||||
|
||||
/**
|
||||
* @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.
|
||||
* 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`.
|
||||
* @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.
|
||||
* 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
|
||||
@@ -255,11 +255,11 @@
|
||||
* 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
|
||||
* (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.
|
||||
* 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`.
|
||||
* @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.
|
||||
* This is in addition to the `condition` event. By default,
|
||||
* {@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
|
||||
* single features or all (overlapping) features at the clicked map
|
||||
* 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
|
||||
* used by the interaction is returned by
|
||||
* {@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.
|
||||
* @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
|
||||
@@ -285,7 +285,7 @@
|
||||
|
||||
/**
|
||||
* @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} vertex Snap to vertices. Default is `true`.
|
||||
* @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} blur Blur size in pixels. Default is `15`.
|
||||
* @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
|
||||
* 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
|
||||
@@ -532,8 +532,8 @@
|
||||
* @property {ol.AttributionLike|undefined} attributions Attributions.
|
||||
* @property {number|undefined} distance Minimum distance in pixels between clusters. Default is `20`.
|
||||
* @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
|
||||
* {@link ol.geom.Point} as cluster calculation point for the feature. When a
|
||||
* @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 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
|
||||
* `null`. The default, which works when the underyling source contains point
|
||||
* features only, is
|
||||
@@ -542,7 +542,7 @@
|
||||
* 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.
|
||||
* @property {ol.format.Feature|undefined} format Format.
|
||||
* @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
|
||||
* as an image. The arguments passed to the function are: `{ol.Extent}` the
|
||||
* 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
|
||||
* the value returned by the function is later changed then
|
||||
* `dispatchChangeEvent` should be called on the source for the source to
|
||||
@@ -977,11 +977,11 @@
|
||||
/**
|
||||
* @typedef {Object} source_VectorOptions
|
||||
* @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.
|
||||
* @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`.
|
||||
* @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
|
||||
* feature loader.
|
||||
*
|
||||
@@ -1021,10 +1021,10 @@
|
||||
* stroke operations.
|
||||
* @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.
|
||||
* @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
|
||||
* {@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.
|
||||
* Requires `format` to be set as well.
|
||||
* When default XHR feature loader is provided, the features will
|
||||
@@ -1362,7 +1362,7 @@
|
||||
|
||||
/**
|
||||
* @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.
|
||||
* @property {ol.style.Fill|undefined} fill Fill style.
|
||||
* @property {ol.style.Image|undefined} image Image style.
|
||||
@@ -1453,7 +1453,7 @@
|
||||
/**
|
||||
* @typedef {Object} ViewState
|
||||
* @property {ol.Coordinate} center
|
||||
* @property {ol.proj.Projection} projection
|
||||
* @property {module:ol/proj/Projection~Projection} projection
|
||||
* @property {number} resolution
|
||||
* @property {number} rotation
|
||||
* @property {number} zoom The current zoom level.
|
||||
|
||||
@@ -89,7 +89,7 @@ const MousePosition = function(opt_options) {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {ol.proj.Projection}
|
||||
* @type {module:ol/proj/Projection~Projection}
|
||||
*/
|
||||
this.mapProjection_ = null;
|
||||
|
||||
@@ -153,13 +153,13 @@ MousePosition.prototype.getCoordinateFormat = function() {
|
||||
|
||||
/**
|
||||
* 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.
|
||||
* @observable
|
||||
* @api
|
||||
*/
|
||||
MousePosition.prototype.getProjection = function() {
|
||||
return /** @type {ol.proj.Projection|undefined} */ (this.get(PROJECTION));
|
||||
return /** @type {module:ol/proj/Projection~Projection|undefined} */ (this.get(PROJECTION));
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ import {get as getProjection} from '../proj.js';
|
||||
|
||||
/**
|
||||
* @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 = {};
|
||||
GEOMETRY_READERS[GeometryType.POINT] = readPointGeometry;
|
||||
@@ -37,7 +37,7 @@ GEOMETRY_READERS[GeometryType.MULTI_POLYGON] = readMultiPolygonGeometry;
|
||||
|
||||
/**
|
||||
* @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 = {};
|
||||
GEOMETRY_WRITERS[GeometryType.POINT] = writePointGeometry;
|
||||
@@ -84,13 +84,13 @@ inherits(EsriJSON, JSONFeature);
|
||||
/**
|
||||
* @param {EsriJSONGeometry} object Object.
|
||||
* @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) {
|
||||
if (!object) {
|
||||
return null;
|
||||
}
|
||||
/** @type {ol.geom.GeometryType} */
|
||||
/** @type {module:ol/geom/GeometryType~GeometryType} */
|
||||
let type;
|
||||
if (typeof object.x === 'number' && typeof object.y === 'number') {
|
||||
type = GeometryType.POINT;
|
||||
@@ -115,7 +115,7 @@ function readGeometry(object, opt_options) {
|
||||
}
|
||||
}
|
||||
const geometryReader = GEOMETRY_READERS[type];
|
||||
return /** @type {ol.geom.Geometry} */ (transformWithOptions(
|
||||
return /** @type {module:ol/geom/Geometry~Geometry} */ (transformWithOptions(
|
||||
geometryReader(object), false, opt_options)
|
||||
);
|
||||
}
|
||||
@@ -127,7 +127,7 @@ function readGeometry(object, opt_options) {
|
||||
* array. It is used for checking for holes.
|
||||
* Logic inspired by: https://github.com/Esri/terraformer-arcgis-parser
|
||||
* @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.
|
||||
*/
|
||||
function convertRings(rings, layout) {
|
||||
@@ -176,7 +176,7 @@ function convertRings(rings, layout) {
|
||||
|
||||
/**
|
||||
* @param {EsriJSONGeometry} object Object.
|
||||
* @return {ol.geom.Geometry} Point.
|
||||
* @return {module:ol/geom/Geometry~Geometry} Point.
|
||||
*/
|
||||
function readPointGeometry(object) {
|
||||
let point;
|
||||
@@ -198,7 +198,7 @@ function readPointGeometry(object) {
|
||||
|
||||
/**
|
||||
* @param {EsriJSONGeometry} object Object.
|
||||
* @return {ol.geom.Geometry} LineString.
|
||||
* @return {module:ol/geom/Geometry~Geometry} LineString.
|
||||
*/
|
||||
function readLineStringGeometry(object) {
|
||||
const layout = getGeometryLayout(object);
|
||||
@@ -208,7 +208,7 @@ function readLineStringGeometry(object) {
|
||||
|
||||
/**
|
||||
* @param {EsriJSONGeometry} object Object.
|
||||
* @return {ol.geom.Geometry} MultiLineString.
|
||||
* @return {module:ol/geom/Geometry~Geometry} MultiLineString.
|
||||
*/
|
||||
function readMultiLineStringGeometry(object) {
|
||||
const layout = getGeometryLayout(object);
|
||||
@@ -218,7 +218,7 @@ function readMultiLineStringGeometry(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) {
|
||||
let layout = GeometryLayout.XY;
|
||||
@@ -235,7 +235,7 @@ function getGeometryLayout(object) {
|
||||
|
||||
/**
|
||||
* @param {EsriJSONGeometry} object Object.
|
||||
* @return {ol.geom.Geometry} MultiPoint.
|
||||
* @return {module:ol/geom/Geometry~Geometry} MultiPoint.
|
||||
*/
|
||||
function readMultiPointGeometry(object) {
|
||||
const layout = getGeometryLayout(object);
|
||||
@@ -245,7 +245,7 @@ function readMultiPointGeometry(object) {
|
||||
|
||||
/**
|
||||
* @param {EsriJSONGeometry} object Object.
|
||||
* @return {ol.geom.Geometry} MultiPolygon.
|
||||
* @return {module:ol/geom/Geometry~Geometry} MultiPolygon.
|
||||
*/
|
||||
function readMultiPolygonGeometry(object) {
|
||||
const layout = getGeometryLayout(object);
|
||||
@@ -257,7 +257,7 @@ function readMultiPolygonGeometry(object) {
|
||||
|
||||
/**
|
||||
* @param {EsriJSONGeometry} object Object.
|
||||
* @return {ol.geom.Geometry} Polygon.
|
||||
* @return {module:ol/geom/Geometry~Geometry} Polygon.
|
||||
*/
|
||||
function readPolygonGeometry(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.
|
||||
* @return {EsriJSONGeometry} EsriJSON geometry.
|
||||
*/
|
||||
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;
|
||||
const layout = /** @type {ol.geom.Point} */ (geometry).getLayout();
|
||||
const layout = /** @type {module:ol/geom/Point~Point} */ (geometry).getLayout();
|
||||
if (layout === GeometryLayout.XYZ) {
|
||||
esriJSON = /** @type {EsriJSONPoint} */ ({
|
||||
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.
|
||||
*/
|
||||
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.
|
||||
* @return {EsriJSONPolyline} EsriJSON geometry.
|
||||
*/
|
||||
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} */ ({
|
||||
hasZ: hasZM.hasZ,
|
||||
hasM: hasZM.hasM,
|
||||
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.
|
||||
* @return {EsriJSONPolygon} EsriJSON geometry.
|
||||
*/
|
||||
function writePolygonGeometry(geometry, opt_options) {
|
||||
// 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} */ ({
|
||||
hasZ: hasZM.hasZ,
|
||||
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.
|
||||
* @return {EsriJSONPolyline} EsriJSON geometry.
|
||||
*/
|
||||
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} */ ({
|
||||
hasZ: hasZM.hasZ,
|
||||
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.
|
||||
* @return {EsriJSONMultipoint} EsriJSON geometry.
|
||||
*/
|
||||
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} */ ({
|
||||
hasZ: hasZM.hasZ,
|
||||
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.
|
||||
* @return {EsriJSONPolygon} EsriJSON geometry.
|
||||
*/
|
||||
function writeMultiPolygonGeometry(geometry, opt_options) {
|
||||
const hasZM = getHasZM(/** @type {ol.geom.MultiPolygon} */(geometry));
|
||||
const coordinates = /** @type {ol.geom.MultiPolygon} */ (geometry).getCoordinates(false);
|
||||
const hasZM = getHasZM(/** @type {module:ol/geom/MultiPolygon~MultiPolygon} */(geometry));
|
||||
const coordinates = /** @type {module:ol/geom/MultiPolygon~MultiPolygon} */ (geometry).getCoordinates(false);
|
||||
const output = [];
|
||||
for (let i = 0; i < coordinates.length; i++) {
|
||||
for (let x = coordinates[i].length - 1; x >= 0; x--) {
|
||||
@@ -412,7 +412,7 @@ function writeMultiPolygonGeometry(geometry, opt_options) {
|
||||
* @function
|
||||
* @param {ArrayBuffer|Document|Node|Object|string} source Source.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||
* @return {ol.Feature} Feature.
|
||||
* @return {module:ol/Feature~Feature} Feature.
|
||||
* @api
|
||||
*/
|
||||
EsriJSON.prototype.readFeature;
|
||||
@@ -425,7 +425,7 @@ EsriJSON.prototype.readFeature;
|
||||
* @function
|
||||
* @param {ArrayBuffer|Document|Node|Object|string} source Source.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||
* @return {Array.<ol.Feature>} Features.
|
||||
* @return {Array.<module:ol/Feature~Feature>} Features.
|
||||
* @api
|
||||
*/
|
||||
EsriJSON.prototype.readFeatures;
|
||||
@@ -461,7 +461,7 @@ EsriJSON.prototype.readFeaturesFromObject = function(object, opt_options) {
|
||||
const options = opt_options ? opt_options : {};
|
||||
if (esriJSONObject.features) {
|
||||
const esriJSONFeatureCollection = /** @type {EsriJSONFeatureCollection} */ (object);
|
||||
/** @type {Array.<ol.Feature>} */
|
||||
/** @type {Array.<module:ol/Feature~Feature>} */
|
||||
const features = [];
|
||||
const esriJSONFeatures = esriJSONFeatureCollection.features;
|
||||
options.idField = object.objectIdFieldName;
|
||||
@@ -481,7 +481,7 @@ EsriJSON.prototype.readFeaturesFromObject = function(object, opt_options) {
|
||||
* @function
|
||||
* @param {ArrayBuffer|Document|Node|Object|string} source Source.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||
* @return {ol.geom.Geometry} Geometry.
|
||||
* @return {module:ol/geom/Geometry~Geometry} Geometry.
|
||||
* @api
|
||||
*/
|
||||
EsriJSON.prototype.readGeometry;
|
||||
@@ -500,7 +500,7 @@ EsriJSON.prototype.readGeometryFromObject = function(object, opt_options) {
|
||||
*
|
||||
* @function
|
||||
* @param {ArrayBuffer|Document|Node|Object|string} source Source.
|
||||
* @return {ol.proj.Projection} Projection.
|
||||
* @return {module:ol/proj/Projection~Projection} Projection.
|
||||
* @api
|
||||
*/
|
||||
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.
|
||||
* @return {EsriJSONGeometry} EsriJSON geometry.
|
||||
*/
|
||||
function writeGeometry(geometry, opt_options) {
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -536,7 +536,7 @@ function writeGeometry(geometry, opt_options) {
|
||||
* Encode a geometry as a EsriJSON string.
|
||||
*
|
||||
* @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.
|
||||
* @return {string} EsriJSON.
|
||||
* @api
|
||||
@@ -547,7 +547,7 @@ EsriJSON.prototype.writeGeometry;
|
||||
/**
|
||||
* 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.
|
||||
* @return {EsriJSONGeometry} Object.
|
||||
* @override
|
||||
@@ -562,7 +562,7 @@ EsriJSON.prototype.writeGeometryObject = function(geometry, opt_options) {
|
||||
* Encode a feature as a EsriJSON Feature string.
|
||||
*
|
||||
* @function
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
|
||||
* @return {string} EsriJSON.
|
||||
* @api
|
||||
@@ -573,7 +573,7 @@ EsriJSON.prototype.writeFeature;
|
||||
/**
|
||||
* 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.
|
||||
* @return {Object} Object.
|
||||
* @override
|
||||
@@ -606,7 +606,7 @@ EsriJSON.prototype.writeFeatureObject = function(feature, opt_options) {
|
||||
* Encode an array of features as EsriJSON.
|
||||
*
|
||||
* @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.
|
||||
* @return {string} EsriJSON.
|
||||
* @api
|
||||
@@ -617,7 +617,7 @@ EsriJSON.prototype.writeFeatures;
|
||||
/**
|
||||
* 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.
|
||||
* @return {Object} EsriJSON Object.
|
||||
* @override
|
||||
|
||||
@@ -53,7 +53,7 @@ import {get as getProjection, equivalent as equivalentProjection, transformExten
|
||||
* instantiated in apps.
|
||||
* Base class for feature formats.
|
||||
* {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.
|
||||
*
|
||||
* @constructor
|
||||
@@ -64,13 +64,13 @@ const FeatureFormat = function() {
|
||||
|
||||
/**
|
||||
* @protected
|
||||
* @type {ol.proj.Projection}
|
||||
* @type {module:ol/proj/Projection~Projection}
|
||||
*/
|
||||
this.defaultDataProjection = null;
|
||||
|
||||
/**
|
||||
* @protected
|
||||
* @type {ol.proj.Projection}
|
||||
* @type {module:ol/proj/Projection~Projection}
|
||||
*/
|
||||
this.defaultFeatureProjection = null;
|
||||
|
||||
@@ -136,7 +136,7 @@ FeatureFormat.prototype.getType = function() {};
|
||||
* @abstract
|
||||
* @param {Document|Node|Object|string} source Source.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||
* @return {ol.Feature} Feature.
|
||||
* @return {module:ol/Feature~Feature} Feature.
|
||||
*/
|
||||
FeatureFormat.prototype.readFeature = function(source, opt_options) {};
|
||||
|
||||
@@ -147,7 +147,7 @@ FeatureFormat.prototype.readFeature = function(source, opt_options) {};
|
||||
* @abstract
|
||||
* @param {Document|Node|ArrayBuffer|Object|string} source Source.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||
* @return {Array.<ol.Feature>} Features.
|
||||
* @return {Array.<module:ol/Feature~Feature>} Features.
|
||||
*/
|
||||
FeatureFormat.prototype.readFeatures = function(source, opt_options) {};
|
||||
|
||||
@@ -158,7 +158,7 @@ FeatureFormat.prototype.readFeatures = function(source, opt_options) {};
|
||||
* @abstract
|
||||
* @param {Document|Node|Object|string} source Source.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||
* @return {ol.geom.Geometry} Geometry.
|
||||
* @return {module:ol/geom/Geometry~Geometry} Geometry.
|
||||
*/
|
||||
FeatureFormat.prototype.readGeometry = function(source, opt_options) {};
|
||||
|
||||
@@ -168,7 +168,7 @@ FeatureFormat.prototype.readGeometry = function(source, opt_options) {};
|
||||
*
|
||||
* @abstract
|
||||
* @param {Document|Node|Object|string} source Source.
|
||||
* @return {ol.proj.Projection} Projection.
|
||||
* @return {module:ol/proj/Projection~Projection} Projection.
|
||||
*/
|
||||
FeatureFormat.prototype.readProjection = function(source) {};
|
||||
|
||||
@@ -177,7 +177,7 @@ FeatureFormat.prototype.readProjection = function(source) {};
|
||||
* Encode a feature in this format.
|
||||
*
|
||||
* @abstract
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
|
||||
* @return {string} Result.
|
||||
*/
|
||||
@@ -188,7 +188,7 @@ FeatureFormat.prototype.writeFeature = function(feature, opt_options) {};
|
||||
* Encode an array of features in this format.
|
||||
*
|
||||
* @abstract
|
||||
* @param {Array.<ol.Feature>} features Features.
|
||||
* @param {Array.<module:ol/Feature~Feature>} features Features.
|
||||
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
|
||||
* @return {string} Result.
|
||||
*/
|
||||
@@ -199,7 +199,7 @@ FeatureFormat.prototype.writeFeatures = function(features, opt_options) {};
|
||||
* Write a single geometry in this format.
|
||||
*
|
||||
* @abstract
|
||||
* @param {ol.geom.Geometry} geometry Geometry.
|
||||
* @param {module:ol/geom/Geometry~Geometry} geometry Geometry.
|
||||
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
|
||||
* @return {string} Result.
|
||||
*/
|
||||
@@ -208,11 +208,11 @@ FeatureFormat.prototype.writeGeometry = function(geometry, opt_options) {};
|
||||
export default FeatureFormat;
|
||||
|
||||
/**
|
||||
* @param {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 {(module:ol/format/Feature~WriteOptions|module:ol/format/Feature~ReadOptions)=} opt_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) {
|
||||
const featureProjection = opt_options ?
|
||||
@@ -220,7 +220,7 @@ export function transformWithOptions(geometry, write, opt_options) {
|
||||
const dataProjection = opt_options ?
|
||||
getProjection(opt_options.dataProjection) : null;
|
||||
/**
|
||||
* @type {ol.geom.Geometry|module:ol/extent~Extent}
|
||||
* @type {module:ol/geom/Geometry~Geometry|module:ol/extent~Extent}
|
||||
*/
|
||||
let transformed;
|
||||
if (featureProjection && dataProjection &&
|
||||
|
||||
@@ -22,7 +22,7 @@ const GML = GML3;
|
||||
* Encode an array of features in GML 3.1.1 Simple Features.
|
||||
*
|
||||
* @function
|
||||
* @param {Array.<ol.Feature>} features Features.
|
||||
* @param {Array.<module:ol/Feature~Feature>} features Features.
|
||||
* @param {module:ol/format/Feature~WriteOptions=} opt_options Options.
|
||||
* @return {string} Result.
|
||||
* @api
|
||||
@@ -34,7 +34,7 @@ GML.prototype.writeFeatures;
|
||||
* Encode an array of features in the GML 3.1.1 format as an XML node.
|
||||
*
|
||||
* @function
|
||||
* @param {Array.<ol.Feature>} features Features.
|
||||
* @param {Array.<module:ol/Feature~Feature>} features Features.
|
||||
* @param {module:ol/format/Feature~WriteOptions=} opt_options Options.
|
||||
* @return {Node} Node.
|
||||
* @api
|
||||
|
||||
@@ -150,7 +150,7 @@ GML2.prototype.GEOMETRY_NODE_FACTORY_ = function(value, objectStack, opt_nodeNam
|
||||
const multiCurve = context['multiCurve'];
|
||||
let nodeName;
|
||||
if (!Array.isArray(value)) {
|
||||
nodeName = /** @type {ol.geom.Geometry} */ (value).getType();
|
||||
nodeName = /** @type {module:ol/geom/Geometry~Geometry} */ (value).getType();
|
||||
if (nodeName === 'MultiPolygon' && multiSurface === true) {
|
||||
nodeName = 'MultiSurface';
|
||||
} else if (nodeName === 'Polygon' && surface === true) {
|
||||
@@ -168,7 +168,7 @@ GML2.prototype.GEOMETRY_NODE_FACTORY_ = function(value, objectStack, opt_nodeNam
|
||||
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
* @param {Array.<*>} objectStack Node stack.
|
||||
*/
|
||||
GML2.prototype.writeFeatureElement = function(node, feature, objectStack) {
|
||||
@@ -215,7 +215,7 @@ GML2.prototype.writeFeatureElement = function(node, feature, objectStack) {
|
||||
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @param {ol.geom.LineString} geometry LineString geometry.
|
||||
* @param {module:ol/geom/LineString~LineString} geometry LineString geometry.
|
||||
* @param {Array.<*>} objectStack Node stack.
|
||||
* @private
|
||||
*/
|
||||
@@ -241,7 +241,7 @@ GML2.prototype.writeCurveOrLineString_ = function(node, geometry, objectStack) {
|
||||
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @param {ol.geom.LineString} line LineString geometry.
|
||||
* @param {module:ol/geom/LineString~LineString} line LineString geometry.
|
||||
* @param {Array.<*>} objectStack Node stack.
|
||||
* @private
|
||||
*/
|
||||
@@ -256,7 +256,7 @@ GML2.prototype.writeLineStringOrCurveMember_ = function(node, line, objectStack)
|
||||
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @param {ol.geom.MultiLineString} geometry MultiLineString geometry.
|
||||
* @param {module:ol/geom/MultiLineString~MultiLineString} geometry MultiLineString geometry.
|
||||
* @param {Array.<*>} objectStack Node stack.
|
||||
* @private
|
||||
*/
|
||||
@@ -278,7 +278,7 @@ GML2.prototype.writeMultiCurveOrLineString_ = function(node, geometry, objectSta
|
||||
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @param {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.
|
||||
*/
|
||||
GML2.prototype.writeGeometryElement = function(node, geometry, objectStack) {
|
||||
@@ -294,7 +294,7 @@ GML2.prototype.writeGeometryElement = function(node, geometry, objectStack) {
|
||||
value = geometry;
|
||||
}
|
||||
} 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} */
|
||||
(item), this.GEOMETRY_SERIALIZERS_,
|
||||
@@ -320,7 +320,7 @@ GML2.prototype.createCoordinatesNode_ = function(namespaceURI) {
|
||||
|
||||
/**
|
||||
* @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.
|
||||
* @private
|
||||
*/
|
||||
@@ -342,7 +342,7 @@ GML2.prototype.writeCoordinates_ = function(node, value, objectStack) {
|
||||
|
||||
/**
|
||||
* @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.
|
||||
* @private
|
||||
*/
|
||||
@@ -355,7 +355,7 @@ GML2.prototype.writeCurveSegments_ = function(node, line, objectStack) {
|
||||
|
||||
/**
|
||||
* @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.
|
||||
* @private
|
||||
*/
|
||||
@@ -403,7 +403,7 @@ GML2.prototype.RING_NODE_FACTORY_ = function(value, objectStack, opt_nodeName) {
|
||||
|
||||
/**
|
||||
* @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.
|
||||
* @private
|
||||
*/
|
||||
@@ -416,7 +416,7 @@ GML2.prototype.writeSurfacePatches_ = function(node, polygon, objectStack) {
|
||||
|
||||
/**
|
||||
* @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.
|
||||
* @private
|
||||
*/
|
||||
@@ -454,7 +454,7 @@ GML2.prototype.getCoords_ = function(point, opt_srsName, opt_hasZ) {
|
||||
|
||||
/**
|
||||
* @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.
|
||||
* @private
|
||||
*/
|
||||
@@ -475,7 +475,7 @@ GML2.prototype.writePoint_ = function(node, geometry, objectStack) {
|
||||
|
||||
/**
|
||||
* @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.
|
||||
* @private
|
||||
*/
|
||||
@@ -496,7 +496,7 @@ GML2.prototype.writeMultiPoint_ = function(node, geometry, objectStack) {
|
||||
|
||||
/**
|
||||
* @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.
|
||||
* @private
|
||||
*/
|
||||
@@ -509,7 +509,7 @@ GML2.prototype.writePointMember_ = function(node, point, objectStack) {
|
||||
|
||||
/**
|
||||
* @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.
|
||||
* @private
|
||||
*/
|
||||
@@ -527,7 +527,7 @@ GML2.prototype.writeLinearRing_ = function(node, geometry, objectStack) {
|
||||
|
||||
/**
|
||||
* @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.
|
||||
* @private
|
||||
*/
|
||||
@@ -549,7 +549,7 @@ GML2.prototype.writeMultiSurfaceOrPolygon_ = function(node, geometry, objectStac
|
||||
|
||||
/**
|
||||
* @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.
|
||||
* @private
|
||||
*/
|
||||
|
||||
@@ -96,10 +96,10 @@ inherits(GML3, GMLBase);
|
||||
* @param {Node} node Node.
|
||||
* @param {Array.<*>} objectStack Object stack.
|
||||
* @private
|
||||
* @return {ol.geom.MultiLineString|undefined} MultiLineString.
|
||||
* @return {module:ol/geom/MultiLineString~MultiLineString|undefined} MultiLineString.
|
||||
*/
|
||||
GML3.prototype.readMultiCurve_ = function(node, objectStack) {
|
||||
/** @type {Array.<ol.geom.LineString>} */
|
||||
/** @type {Array.<module:ol/geom/LineString~LineString>} */
|
||||
const lineStrings = pushParseAndPop([],
|
||||
this.MULTICURVE_PARSERS_, node, objectStack, this);
|
||||
if (lineStrings) {
|
||||
@@ -116,10 +116,10 @@ GML3.prototype.readMultiCurve_ = function(node, objectStack) {
|
||||
* @param {Node} node Node.
|
||||
* @param {Array.<*>} objectStack Object stack.
|
||||
* @private
|
||||
* @return {ol.geom.MultiPolygon|undefined} MultiPolygon.
|
||||
* @return {module:ol/geom/MultiPolygon~MultiPolygon|undefined} MultiPolygon.
|
||||
*/
|
||||
GML3.prototype.readMultiSurface_ = function(node, objectStack) {
|
||||
/** @type {Array.<ol.geom.Polygon>} */
|
||||
/** @type {Array.<module:ol/geom/Polygon~Polygon>} */
|
||||
const polygons = pushParseAndPop([],
|
||||
this.MULTISURFACE_PARSERS_, node, objectStack, this);
|
||||
if (polygons) {
|
||||
@@ -240,7 +240,7 @@ GML3.prototype.exteriorParser_ = function(node, objectStack) {
|
||||
* @param {Node} node Node.
|
||||
* @param {Array.<*>} objectStack Object stack.
|
||||
* @private
|
||||
* @return {ol.geom.Polygon|undefined} Polygon.
|
||||
* @return {module:ol/geom/Polygon~Polygon|undefined} Polygon.
|
||||
*/
|
||||
GML3.prototype.readSurface_ = function(node, objectStack) {
|
||||
/** @type {Array.<Array.<number>>} */
|
||||
@@ -268,7 +268,7 @@ GML3.prototype.readSurface_ = function(node, objectStack) {
|
||||
* @param {Node} node Node.
|
||||
* @param {Array.<*>} objectStack Object stack.
|
||||
* @private
|
||||
* @return {ol.geom.LineString|undefined} LineString.
|
||||
* @return {module:ol/geom/LineString~LineString|undefined} LineString.
|
||||
*/
|
||||
GML3.prototype.readCurve_ = function(node, objectStack) {
|
||||
/** @type {Array.<number>} */
|
||||
@@ -573,7 +573,7 @@ GML3.prototype.SEGMENTS_PARSERS_ = {
|
||||
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @param {ol.geom.Point} value Point geometry.
|
||||
* @param {module:ol/geom/Point~Point} value Point geometry.
|
||||
* @param {Array.<*>} objectStack Node stack.
|
||||
* @private
|
||||
*/
|
||||
@@ -631,7 +631,7 @@ GML3.prototype.getCoords_ = function(point, opt_srsName, opt_hasZ) {
|
||||
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @param {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.
|
||||
* @private
|
||||
*/
|
||||
@@ -656,7 +656,7 @@ GML3.prototype.writePosList_ = function(node, value, objectStack) {
|
||||
|
||||
/**
|
||||
* @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.
|
||||
* @private
|
||||
*/
|
||||
@@ -695,7 +695,7 @@ GML3.prototype.writeEnvelope = function(node, extent, objectStack) {
|
||||
|
||||
/**
|
||||
* @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.
|
||||
* @private
|
||||
*/
|
||||
@@ -732,7 +732,7 @@ GML3.prototype.RING_NODE_FACTORY_ = function(value, objectStack, opt_nodeName) {
|
||||
|
||||
/**
|
||||
* @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.
|
||||
* @private
|
||||
*/
|
||||
@@ -761,7 +761,7 @@ GML3.prototype.writeSurfaceOrPolygon_ = function(node, geometry, objectStack) {
|
||||
|
||||
/**
|
||||
* @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.
|
||||
* @private
|
||||
*/
|
||||
@@ -787,7 +787,7 @@ GML3.prototype.writeCurveOrLineString_ = function(node, geometry, objectStack) {
|
||||
|
||||
/**
|
||||
* @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.
|
||||
* @private
|
||||
*/
|
||||
@@ -809,7 +809,7 @@ GML3.prototype.writeMultiSurfaceOrPolygon_ = function(node, geometry, objectStac
|
||||
|
||||
/**
|
||||
* @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.
|
||||
* @private
|
||||
*/
|
||||
@@ -830,7 +830,7 @@ GML3.prototype.writeMultiPoint_ = function(node, geometry, objectStack) {
|
||||
|
||||
/**
|
||||
* @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.
|
||||
* @private
|
||||
*/
|
||||
@@ -852,7 +852,7 @@ GML3.prototype.writeMultiCurveOrLineString_ = function(node, geometry, objectSta
|
||||
|
||||
/**
|
||||
* @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.
|
||||
* @private
|
||||
*/
|
||||
@@ -865,7 +865,7 @@ GML3.prototype.writeRing_ = function(node, ring, objectStack) {
|
||||
|
||||
/**
|
||||
* @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.
|
||||
* @private
|
||||
*/
|
||||
@@ -881,7 +881,7 @@ GML3.prototype.writeSurfaceOrPolygonMember_ = function(node, polygon, objectStac
|
||||
|
||||
/**
|
||||
* @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.
|
||||
* @private
|
||||
*/
|
||||
@@ -894,7 +894,7 @@ GML3.prototype.writePointMember_ = function(node, point, objectStack) {
|
||||
|
||||
/**
|
||||
* @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.
|
||||
* @private
|
||||
*/
|
||||
@@ -909,7 +909,7 @@ GML3.prototype.writeLineStringOrCurveMember_ = function(node, line, objectStack)
|
||||
|
||||
/**
|
||||
* @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.
|
||||
* @private
|
||||
*/
|
||||
@@ -922,7 +922,7 @@ GML3.prototype.writeSurfacePatches_ = function(node, polygon, objectStack) {
|
||||
|
||||
/**
|
||||
* @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.
|
||||
* @private
|
||||
*/
|
||||
@@ -936,7 +936,7 @@ GML3.prototype.writeCurveSegments_ = function(node, line, objectStack) {
|
||||
|
||||
/**
|
||||
* @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.
|
||||
*/
|
||||
GML3.prototype.writeGeometryElement = function(node, geometry, objectStack) {
|
||||
@@ -952,7 +952,7 @@ GML3.prototype.writeGeometryElement = function(node, geometry, objectStack) {
|
||||
value = geometry;
|
||||
}
|
||||
} 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} */
|
||||
(item), this.GEOMETRY_SERIALIZERS_,
|
||||
@@ -963,7 +963,7 @@ GML3.prototype.writeGeometryElement = function(node, geometry, objectStack) {
|
||||
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
* @param {Array.<*>} objectStack Node stack.
|
||||
*/
|
||||
GML3.prototype.writeFeatureElement = function(node, feature, objectStack) {
|
||||
@@ -1010,7 +1010,7 @@ GML3.prototype.writeFeatureElement = function(node, feature, objectStack) {
|
||||
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @param {Array.<ol.Feature>} features Features.
|
||||
* @param {Array.<module:ol/Feature~Feature>} features Features.
|
||||
* @param {Array.<*>} objectStack Node stack.
|
||||
* @private
|
||||
*/
|
||||
@@ -1075,7 +1075,7 @@ GML3.prototype.GEOMETRY_NODE_FACTORY_ = function(value, objectStack, opt_nodeNam
|
||||
const multiCurve = context['multiCurve'];
|
||||
let nodeName;
|
||||
if (!Array.isArray(value)) {
|
||||
nodeName = /** @type {ol.geom.Geometry} */ (value).getType();
|
||||
nodeName = /** @type {module:ol/geom/Geometry~Geometry} */ (value).getType();
|
||||
if (nodeName === 'MultiPolygon' && multiSurface === true) {
|
||||
nodeName = 'MultiSurface';
|
||||
} else if (nodeName === 'Polygon' && surface === true) {
|
||||
@@ -1096,7 +1096,7 @@ GML3.prototype.GEOMETRY_NODE_FACTORY_ = function(value, objectStack, opt_nodeNam
|
||||
/**
|
||||
* Encode a geometry in GML 3.1.1 Simple Features.
|
||||
*
|
||||
* @param {ol.geom.Geometry} geometry Geometry.
|
||||
* @param {module:ol/geom/Geometry~Geometry} geometry Geometry.
|
||||
* @param {module:ol/format/Feature~WriteOptions=} opt_options Options.
|
||||
* @return {Node} Node.
|
||||
* @override
|
||||
@@ -1120,7 +1120,7 @@ GML3.prototype.writeGeometryNode = function(geometry, opt_options) {
|
||||
* Encode an array of features in GML 3.1.1 Simple Features.
|
||||
*
|
||||
* @function
|
||||
* @param {Array.<ol.Feature>} features Features.
|
||||
* @param {Array.<module:ol/Feature~Feature>} features Features.
|
||||
* @param {module:ol/format/Feature~WriteOptions=} opt_options Options.
|
||||
* @return {string} Result.
|
||||
* @api
|
||||
@@ -1131,7 +1131,7 @@ GML3.prototype.writeFeatures;
|
||||
/**
|
||||
* Encode an array of features in the GML 3.1.1 format as an XML node.
|
||||
*
|
||||
* @param {Array.<ol.Feature>} features Features.
|
||||
* @param {Array.<module:ol/Feature~Feature>} features Features.
|
||||
* @param {module:ol/format/Feature~WriteOptions=} opt_options Options.
|
||||
* @return {Node} Node.
|
||||
* @override
|
||||
|
||||
@@ -135,7 +135,7 @@ const ONLY_WHITESPACE_RE = /^[\s\xa0]*$/;
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @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) {
|
||||
const localName = node.localName;
|
||||
@@ -224,16 +224,16 @@ GMLBase.prototype.readFeaturesInternal = function(node, objectStack) {
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @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) {
|
||||
const context = /** @type {Object} */ (objectStack[0]);
|
||||
context['srsName'] = node.firstElementChild.getAttribute('srsName');
|
||||
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);
|
||||
if (geometry) {
|
||||
return /** @type {ol.geom.Geometry} */ (transformWithOptions(geometry, false, context));
|
||||
return /** @type {module:ol/geom/Geometry~Geometry} */ (transformWithOptions(geometry, false, context));
|
||||
} else {
|
||||
return undefined;
|
||||
}
|
||||
@@ -243,7 +243,7 @@ GMLBase.prototype.readGeometryElement = function(node, objectStack) {
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @param {Array.<*>} objectStack Object stack.
|
||||
* @return {ol.Feature} Feature.
|
||||
* @return {module:ol/Feature~Feature} Feature.
|
||||
*/
|
||||
GMLBase.prototype.readFeatureElement = function(node, objectStack) {
|
||||
let n;
|
||||
@@ -285,7 +285,7 @@ GMLBase.prototype.readFeatureElement = function(node, objectStack) {
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @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) {
|
||||
const flatCoordinates = this.readFlatCoordinatesFromNode_(node, objectStack);
|
||||
@@ -300,7 +300,7 @@ GMLBase.prototype.readPoint = function(node, objectStack) {
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @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) {
|
||||
/** @type {Array.<Array.<number>>} */
|
||||
@@ -317,10 +317,10 @@ GMLBase.prototype.readMultiPoint = function(node, objectStack) {
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @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) {
|
||||
/** @type {Array.<ol.geom.LineString>} */
|
||||
/** @type {Array.<module:ol/geom/LineString~LineString>} */
|
||||
const lineStrings = pushParseAndPop([],
|
||||
this.MULTILINESTRING_PARSERS_, node, objectStack, this);
|
||||
if (lineStrings) {
|
||||
@@ -336,10 +336,10 @@ GMLBase.prototype.readMultiLineString = function(node, objectStack) {
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @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) {
|
||||
/** @type {Array.<ol.geom.Polygon>} */
|
||||
/** @type {Array.<module:ol/geom/Polygon~Polygon>} */
|
||||
const polygons = pushParseAndPop([], this.MULTIPOLYGON_PARSERS_, node, objectStack, this);
|
||||
if (polygons) {
|
||||
const multiPolygon = new MultiPolygon(null);
|
||||
@@ -384,7 +384,7 @@ GMLBase.prototype.polygonMemberParser_ = function(node, objectStack) {
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @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) {
|
||||
const flatCoordinates = this.readFlatCoordinatesFromNode_(node, objectStack);
|
||||
@@ -419,7 +419,7 @@ GMLBase.prototype.readFlatLinearRing_ = function(node, objectStack) {
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @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) {
|
||||
const flatCoordinates = this.readFlatCoordinatesFromNode_(node, objectStack);
|
||||
@@ -436,7 +436,7 @@ GMLBase.prototype.readLinearRing = function(node, objectStack) {
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @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) {
|
||||
/** @type {Array.<Array.<number>>} */
|
||||
@@ -573,7 +573,7 @@ GMLBase.prototype.readGeometryFromNode = function(node, opt_options) {
|
||||
* @function
|
||||
* @param {Document|Node|Object|string} source Source.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Options.
|
||||
* @return {Array.<ol.Feature>} Features.
|
||||
* @return {Array.<module:ol/Feature~Feature>} Features.
|
||||
* @api
|
||||
*/
|
||||
GMLBase.prototype.readFeatures;
|
||||
|
||||
@@ -20,7 +20,7 @@ import {createElementNS, makeArrayPusher, makeArraySerializer, makeChildAppender
|
||||
|
||||
/**
|
||||
* @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
|
||||
* not store any references to the node. Note that the `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');
|
||||
|
||||
/**
|
||||
* @type {function(ol.Feature, Node)|undefined}
|
||||
* @type {function(module:ol/Feature~Feature, Node)|undefined}
|
||||
* @private
|
||||
*/
|
||||
this.readExtensions_ = options.readExtensions;
|
||||
@@ -80,7 +80,7 @@ const SCHEMA_LOCATION = 'http://www.topografix.com/GPX/1/1 ' +
|
||||
|
||||
/**
|
||||
* @const
|
||||
* @type {Object.<string, function(Node, Array.<*>): (ol.Feature|undefined)>}
|
||||
* @type {Object.<string, function(Node, Array.<*>): (module:ol/Feature~Feature|undefined)>}
|
||||
*/
|
||||
const FEATURE_READER = {
|
||||
'rte': readRte,
|
||||
@@ -364,7 +364,7 @@ const GEOMETRY_TYPE_TO_NODENAME = {
|
||||
* @return {Node|undefined} Node.
|
||||
*/
|
||||
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) {
|
||||
const nodeName = GEOMETRY_TYPE_TO_NODENAME[geometry.getType()];
|
||||
if (nodeName) {
|
||||
@@ -423,7 +423,7 @@ function appendCoordinate(flatCoordinates, layoutOptions, node, values) {
|
||||
* @param {ol.LayoutOptions} layoutOptions Layout options.
|
||||
* @param {Array.<number>} flatCoordinates Flat coordinates.
|
||||
* @param {Array.<number>=} ends Ends.
|
||||
* @return {ol.geom.GeometryLayout} Layout.
|
||||
* @return {module:ol/geom/GeometryLayout~GeometryLayout} Layout.
|
||||
*/
|
||||
function applyLayoutOptions(layoutOptions, flatCoordinates, ends) {
|
||||
let layout = GeometryLayout.XY;
|
||||
@@ -531,7 +531,7 @@ function parseTrkSeg(node, objectStack) {
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @param {Array.<*>} objectStack Object stack.
|
||||
* @return {ol.Feature|undefined} Track.
|
||||
* @return {module:ol/Feature~Feature|undefined} Track.
|
||||
*/
|
||||
function readRte(node, objectStack) {
|
||||
const options = /** @type {module:ol/format/Feature~ReadOptions} */ (objectStack[0]);
|
||||
@@ -560,7 +560,7 @@ function readRte(node, objectStack) {
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @param {Array.<*>} objectStack Object stack.
|
||||
* @return {ol.Feature|undefined} Track.
|
||||
* @return {module:ol/Feature~Feature|undefined} Track.
|
||||
*/
|
||||
function readTrk(node, objectStack) {
|
||||
const options = /** @type {module:ol/format/Feature~ReadOptions} */ (objectStack[0]);
|
||||
@@ -592,7 +592,7 @@ function readTrk(node, objectStack) {
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @param {Array.<*>} objectStack Object stack.
|
||||
* @return {ol.Feature|undefined} Waypoint.
|
||||
* @return {module:ol/Feature~Feature|undefined} Waypoint.
|
||||
*/
|
||||
function readWpt(node, objectStack) {
|
||||
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
|
||||
*/
|
||||
GPX.prototype.handleReadExtensions_ = function(features) {
|
||||
@@ -638,7 +638,7 @@ GPX.prototype.handleReadExtensions_ = function(features) {
|
||||
* @function
|
||||
* @param {Document|Node|Object|string} source Source.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||
* @return {ol.Feature} Feature.
|
||||
* @return {module:ol/Feature~Feature} Feature.
|
||||
* @api
|
||||
*/
|
||||
GPX.prototype.readFeature;
|
||||
@@ -672,7 +672,7 @@ GPX.prototype.readFeatureFromNode = function(node, opt_options) {
|
||||
* @function
|
||||
* @param {Document|Node|Object|string} source Source.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||
* @return {Array.<ol.Feature>} Features.
|
||||
* @return {Array.<module:ol/Feature~Feature>} Features.
|
||||
* @api
|
||||
*/
|
||||
GPX.prototype.readFeatures;
|
||||
@@ -686,7 +686,7 @@ GPX.prototype.readFeaturesFromNode = function(node, opt_options) {
|
||||
return [];
|
||||
}
|
||||
if (node.localName == 'gpx') {
|
||||
/** @type {Array.<ol.Feature>} */
|
||||
/** @type {Array.<module:ol/Feature~Feature>} */
|
||||
const features = pushParseAndPop([], GPX_PARSERS,
|
||||
node, [this.getReadOptions(node, opt_options)]);
|
||||
if (features) {
|
||||
@@ -705,7 +705,7 @@ GPX.prototype.readFeaturesFromNode = function(node, opt_options) {
|
||||
*
|
||||
* @function
|
||||
* @param {Document|Node|Object|string} source Source.
|
||||
* @return {ol.proj.Projection} Projection.
|
||||
* @return {module:ol/proj/Projection~Projection} Projection.
|
||||
* @api
|
||||
*/
|
||||
GPX.prototype.readProjection;
|
||||
@@ -776,7 +776,7 @@ function writeWptType(node, coordinate, objectStack) {
|
||||
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
* @param {Array.<*>} objectStack Object stack.
|
||||
*/
|
||||
function writeRte(node, feature, objectStack) {
|
||||
@@ -785,7 +785,7 @@ function writeRte(node, feature, objectStack) {
|
||||
const context = {node: node, 'properties': properties};
|
||||
let geometry = feature.getGeometry();
|
||||
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();
|
||||
properties['rtept'] = geometry.getCoordinates();
|
||||
}
|
||||
@@ -800,7 +800,7 @@ function writeRte(node, feature, objectStack) {
|
||||
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
* @param {Array.<*>} objectStack Object stack.
|
||||
*/
|
||||
function writeTrk(node, feature, objectStack) {
|
||||
@@ -810,7 +810,7 @@ function writeTrk(node, feature, objectStack) {
|
||||
const context = {node: node, 'properties': properties};
|
||||
let geometry = feature.getGeometry();
|
||||
if (geometry) {
|
||||
geometry = /** @type {ol.geom.MultiLineString} */
|
||||
geometry = /** @type {module:ol/geom/MultiLineString~MultiLineString} */
|
||||
(transformWithOptions(geometry, true, options));
|
||||
properties['trkseg'] = geometry.getLineStrings();
|
||||
}
|
||||
@@ -825,7 +825,7 @@ function writeTrk(node, feature, objectStack) {
|
||||
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @param {ol.geom.LineString} lineString LineString.
|
||||
* @param {module:ol/geom/LineString~LineString} lineString LineString.
|
||||
* @param {Array.<*>} objectStack Object stack.
|
||||
*/
|
||||
function writeTrkSeg(node, lineString, objectStack) {
|
||||
@@ -840,7 +840,7 @@ function writeTrkSeg(node, lineString, objectStack) {
|
||||
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
* @param {Array.<*>} objectStack Object stack.
|
||||
*/
|
||||
function writeWpt(node, feature, objectStack) {
|
||||
@@ -849,7 +849,7 @@ function writeWpt(node, feature, objectStack) {
|
||||
context['properties'] = feature.getProperties();
|
||||
let geometry = feature.getGeometry();
|
||||
if (geometry) {
|
||||
geometry = /** @type {ol.geom.Point} */
|
||||
geometry = /** @type {module:ol/geom/Point~Point} */
|
||||
(transformWithOptions(geometry, true, options));
|
||||
context['geometryLayout'] = geometry.getLayout();
|
||||
writeWptType(node, geometry.getCoordinates(), objectStack);
|
||||
@@ -863,7 +863,7 @@ function writeWpt(node, feature, objectStack) {
|
||||
* as tracks (`<trk>`).
|
||||
*
|
||||
* @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.
|
||||
* @return {string} Result.
|
||||
* @api
|
||||
@@ -876,7 +876,7 @@ GPX.prototype.writeFeatures;
|
||||
* LineString geometries are output as routes (`<rte>`), and MultiLineString
|
||||
* 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.
|
||||
* @return {Node} Node.
|
||||
* @override
|
||||
|
||||
@@ -83,7 +83,7 @@ inherits(GeoJSON, JSONFeature);
|
||||
|
||||
/**
|
||||
* @const
|
||||
* @type {Object.<string, function(GeoJSONObject): ol.geom.Geometry>}
|
||||
* @type {Object.<string, function(GeoJSONObject): module:ol/geom/Geometry~Geometry>}
|
||||
*/
|
||||
const GEOMETRY_READERS = {
|
||||
'Point': readPointGeometry,
|
||||
@@ -98,7 +98,7 @@ const GEOMETRY_READERS = {
|
||||
|
||||
/**
|
||||
* @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 = {
|
||||
'Point': writePointGeometry,
|
||||
@@ -115,14 +115,14 @@ const GEOMETRY_WRITERS = {
|
||||
/**
|
||||
* @param {GeoJSONGeometry|GeoJSONGeometryCollection} object Object.
|
||||
* @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) {
|
||||
if (!object) {
|
||||
return null;
|
||||
}
|
||||
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)
|
||||
);
|
||||
}
|
||||
@@ -131,13 +131,13 @@ function readGeometry(object, opt_options) {
|
||||
/**
|
||||
* @param {GeoJSONGeometryCollection} object Object.
|
||||
* @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) {
|
||||
const geometries = object.geometries.map(
|
||||
/**
|
||||
* @param {GeoJSONGeometry} geometry Geometry.
|
||||
* @return {ol.geom.Geometry} geometry Geometry.
|
||||
* @return {module:ol/geom/Geometry~Geometry} geometry Geometry.
|
||||
*/
|
||||
function(geometry) {
|
||||
return readGeometry(geometry, opt_options);
|
||||
@@ -148,7 +148,7 @@ function readGeometryCollectionGeometry(object, opt_options) {
|
||||
|
||||
/**
|
||||
* @param {GeoJSONGeometry} object Object.
|
||||
* @return {ol.geom.Point} Point.
|
||||
* @return {module:ol/geom/Point~Point} Point.
|
||||
*/
|
||||
function readPointGeometry(object) {
|
||||
return new Point(object.coordinates);
|
||||
@@ -157,7 +157,7 @@ function readPointGeometry(object) {
|
||||
|
||||
/**
|
||||
* @param {GeoJSONGeometry} object Object.
|
||||
* @return {ol.geom.LineString} LineString.
|
||||
* @return {module:ol/geom/LineString~LineString} LineString.
|
||||
*/
|
||||
function readLineStringGeometry(object) {
|
||||
return new LineString(object.coordinates);
|
||||
@@ -166,7 +166,7 @@ function readLineStringGeometry(object) {
|
||||
|
||||
/**
|
||||
* @param {GeoJSONGeometry} object Object.
|
||||
* @return {ol.geom.MultiLineString} MultiLineString.
|
||||
* @return {module:ol/geom/MultiLineString~MultiLineString} MultiLineString.
|
||||
*/
|
||||
function readMultiLineStringGeometry(object) {
|
||||
return new MultiLineString(object.coordinates);
|
||||
@@ -175,7 +175,7 @@ function readMultiLineStringGeometry(object) {
|
||||
|
||||
/**
|
||||
* @param {GeoJSONGeometry} object Object.
|
||||
* @return {ol.geom.MultiPoint} MultiPoint.
|
||||
* @return {module:ol/geom/MultiPoint~MultiPoint} MultiPoint.
|
||||
*/
|
||||
function readMultiPointGeometry(object) {
|
||||
return new MultiPoint(object.coordinates);
|
||||
@@ -184,7 +184,7 @@ function readMultiPointGeometry(object) {
|
||||
|
||||
/**
|
||||
* @param {GeoJSONGeometry} object Object.
|
||||
* @return {ol.geom.MultiPolygon} MultiPolygon.
|
||||
* @return {module:ol/geom/MultiPolygon~MultiPolygon} MultiPolygon.
|
||||
*/
|
||||
function readMultiPolygonGeometry(object) {
|
||||
return new MultiPolygon(object.coordinates);
|
||||
@@ -193,7 +193,7 @@ function readMultiPolygonGeometry(object) {
|
||||
|
||||
/**
|
||||
* @param {GeoJSONGeometry} object Object.
|
||||
* @return {ol.geom.Polygon} Polygon.
|
||||
* @return {module:ol/geom/Polygon~Polygon} Polygon.
|
||||
*/
|
||||
function readPolygonGeometry(object) {
|
||||
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.
|
||||
* @return {GeoJSONGeometry|GeoJSONGeometryCollection} GeoJSON geometry.
|
||||
*/
|
||||
function writeGeometry(geometry, opt_options) {
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.geom.Geometry} geometry Geometry.
|
||||
* @param {module:ol/geom/Geometry~Geometry} geometry Geometry.
|
||||
* @return {GeoJSONGeometryCollection} Empty GeoJSON geometry collection.
|
||||
*/
|
||||
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.
|
||||
* @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.
|
||||
* @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.
|
||||
* @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.
|
||||
* @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.
|
||||
* @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.
|
||||
* @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.
|
||||
* @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
|
||||
* geometry types. Use {@link ol.format.GeoJSON#readFeatures} to read
|
||||
* FeatureCollection source. If feature at source has an id, it will be used
|
||||
* as Feature id by calling {@link ol.Feature#setId} internally.
|
||||
* as Feature id by calling {@link module:ol/Feature~Feature#setId} internally.
|
||||
*
|
||||
* @function
|
||||
* @param {Document|Node|Object|string} source Source.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||
* @return {ol.Feature} Feature.
|
||||
* @return {module:ol/Feature~Feature} Feature.
|
||||
* @api
|
||||
*/
|
||||
GeoJSON.prototype.readFeature;
|
||||
@@ -351,7 +351,7 @@ GeoJSON.prototype.readFeature;
|
||||
* @function
|
||||
* @param {Document|Node|Object|string} source Source.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||
* @return {Array.<ol.Feature>} Features.
|
||||
* @return {Array.<module:ol/Feature~Feature>} Features.
|
||||
* @api
|
||||
*/
|
||||
GeoJSON.prototype.readFeatures;
|
||||
@@ -397,7 +397,7 @@ GeoJSON.prototype.readFeatureFromObject = function(object, opt_options) {
|
||||
*/
|
||||
GeoJSON.prototype.readFeaturesFromObject = function(object, opt_options) {
|
||||
const geoJSONObject = /** @type {GeoJSONObject} */ (object);
|
||||
/** @type {Array.<ol.Feature>} */
|
||||
/** @type {Array.<module:ol/Feature~Feature>} */
|
||||
let features = null;
|
||||
if (geoJSONObject.type === 'FeatureCollection') {
|
||||
const geoJSONFeatureCollection = /** @type {GeoJSONFeatureCollection} */ (object);
|
||||
@@ -419,7 +419,7 @@ GeoJSON.prototype.readFeaturesFromObject = function(object, opt_options) {
|
||||
* @function
|
||||
* @param {Document|Node|Object|string} source Source.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||
* @return {ol.geom.Geometry} Geometry.
|
||||
* @return {module:ol/geom/Geometry~Geometry} Geometry.
|
||||
* @api
|
||||
*/
|
||||
GeoJSON.prototype.readGeometry;
|
||||
@@ -438,7 +438,7 @@ GeoJSON.prototype.readGeometryFromObject = function(object, opt_options) {
|
||||
*
|
||||
* @function
|
||||
* @param {Document|Node|Object|string} source Source.
|
||||
* @return {ol.proj.Projection} Projection.
|
||||
* @return {module:ol/proj/Projection~Projection} Projection.
|
||||
* @api
|
||||
*/
|
||||
GeoJSON.prototype.readProjection;
|
||||
@@ -460,7 +460,7 @@ GeoJSON.prototype.readProjectionFromObject = function(object) {
|
||||
} else {
|
||||
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.
|
||||
*
|
||||
* @function
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
|
||||
* @return {string} GeoJSON.
|
||||
* @override
|
||||
@@ -480,7 +480,7 @@ GeoJSON.prototype.writeFeature;
|
||||
/**
|
||||
* 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.
|
||||
* @return {GeoJSONFeature} Object.
|
||||
* @override
|
||||
@@ -517,7 +517,7 @@ GeoJSON.prototype.writeFeatureObject = function(feature, opt_options) {
|
||||
* Encode an array of features as GeoJSON.
|
||||
*
|
||||
* @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.
|
||||
* @return {string} GeoJSON.
|
||||
* @api
|
||||
@@ -528,7 +528,7 @@ GeoJSON.prototype.writeFeatures;
|
||||
/**
|
||||
* 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.
|
||||
* @return {GeoJSONFeatureCollection} GeoJSON Object.
|
||||
* @override
|
||||
@@ -551,7 +551,7 @@ GeoJSON.prototype.writeFeaturesObject = function(features, opt_options) {
|
||||
* Encode a geometry as a GeoJSON string.
|
||||
*
|
||||
* @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.
|
||||
* @return {string} GeoJSON.
|
||||
* @api
|
||||
@@ -562,7 +562,7 @@ GeoJSON.prototype.writeGeometry;
|
||||
/**
|
||||
* 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.
|
||||
* @return {GeoJSONGeometry|GeoJSONGeometryCollection} Object.
|
||||
* @override
|
||||
|
||||
@@ -95,7 +95,7 @@ const NEWLINE_RE = /\r\n|\r|\n/;
|
||||
* @function
|
||||
* @param {Document|Node|Object|string} source Source.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||
* @return {ol.Feature} Feature.
|
||||
* @return {module:ol/Feature~Feature} Feature.
|
||||
* @api
|
||||
*/
|
||||
IGC.prototype.readFeature;
|
||||
@@ -185,7 +185,7 @@ IGC.prototype.readFeatureFromText = function(text, opt_options) {
|
||||
* @function
|
||||
* @param {Document|Node|Object|string} source Source.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||
* @return {Array.<ol.Feature>} Features.
|
||||
* @return {Array.<module:ol/Feature~Feature>} Features.
|
||||
* @api
|
||||
*/
|
||||
IGC.prototype.readFeatures;
|
||||
@@ -209,7 +209,7 @@ IGC.prototype.readFeaturesFromText = function(text, opt_options) {
|
||||
*
|
||||
* @function
|
||||
* @param {Document|Node|Object|string} source Source.
|
||||
* @return {ol.proj.Projection} Projection.
|
||||
* @return {module:ol/proj/Projection~Projection} Projection.
|
||||
* @api
|
||||
*/
|
||||
IGC.prototype.readProjection;
|
||||
|
||||
@@ -69,7 +69,7 @@ JSONFeature.prototype.readFeatures = function(source, opt_options) {
|
||||
* @param {Object} object Object.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||
* @protected
|
||||
* @return {ol.Feature} Feature.
|
||||
* @return {module:ol/Feature~Feature} Feature.
|
||||
*/
|
||||
JSONFeature.prototype.readFeatureFromObject = function(object, opt_options) {};
|
||||
|
||||
@@ -79,7 +79,7 @@ JSONFeature.prototype.readFeatureFromObject = function(object, opt_options) {};
|
||||
* @param {Object} object Object.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||
* @protected
|
||||
* @return {Array.<ol.Feature>} Features.
|
||||
* @return {Array.<module:ol/Feature~Feature>} Features.
|
||||
*/
|
||||
JSONFeature.prototype.readFeaturesFromObject = function(object, opt_options) {};
|
||||
|
||||
@@ -98,7 +98,7 @@ JSONFeature.prototype.readGeometry = function(source, opt_options) {
|
||||
* @param {Object} object Object.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||
* @protected
|
||||
* @return {ol.geom.Geometry} Geometry.
|
||||
* @return {module:ol/geom/Geometry~Geometry} Geometry.
|
||||
*/
|
||||
JSONFeature.prototype.readGeometryFromObject = function(object, opt_options) {};
|
||||
|
||||
@@ -115,7 +115,7 @@ JSONFeature.prototype.readProjection = function(source) {
|
||||
* @abstract
|
||||
* @param {Object} object Object.
|
||||
* @protected
|
||||
* @return {ol.proj.Projection} Projection.
|
||||
* @return {module:ol/proj/Projection~Projection} Projection.
|
||||
*/
|
||||
JSONFeature.prototype.readProjectionFromObject = function(object) {};
|
||||
|
||||
@@ -130,7 +130,7 @@ JSONFeature.prototype.writeFeature = function(feature, opt_options) {
|
||||
|
||||
/**
|
||||
* @abstract
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
|
||||
* @return {Object} Object.
|
||||
*/
|
||||
@@ -147,7 +147,7 @@ JSONFeature.prototype.writeFeatures = function(features, opt_options) {
|
||||
|
||||
/**
|
||||
* @abstract
|
||||
* @param {Array.<ol.Feature>} features Features.
|
||||
* @param {Array.<module:ol/Feature~Feature>} features Features.
|
||||
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
|
||||
* @return {Object} Object.
|
||||
*/
|
||||
@@ -164,7 +164,7 @@ JSONFeature.prototype.writeGeometry = function(geometry, opt_options) {
|
||||
|
||||
/**
|
||||
* @abstract
|
||||
* @param {ol.geom.Geometry} geometry Geometry.
|
||||
* @param {module:ol/geom/Geometry~Geometry} geometry Geometry.
|
||||
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
|
||||
* @return {Object} Object.
|
||||
*/
|
||||
|
||||
@@ -405,7 +405,7 @@ function createFeatureStyleFunction(style, styleUrl, defaultStyle, sharedStyles,
|
||||
|
||||
return (
|
||||
/**
|
||||
* @param {ol.Feature} feature feature.
|
||||
* @param {module:ol/Feature~Feature} feature feature.
|
||||
* @param {number} resolution Resolution.
|
||||
* @return {Array.<ol.style.Style>} Style.
|
||||
*/
|
||||
@@ -890,7 +890,7 @@ const GX_MULTITRACK_GEOMETRY_PARSERS = makeStructureNS(
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @param {Array.<*>} objectStack Object stack.
|
||||
* @return {ol.geom.MultiLineString|undefined} MultiLineString.
|
||||
* @return {module:ol/geom/MultiLineString~MultiLineString|undefined} MultiLineString.
|
||||
*/
|
||||
function readGxMultiTrack(node, objectStack) {
|
||||
const lineStrings = pushParseAndPop([],
|
||||
@@ -920,7 +920,7 @@ const GX_TRACK_PARSERS = makeStructureNS(
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @param {Array.<*>} objectStack Object stack.
|
||||
* @return {ol.geom.LineString|undefined} LineString.
|
||||
* @return {module:ol/geom/LineString~LineString|undefined} LineString.
|
||||
*/
|
||||
function readGxTrack(node, objectStack) {
|
||||
const gxTrackObject = pushParseAndPop(
|
||||
@@ -1010,7 +1010,7 @@ const EXTRUDE_AND_ALTITUDE_MODE_PARSERS = makeStructureNS(
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @param {Array.<*>} objectStack Object stack.
|
||||
* @return {ol.geom.LineString|undefined} LineString.
|
||||
* @return {module:ol/geom/LineString~LineString|undefined} LineString.
|
||||
*/
|
||||
function readLineString(node, objectStack) {
|
||||
const properties = pushParseAndPop({},
|
||||
@@ -1032,7 +1032,7 @@ function readLineString(node, objectStack) {
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @param {Array.<*>} objectStack Object stack.
|
||||
* @return {ol.geom.Polygon|undefined} Polygon.
|
||||
* @return {module:ol/geom/Polygon~Polygon|undefined} Polygon.
|
||||
*/
|
||||
function readLinearRing(node, objectStack) {
|
||||
const properties = pushParseAndPop({},
|
||||
@@ -1069,7 +1069,7 @@ const MULTI_GEOMETRY_PARSERS = makeStructureNS(
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @param {Array.<*>} objectStack Object stack.
|
||||
* @return {ol.geom.Geometry} Geometry.
|
||||
* @return {module:ol/geom/Geometry~Geometry} Geometry.
|
||||
*/
|
||||
function readMultiGeometry(node, objectStack) {
|
||||
const geometries = pushParseAndPop([],
|
||||
@@ -1080,7 +1080,7 @@ function readMultiGeometry(node, objectStack) {
|
||||
if (geometries.length === 0) {
|
||||
return new GeometryCollection(geometries);
|
||||
}
|
||||
/** @type {ol.geom.Geometry} */
|
||||
/** @type {module:ol/geom/Geometry~Geometry} */
|
||||
let multiGeometry;
|
||||
let homogeneous = true;
|
||||
const type = geometries[0].getType();
|
||||
@@ -1122,14 +1122,14 @@ function readMultiGeometry(node, objectStack) {
|
||||
} else {
|
||||
multiGeometry = new GeometryCollection(geometries);
|
||||
}
|
||||
return /** @type {ol.geom.Geometry} */ (multiGeometry);
|
||||
return /** @type {module:ol/geom/Geometry~Geometry} */ (multiGeometry);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @param {Array.<*>} objectStack Object stack.
|
||||
* @return {ol.geom.Point|undefined} Point.
|
||||
* @return {module:ol/geom/Point~Point|undefined} Point.
|
||||
*/
|
||||
function readPoint(node, objectStack) {
|
||||
const properties = pushParseAndPop({},
|
||||
@@ -1162,7 +1162,7 @@ const FLAT_LINEAR_RINGS_PARSERS = makeStructureNS(
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @param {Array.<*>} objectStack Object stack.
|
||||
* @return {ol.geom.Polygon|undefined} Polygon.
|
||||
* @return {module:ol/geom/Polygon~Polygon|undefined} Polygon.
|
||||
*/
|
||||
function readPolygon(node, objectStack) {
|
||||
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
|
||||
* 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.
|
||||
* @param {Array.<ol.geom.Geometry>} geometries List of geometries.
|
||||
* @param {Array.<module:ol/geom/Geometry~Geometry>} geometries List of geometries.
|
||||
*/
|
||||
function setCommonGeometryProperties(multiGeometry, geometries) {
|
||||
const ii = geometries.length;
|
||||
@@ -1652,7 +1652,7 @@ const PLACEMARK_PARSERS = makeStructureNS(
|
||||
* @param {Node} node Node.
|
||||
* @param {Array.<*>} objectStack Object stack.
|
||||
* @private
|
||||
* @return {Array.<ol.Feature>|undefined} Features.
|
||||
* @return {Array.<module:ol/Feature~Feature>|undefined} Features.
|
||||
*/
|
||||
KML.prototype.readDocumentOrFolder_ = function(node, objectStack) {
|
||||
// FIXME use scope somehow
|
||||
@@ -1664,7 +1664,7 @@ KML.prototype.readDocumentOrFolder_ = function(node, objectStack) {
|
||||
'Style': this.readSharedStyle_.bind(this),
|
||||
'StyleMap': this.readSharedStyleMap_.bind(this)
|
||||
});
|
||||
/** @type {Array.<ol.Feature>} */
|
||||
/** @type {Array.<module:ol/Feature~Feature>} */
|
||||
const features = pushParseAndPop([], parsersNS, node, objectStack, this);
|
||||
if (features) {
|
||||
return features;
|
||||
@@ -1678,7 +1678,7 @@ KML.prototype.readDocumentOrFolder_ = function(node, objectStack) {
|
||||
* @param {Node} node Node.
|
||||
* @param {Array.<*>} objectStack Object stack.
|
||||
* @private
|
||||
* @return {ol.Feature|undefined} Feature.
|
||||
* @return {module:ol/Feature~Feature|undefined} Feature.
|
||||
*/
|
||||
KML.prototype.readPlacemark_ = function(node, objectStack) {
|
||||
const object = pushParseAndPop({'geometry': null},
|
||||
@@ -1782,7 +1782,7 @@ KML.prototype.readSharedStyleMap_ = function(node, objectStack) {
|
||||
* @function
|
||||
* @param {Document|Node|Object|string} source Source.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||
* @return {ol.Feature} Feature.
|
||||
* @return {module:ol/Feature~Feature} Feature.
|
||||
* @api
|
||||
*/
|
||||
KML.prototype.readFeature;
|
||||
@@ -1813,7 +1813,7 @@ KML.prototype.readFeatureFromNode = function(node, opt_options) {
|
||||
* @function
|
||||
* @param {Document|Node|Object|string} source Source.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||
* @return {Array.<ol.Feature>} Features.
|
||||
* @return {Array.<module:ol/Feature~Feature>} Features.
|
||||
* @api
|
||||
*/
|
||||
KML.prototype.readFeatures;
|
||||
@@ -2061,7 +2061,7 @@ KML.prototype.readRegionFromNode = function(node) {
|
||||
*
|
||||
* @function
|
||||
* @param {Document|Node|Object|string} source Source.
|
||||
* @return {ol.proj.Projection} Projection.
|
||||
* @return {module:ol/proj/Projection~Projection} Projection.
|
||||
* @api
|
||||
*/
|
||||
KML.prototype.readProjection;
|
||||
@@ -2205,7 +2205,7 @@ const DOCUMENT_NODE_FACTORY = function(value, objectStack, opt_nodeName) {
|
||||
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @param {Array.<ol.Feature>} features Features.
|
||||
* @param {Array.<module:ol/Feature~Feature>} features Features.
|
||||
* @param {Array.<*>} objectStack Object stack.
|
||||
* @this {ol.format.KML}
|
||||
*/
|
||||
@@ -2499,7 +2499,7 @@ const GEOMETRY_NODE_FACTORY = function(value, objectStack, opt_nodeName) {
|
||||
if (value) {
|
||||
const parentNode = objectStack[objectStack.length - 1].node;
|
||||
return createElementNS(parentNode.namespaceURI,
|
||||
GEOMETRY_TYPE_TO_NODENAME[/** @type {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 {ol.geom.Geometry} geometry Geometry.
|
||||
* @param {module:ol/geom/Geometry~Geometry} geometry Geometry.
|
||||
* @param {Array.<*>} objectStack Object stack.
|
||||
*/
|
||||
function writeMultiGeometry(node, geometry, objectStack) {
|
||||
/** @type {module:ol/xml~NodeStackItem} */
|
||||
const context = {node: node};
|
||||
const type = geometry.getType();
|
||||
/** @type {Array.<ol.geom.Geometry>} */
|
||||
/** @type {Array.<module:ol/geom/Geometry~Geometry>} */
|
||||
let geometries;
|
||||
/** @type {function(*, Array.<*>, string=): (Node|undefined)} */
|
||||
let factory;
|
||||
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;
|
||||
} 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;
|
||||
} else if (type == GeometryType.MULTI_LINE_STRING) {
|
||||
geometries =
|
||||
(/** @type {ol.geom.MultiLineString} */ (geometry)).getLineStrings();
|
||||
(/** @type {module:ol/geom/MultiLineString~MultiLineString} */ (geometry)).getLineStrings();
|
||||
factory = LINE_STRING_NODE_FACTORY;
|
||||
} else if (type == GeometryType.MULTI_POLYGON) {
|
||||
geometries =
|
||||
(/** @type {ol.geom.MultiPolygon} */ (geometry)).getPolygons();
|
||||
(/** @type {module:ol/geom/MultiPolygon~MultiPolygon} */ (geometry)).getPolygons();
|
||||
factory = POLYGON_NODE_FACTORY;
|
||||
} else {
|
||||
assert(false, 39); // Unknown geometry type
|
||||
@@ -2601,7 +2601,7 @@ const BOUNDARY_IS_SERIALIZERS = makeStructureNS(
|
||||
|
||||
/**
|
||||
* @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.
|
||||
*/
|
||||
function writeBoundaryIs(node, linearRing, objectStack) {
|
||||
@@ -2658,7 +2658,7 @@ const EXTENDEDDATA_NODE_FACTORY = makeSimpleNodeFactory('ExtendedData');
|
||||
* FIXME currently we do serialize arbitrary/custom feature properties
|
||||
* (ExtendedData).
|
||||
* @param {Node} node Node.
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
* @param {Array.<*>} objectStack Object stack.
|
||||
* @this {ol.format.KML}
|
||||
*/
|
||||
@@ -2746,7 +2746,7 @@ const PRIMITIVE_GEOMETRY_SERIALIZERS = makeStructureNS(
|
||||
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @param {ol.geom.SimpleGeometry} geometry Geometry.
|
||||
* @param {module:ol/geom/SimpleGeometry~SimpleGeometry} geometry Geometry.
|
||||
* @param {Array.<*>} objectStack Object stack.
|
||||
*/
|
||||
function writePrimitiveGeometry(node, geometry, objectStack) {
|
||||
@@ -2798,7 +2798,7 @@ const OUTER_BOUNDARY_NODE_FACTORY = makeSimpleNodeFactory('outerBoundaryIs');
|
||||
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @param {ol.geom.Polygon} polygon Polygon.
|
||||
* @param {module:ol/geom/Polygon~Polygon} polygon Polygon.
|
||||
* @param {Array.<*>} objectStack Object stack.
|
||||
*/
|
||||
function writePolygon(node, polygon, objectStack) {
|
||||
@@ -2952,7 +2952,7 @@ const KML_SERIALIZERS = makeStructureNS(
|
||||
* MultiLineStrings, and MultiPolygons are output as MultiGeometries.
|
||||
*
|
||||
* @function
|
||||
* @param {Array.<ol.Feature>} features Features.
|
||||
* @param {Array.<module:ol/Feature~Feature>} features Features.
|
||||
* @param {module:ol/format/Feature~WriteOptions=} opt_options Options.
|
||||
* @return {string} Result.
|
||||
* @api
|
||||
@@ -2964,7 +2964,7 @@ KML.prototype.writeFeatures;
|
||||
* Encode an array of features in the KML format as an XML node. GeometryCollections,
|
||||
* MultiPoints, MultiLineStrings, and MultiPolygons are output as MultiGeometries.
|
||||
*
|
||||
* @param {Array.<ol.Feature>} features Features.
|
||||
* @param {Array.<module:ol/Feature~Feature>} features Features.
|
||||
* @param {module:ol/format/Feature~WriteOptions=} opt_options Options.
|
||||
* @return {Node} Node.
|
||||
* @override
|
||||
|
||||
@@ -24,9 +24,9 @@ import RenderFeature from '../render/Feature.js';
|
||||
|
||||
/**
|
||||
* @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
|
||||
* {@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},
|
||||
* which is optimized for rendering and hit detection.
|
||||
* @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 : {};
|
||||
|
||||
/**
|
||||
* @type {ol.proj.Projection}
|
||||
* @type {module:ol/proj/Projection~Projection}
|
||||
*/
|
||||
this.defaultDataProjection = new Projection({
|
||||
code: '',
|
||||
@@ -63,8 +63,8 @@ const MVT = function(opt_options) {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {function((ol.geom.Geometry|Object.<string,*>)=)|
|
||||
* function(ol.geom.GeometryType,Array.<number>,
|
||||
* @type {function((module:ol/geom/Geometry~Geometry|Object.<string,*>)=)|
|
||||
* function(module:ol/geom/GeometryType~GeometryType,Array.<number>,
|
||||
* (Array.<number>|Array.<Array.<number>>),Object.<string,*>,number)}
|
||||
*/
|
||||
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} numEnds Number of ends of the flat coordinates of the
|
||||
* geometry.
|
||||
* @return {ol.geom.GeometryType} The geometry type.
|
||||
* @return {module:ol/geom/GeometryType~GeometryType} The geometry type.
|
||||
*/
|
||||
function getGeometryType(type, numEnds) {
|
||||
/** @type {ol.geom.GeometryType} */
|
||||
/** @type {module:ol/geom/GeometryType~GeometryType} */
|
||||
let geometryType;
|
||||
if (type === 1) {
|
||||
geometryType = numEnds === 1 ?
|
||||
@@ -297,7 +297,7 @@ function getGeometryType(type, numEnds) {
|
||||
* @param {ol.ext.PBF} pbf PBF
|
||||
* @param {Object} rawFeature Raw Mapbox feature.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||
* @return {ol.Feature|ol.render.Feature} Feature.
|
||||
* @return {module:ol/Feature~Feature|ol.render.Feature} Feature.
|
||||
*/
|
||||
MVT.prototype.createFeature_ = function(pbf, rawFeature, opt_options) {
|
||||
const type = rawFeature.type;
|
||||
@@ -387,7 +387,7 @@ MVT.prototype.readFeatures = function(source, opt_options) {
|
||||
|
||||
const pbf = new PBF(/** @type {ArrayBuffer} */ (source));
|
||||
const pbfLayers = pbf.readFields(layersPBFReader, {});
|
||||
/** @type {Array.<ol.Feature|ol.render.Feature>} */
|
||||
/** @type {Array.<module:ol/Feature~Feature|ol.render.Feature>} */
|
||||
const features = [];
|
||||
for (const name in pbfLayers) {
|
||||
if (layers && layers.indexOf(name) == -1) {
|
||||
|
||||
@@ -146,7 +146,7 @@ function readTag(node, objectStack) {
|
||||
* @function
|
||||
* @param {Document|Node|Object|string} source Source.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||
* @return {Array.<ol.Feature>} Features.
|
||||
* @return {Array.<module:ol/Feature~Feature>} Features.
|
||||
* @api
|
||||
*/
|
||||
OSMXML.prototype.readFeatures;
|
||||
@@ -201,7 +201,7 @@ OSMXML.prototype.readFeaturesFromNode = function(node, opt_options) {
|
||||
*
|
||||
* @function
|
||||
* @param {Document|Node|Object|string} source Source.
|
||||
* @return {ol.proj.Projection} Projection.
|
||||
* @return {module:ol/proj/Projection~Projection} Projection.
|
||||
* @api
|
||||
*/
|
||||
OSMXML.prototype.readProjection;
|
||||
|
||||
@@ -18,8 +18,8 @@ import {get as getProjection} from '../proj.js';
|
||||
* @typedef {Object} Options
|
||||
* @property {number|undefined} factor The factor by which the coordinates
|
||||
* values will be scaled. Default is `1e5`.
|
||||
* @property {ol.geom.GeometryLayout|undefined} geometryLayout Layout of the
|
||||
* feature geometries created by the format reader. Default is `ol.geom.GeometryLayout.XY`.
|
||||
* @property {module:ol/geom/GeometryLayout~GeometryLayout|undefined} geometryLayout Layout of the
|
||||
* feature geometries created by the format reader. Default is `module:ol/geom/GeometryLayout~GeometryLayout.XY`.
|
||||
*/
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ const Polyline = function(opt_options) {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {ol.geom.GeometryLayout}
|
||||
* @type {module:ol/geom/GeometryLayout~GeometryLayout}
|
||||
*/
|
||||
this.geometryLayout_ = options.geometryLayout ?
|
||||
options.geometryLayout : GeometryLayout.XY;
|
||||
@@ -272,7 +272,7 @@ export function encodeUnsignedInteger(num) {
|
||||
* @function
|
||||
* @param {Document|Node|Object|string} source Source.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||
* @return {ol.Feature} Feature.
|
||||
* @return {module:ol/Feature~Feature} Feature.
|
||||
* @api
|
||||
*/
|
||||
Polyline.prototype.readFeature;
|
||||
@@ -294,7 +294,7 @@ Polyline.prototype.readFeatureFromText = function(text, opt_options) {
|
||||
* @function
|
||||
* @param {Document|Node|Object|string} source Source.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||
* @return {Array.<ol.Feature>} Features.
|
||||
* @return {Array.<module:ol/Feature~Feature>} Features.
|
||||
* @api
|
||||
*/
|
||||
Polyline.prototype.readFeatures;
|
||||
@@ -315,7 +315,7 @@ Polyline.prototype.readFeaturesFromText = function(text, opt_options) {
|
||||
* @function
|
||||
* @param {Document|Node|Object|string} source Source.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||
* @return {ol.geom.Geometry} Geometry.
|
||||
* @return {module:ol/geom/Geometry~Geometry} Geometry.
|
||||
* @api
|
||||
*/
|
||||
Polyline.prototype.readGeometry;
|
||||
@@ -330,7 +330,7 @@ Polyline.prototype.readGeometryFromText = function(text, opt_options) {
|
||||
flipXY(flatCoordinates, 0, flatCoordinates.length, stride, flatCoordinates);
|
||||
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,
|
||||
this.adaptOptions(opt_options))
|
||||
);
|
||||
@@ -342,7 +342,7 @@ Polyline.prototype.readGeometryFromText = function(text, opt_options) {
|
||||
*
|
||||
* @function
|
||||
* @param {Document|Node|Object|string} source Source.
|
||||
* @return {ol.proj.Projection} Projection.
|
||||
* @return {module:ol/proj/Projection~Projection} Projection.
|
||||
* @api
|
||||
*/
|
||||
Polyline.prototype.readProjection;
|
||||
@@ -374,7 +374,7 @@ Polyline.prototype.writeFeaturesText = function(features, opt_options) {
|
||||
* Write a single geometry in Polyline format.
|
||||
*
|
||||
* @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.
|
||||
* @return {string} Geometry.
|
||||
* @api
|
||||
@@ -386,7 +386,7 @@ Polyline.prototype.writeGeometry;
|
||||
* @inheritDoc
|
||||
*/
|
||||
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)));
|
||||
const flatCoordinates = geometry.getFlatCoordinates();
|
||||
const stride = geometry.getStride();
|
||||
|
||||
@@ -56,7 +56,7 @@ TextFeature.prototype.readFeature = function(source, opt_options) {
|
||||
* @param {string} text Text.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||
* @protected
|
||||
* @return {ol.Feature} Feature.
|
||||
* @return {module:ol/Feature~Feature} Feature.
|
||||
*/
|
||||
TextFeature.prototype.readFeatureFromText = function(text, opt_options) {};
|
||||
|
||||
@@ -74,7 +74,7 @@ TextFeature.prototype.readFeatures = function(source, opt_options) {
|
||||
* @param {string} text Text.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||
* @protected
|
||||
* @return {Array.<ol.Feature>} Features.
|
||||
* @return {Array.<module:ol/Feature~Feature>} Features.
|
||||
*/
|
||||
TextFeature.prototype.readFeaturesFromText = function(text, opt_options) {};
|
||||
|
||||
@@ -92,7 +92,7 @@ TextFeature.prototype.readGeometry = function(source, opt_options) {
|
||||
* @param {string} text Text.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||
* @protected
|
||||
* @return {ol.geom.Geometry} Geometry.
|
||||
* @return {module:ol/geom/Geometry~Geometry} Geometry.
|
||||
*/
|
||||
TextFeature.prototype.readGeometryFromText = function(text, opt_options) {};
|
||||
|
||||
@@ -108,7 +108,7 @@ TextFeature.prototype.readProjection = function(source) {
|
||||
/**
|
||||
* @param {string} text Text.
|
||||
* @protected
|
||||
* @return {ol.proj.Projection} Projection.
|
||||
* @return {module:ol/proj/Projection~Projection} Projection.
|
||||
*/
|
||||
TextFeature.prototype.readProjectionFromText = function(text) {
|
||||
return this.defaultDataProjection;
|
||||
@@ -125,7 +125,7 @@ TextFeature.prototype.writeFeature = function(feature, opt_options) {
|
||||
|
||||
/**
|
||||
* @abstract
|
||||
* @param {ol.Feature} feature Features.
|
||||
* @param {module:ol/Feature~Feature} feature Features.
|
||||
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
|
||||
* @protected
|
||||
* @return {string} Text.
|
||||
@@ -143,7 +143,7 @@ TextFeature.prototype.writeFeatures = function(features, opt_options) {
|
||||
|
||||
/**
|
||||
* @abstract
|
||||
* @param {Array.<ol.Feature>} features Features.
|
||||
* @param {Array.<module:ol/Feature~Feature>} features Features.
|
||||
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
|
||||
* @protected
|
||||
* @return {string} Text.
|
||||
@@ -161,7 +161,7 @@ TextFeature.prototype.writeGeometry = function(geometry, opt_options) {
|
||||
|
||||
/**
|
||||
* @abstract
|
||||
* @param {ol.geom.Geometry} geometry Geometry.
|
||||
* @param {module:ol/geom/Geometry~Geometry} geometry Geometry.
|
||||
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
|
||||
* @protected
|
||||
* @return {string} Text.
|
||||
|
||||
@@ -81,7 +81,7 @@ inherits(TopoJSON, JSONFeature);
|
||||
|
||||
/**
|
||||
* @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 = {
|
||||
'Point': readPointGeometry,
|
||||
@@ -134,7 +134,7 @@ function concatenateArcs(indices, arcs) {
|
||||
* @param {TopoJSONGeometry} object TopoJSON object.
|
||||
* @param {Array.<number>} scale Scale for each dimension.
|
||||
* @param {Array.<number>} translate Translation for each dimension.
|
||||
* @return {ol.geom.Point} Geometry.
|
||||
* @return {module:ol/geom/Point~Point} Geometry.
|
||||
*/
|
||||
function readPointGeometry(object, scale, translate) {
|
||||
const coordinates = object.coordinates;
|
||||
@@ -151,7 +151,7 @@ function readPointGeometry(object, scale, translate) {
|
||||
* @param {TopoJSONGeometry} object TopoJSON object.
|
||||
* @param {Array.<number>} scale Scale for each dimension.
|
||||
* @param {Array.<number>} translate Translation for each dimension.
|
||||
* @return {ol.geom.MultiPoint} Geometry.
|
||||
* @return {module:ol/geom/MultiPoint~MultiPoint} Geometry.
|
||||
*/
|
||||
function readMultiPointGeometry(object, scale, translate) {
|
||||
const coordinates = object.coordinates;
|
||||
@@ -169,7 +169,7 @@ function readMultiPointGeometry(object, scale, translate) {
|
||||
*
|
||||
* @param {TopoJSONGeometry} object TopoJSON object.
|
||||
* @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) {
|
||||
const coordinates = concatenateArcs(object.arcs, arcs);
|
||||
@@ -182,7 +182,7 @@ function readLineStringGeometry(object, arcs) {
|
||||
*
|
||||
* @param {TopoJSONGeometry} object TopoJSON object.
|
||||
* @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) {
|
||||
const coordinates = [];
|
||||
@@ -198,7 +198,7 @@ function readMultiLineStringGeometry(object, arcs) {
|
||||
*
|
||||
* @param {TopoJSONGeometry} object TopoJSON object.
|
||||
* @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) {
|
||||
const coordinates = [];
|
||||
@@ -214,7 +214,7 @@ function readPolygonGeometry(object, arcs) {
|
||||
*
|
||||
* @param {TopoJSONGeometry} object TopoJSON object.
|
||||
* @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) {
|
||||
const coordinates = [];
|
||||
@@ -244,7 +244,7 @@ function readMultiPolygonGeometry(object, arcs) {
|
||||
* object to.
|
||||
* @param {string} name Name of the `Topology`'s child object.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||
* @return {Array.<ol.Feature>} Array of features.
|
||||
* @return {Array.<module:ol/Feature~Feature>} Array of features.
|
||||
*/
|
||||
function readFeaturesFromGeometryCollection(collection, arcs, scale, translate, property, name, opt_options) {
|
||||
const geometries = collection.geometries;
|
||||
@@ -268,7 +268,7 @@ function readFeaturesFromGeometryCollection(collection, arcs, scale, translate,
|
||||
* object to.
|
||||
* @param {string} name Name of the `Topology`'s child object.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||
* @return {ol.Feature} Feature.
|
||||
* @return {module:ol/Feature~Feature} Feature.
|
||||
*/
|
||||
function readFeatureFromGeometry(object, arcs, scale, translate, property, name, opt_options) {
|
||||
let geometry;
|
||||
@@ -280,7 +280,7 @@ function readFeatureFromGeometry(object, arcs, scale, translate, property, name,
|
||||
geometry = geometryReader(object, arcs);
|
||||
}
|
||||
const feature = new Feature();
|
||||
feature.setGeometry(/** @type {ol.geom.Geometry} */ (
|
||||
feature.setGeometry(/** @type {module:ol/geom/Geometry~Geometry} */ (
|
||||
transformWithOptions(geometry, false, opt_options)));
|
||||
if (object.id !== undefined) {
|
||||
feature.setId(object.id);
|
||||
@@ -304,7 +304,7 @@ function readFeatureFromGeometry(object, arcs, scale, translate, property, name,
|
||||
*
|
||||
* @function
|
||||
* @param {Document|Node|Object|string} source Source.
|
||||
* @return {Array.<ol.Feature>} Features.
|
||||
* @return {Array.<module:ol/Feature~Feature>} Features.
|
||||
* @api
|
||||
*/
|
||||
TopoJSON.prototype.readFeatures;
|
||||
@@ -326,7 +326,7 @@ TopoJSON.prototype.readFeaturesFromObject = function(object, opt_options) {
|
||||
if (transform) {
|
||||
transformArcs(arcs, scale, translate);
|
||||
}
|
||||
/** @type {Array.<ol.Feature>} */
|
||||
/** @type {Array.<module:ol/Feature~Feature>} */
|
||||
const features = [];
|
||||
const topoJSONFeatures = topoJSONTopology.objects;
|
||||
const property = this.layerName_;
|
||||
@@ -406,7 +406,7 @@ function transformVertex(vertex, scale, translate) {
|
||||
* Read the projection from a TopoJSON source.
|
||||
*
|
||||
* @param {Document|Node|Object|string} object Source.
|
||||
* @return {ol.proj.Projection} Projection.
|
||||
* @return {module:ol/proj/Projection~Projection} Projection.
|
||||
* @override
|
||||
* @api
|
||||
*/
|
||||
|
||||
@@ -188,7 +188,7 @@ WFS.prototype.setFeatureType = function(featureType) {
|
||||
* @function
|
||||
* @param {Document|Node|Object|string} source Source.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||
* @return {Array.<ol.Feature>} Features.
|
||||
* @return {Array.<module:ol/Feature~Feature>} Features.
|
||||
* @api
|
||||
*/
|
||||
WFS.prototype.readFeatures;
|
||||
@@ -425,7 +425,7 @@ const QUERY_SERIALIZERS = {
|
||||
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
* @param {Array.<*>} objectStack Node stack.
|
||||
*/
|
||||
function writeFeature(node, feature, objectStack) {
|
||||
@@ -476,7 +476,7 @@ function getTypeName(featurePrefix, featureType) {
|
||||
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
* @param {Array.<*>} objectStack Node stack.
|
||||
*/
|
||||
function writeDelete(node, feature, objectStack) {
|
||||
@@ -511,7 +511,7 @@ const TRANSACTION_SERIALIZERS = {
|
||||
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
* @param {Array.<*>} objectStack Node stack.
|
||||
*/
|
||||
function writeUpdate(node, feature, objectStack) {
|
||||
@@ -997,9 +997,9 @@ WFS.prototype.writeGetFeature = function(options) {
|
||||
/**
|
||||
* Encode format as WFS `Transaction` and return the Node.
|
||||
*
|
||||
* @param {Array.<ol.Feature>} inserts The features to insert.
|
||||
* @param {Array.<ol.Feature>} updates The features to update.
|
||||
* @param {Array.<ol.Feature>} deletes The features to delete.
|
||||
* @param {Array.<module:ol/Feature~Feature>} inserts The features to insert.
|
||||
* @param {Array.<module:ol/Feature~Feature>} updates The features to update.
|
||||
* @param {Array.<module:ol/Feature~Feature>} deletes The features to delete.
|
||||
* @param {module:ol/format/WFS~WriteTransactionOptions} options Write options.
|
||||
* @return {Node} Result.
|
||||
* @api
|
||||
@@ -1069,7 +1069,7 @@ WFS.prototype.writeTransaction = function(inserts, updates, deletes, options) {
|
||||
*
|
||||
* @function
|
||||
* @param {Document|Node|Object|string} source Source.
|
||||
* @return {?ol.proj.Projection} Projection.
|
||||
* @return {?module:ol/proj/Projection~Projection} Projection.
|
||||
* @api
|
||||
*/
|
||||
WFS.prototype.readProjection;
|
||||
|
||||
@@ -223,7 +223,7 @@ const Parser = function(lexer) {
|
||||
this.token_;
|
||||
|
||||
/**
|
||||
* @type {ol.geom.GeometryLayout}
|
||||
* @type {module:ol/geom/GeometryLayout~GeometryLayout}
|
||||
* @private
|
||||
*/
|
||||
this.layout_ = GeometryLayout.XY;
|
||||
@@ -265,7 +265,7 @@ Parser.prototype.match = function(type) {
|
||||
|
||||
/**
|
||||
* 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() {
|
||||
this.consume_();
|
||||
@@ -276,7 +276,7 @@ Parser.prototype.parse = function() {
|
||||
|
||||
/**
|
||||
* Try to parse the dimensional info.
|
||||
* @return {ol.geom.GeometryLayout} The layout.
|
||||
* @return {module:ol/geom/GeometryLayout~GeometryLayout} The layout.
|
||||
* @private
|
||||
*/
|
||||
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
|
||||
*/
|
||||
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.
|
||||
*/
|
||||
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.
|
||||
*/
|
||||
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.
|
||||
*/
|
||||
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.
|
||||
*/
|
||||
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.
|
||||
*/
|
||||
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.
|
||||
*/
|
||||
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.
|
||||
*/
|
||||
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.
|
||||
*/
|
||||
function encodeGeometryLayout(geom) {
|
||||
@@ -670,7 +670,7 @@ function encodeGeometryLayout(geom) {
|
||||
|
||||
/**
|
||||
* @const
|
||||
* @type {Object.<string, function(ol.geom.Geometry): string>}
|
||||
* @type {Object.<string, function(module:ol/geom/Geometry~Geometry): string>}
|
||||
*/
|
||||
const GeometryEncoder = {
|
||||
'Point': encodePointGeometry,
|
||||
@@ -685,7 +685,7 @@ const GeometryEncoder = {
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
function encode(geom) {
|
||||
@@ -709,7 +709,7 @@ function encode(geom) {
|
||||
/**
|
||||
* Parse a WKT string.
|
||||
* @param {string} wkt WKT string.
|
||||
* @return {ol.geom.Geometry|undefined}
|
||||
* @return {module:ol/geom/Geometry~Geometry|undefined}
|
||||
* The geometry created.
|
||||
* @private
|
||||
*/
|
||||
@@ -726,7 +726,7 @@ WKT.prototype.parse_ = function(wkt) {
|
||||
* @function
|
||||
* @param {Document|Node|Object|string} source Source.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||
* @return {ol.Feature} Feature.
|
||||
* @return {module:ol/Feature~Feature} Feature.
|
||||
* @api
|
||||
*/
|
||||
WKT.prototype.readFeature;
|
||||
@@ -752,7 +752,7 @@ WKT.prototype.readFeatureFromText = function(text, opt_options) {
|
||||
* @function
|
||||
* @param {Document|Node|Object|string} source Source.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||
* @return {Array.<ol.Feature>} Features.
|
||||
* @return {Array.<module:ol/Feature~Feature>} Features.
|
||||
* @api
|
||||
*/
|
||||
WKT.prototype.readFeatures;
|
||||
@@ -766,7 +766,7 @@ WKT.prototype.readFeaturesFromText = function(text, opt_options) {
|
||||
const geometry = this.readGeometryFromText(text, opt_options);
|
||||
if (this.splitCollection_ &&
|
||||
geometry.getType() == GeometryType.GEOMETRY_COLLECTION) {
|
||||
geometries = (/** @type {ol.geom.GeometryCollection} */ (geometry))
|
||||
geometries = (/** @type {module:ol/geom/GeometryCollection~GeometryCollection} */ (geometry))
|
||||
.getGeometriesArray();
|
||||
} else {
|
||||
geometries = [geometry];
|
||||
@@ -787,7 +787,7 @@ WKT.prototype.readFeaturesFromText = function(text, opt_options) {
|
||||
* @function
|
||||
* @param {Document|Node|Object|string} source Source.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||
* @return {ol.geom.Geometry} Geometry.
|
||||
* @return {module:ol/geom/Geometry~Geometry} Geometry.
|
||||
* @api
|
||||
*/
|
||||
WKT.prototype.readGeometry;
|
||||
@@ -799,7 +799,7 @@ WKT.prototype.readGeometry;
|
||||
WKT.prototype.readGeometryFromText = function(text, opt_options) {
|
||||
const geometry = this.parse_(text);
|
||||
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 {
|
||||
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 = {
|
||||
'POINT': Point,
|
||||
@@ -833,7 +833,7 @@ const GeometryParser = {
|
||||
|
||||
|
||||
/**
|
||||
* @return {!ol.geom.Geometry} The geometry.
|
||||
* @return {!module:ol/geom/Geometry~Geometry} The geometry.
|
||||
* @private
|
||||
*/
|
||||
Parser.prototype.parseGeometry_ = function() {
|
||||
@@ -862,7 +862,7 @@ Parser.prototype.parseGeometry_ = function() {
|
||||
* Encode a feature as a WKT string.
|
||||
*
|
||||
* @function
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
|
||||
* @return {string} WKT string.
|
||||
* @api
|
||||
@@ -886,7 +886,7 @@ WKT.prototype.writeFeatureText = function(feature, opt_options) {
|
||||
* Encode an array of features as a WKT string.
|
||||
*
|
||||
* @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.
|
||||
* @return {string} WKT string.
|
||||
* @api
|
||||
@@ -914,7 +914,7 @@ WKT.prototype.writeFeaturesText = function(features, opt_options) {
|
||||
* Write a single geometry as a WKT string.
|
||||
*
|
||||
* @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.
|
||||
* @return {string} WKT string.
|
||||
* @api
|
||||
@@ -926,7 +926,7 @@ WKT.prototype.writeGeometry;
|
||||
* @inheritDoc
|
||||
*/
|
||||
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)));
|
||||
};
|
||||
|
||||
|
||||
@@ -89,13 +89,13 @@ WMSGetFeatureInfo.prototype.setLayers = function(layers) {
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @param {Array.<*>} objectStack Object stack.
|
||||
* @return {Array.<ol.Feature>} Features.
|
||||
* @return {Array.<module:ol/Feature~Feature>} Features.
|
||||
* @private
|
||||
*/
|
||||
WMSGetFeatureInfo.prototype.readFeatures_ = function(node, objectStack) {
|
||||
node.setAttribute('namespaceURI', this.featureNS_);
|
||||
const localName = node.localName;
|
||||
/** @type {Array.<ol.Feature>} */
|
||||
/** @type {Array.<module:ol/Feature~Feature>} */
|
||||
let features = [];
|
||||
if (node.childNodes.length === 0) {
|
||||
return features;
|
||||
@@ -152,7 +152,7 @@ WMSGetFeatureInfo.prototype.readFeatures_ = function(node, objectStack) {
|
||||
* @function
|
||||
* @param {Document|Node|Object|string} source Source.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Options.
|
||||
* @return {Array.<ol.Feature>} Features.
|
||||
* @return {Array.<module:ol/Feature~Feature>} Features.
|
||||
* @api
|
||||
*/
|
||||
WMSGetFeatureInfo.prototype.readFeatures;
|
||||
|
||||
@@ -59,7 +59,7 @@ XMLFeature.prototype.readFeature = function(source, opt_options) {
|
||||
/**
|
||||
* @param {Document} doc Document.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Options.
|
||||
* @return {ol.Feature} Feature.
|
||||
* @return {module:ol/Feature~Feature} Feature.
|
||||
*/
|
||||
XMLFeature.prototype.readFeatureFromDocument = function(doc, opt_options) {
|
||||
const features = this.readFeaturesFromDocument(doc, opt_options);
|
||||
@@ -74,7 +74,7 @@ XMLFeature.prototype.readFeatureFromDocument = function(doc, opt_options) {
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Options.
|
||||
* @return {ol.Feature} Feature.
|
||||
* @return {module:ol/Feature~Feature} Feature.
|
||||
*/
|
||||
XMLFeature.prototype.readFeatureFromNode = function(node, opt_options) {
|
||||
return null; // not implemented
|
||||
@@ -103,10 +103,10 @@ XMLFeature.prototype.readFeatures = function(source, opt_options) {
|
||||
* @param {Document} doc Document.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Options.
|
||||
* @protected
|
||||
* @return {Array.<ol.Feature>} Features.
|
||||
* @return {Array.<module:ol/Feature~Feature>} Features.
|
||||
*/
|
||||
XMLFeature.prototype.readFeaturesFromDocument = function(doc, opt_options) {
|
||||
/** @type {Array.<ol.Feature>} */
|
||||
/** @type {Array.<module:ol/Feature~Feature>} */
|
||||
const features = [];
|
||||
for (let n = doc.firstChild; n; n = n.nextSibling) {
|
||||
if (n.nodeType == Node.ELEMENT_NODE) {
|
||||
@@ -122,7 +122,7 @@ XMLFeature.prototype.readFeaturesFromDocument = function(doc, opt_options) {
|
||||
* @param {Node} node Node.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Options.
|
||||
* @protected
|
||||
* @return {Array.<ol.Feature>} Features.
|
||||
* @return {Array.<module:ol/Feature~Feature>} Features.
|
||||
*/
|
||||
XMLFeature.prototype.readFeaturesFromNode = function(node, opt_options) {};
|
||||
|
||||
@@ -149,7 +149,7 @@ XMLFeature.prototype.readGeometry = function(source, opt_options) {
|
||||
* @param {Document} doc Document.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Options.
|
||||
* @protected
|
||||
* @return {ol.geom.Geometry} Geometry.
|
||||
* @return {module:ol/geom/Geometry~Geometry} Geometry.
|
||||
*/
|
||||
XMLFeature.prototype.readGeometryFromDocument = function(doc, opt_options) {
|
||||
return null; // not implemented
|
||||
@@ -160,7 +160,7 @@ XMLFeature.prototype.readGeometryFromDocument = function(doc, opt_options) {
|
||||
* @param {Node} node Node.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Options.
|
||||
* @protected
|
||||
* @return {ol.geom.Geometry} Geometry.
|
||||
* @return {module:ol/geom/Geometry~Geometry} Geometry.
|
||||
*/
|
||||
XMLFeature.prototype.readGeometryFromNode = function(node, opt_options) {
|
||||
return null; // not implemented
|
||||
@@ -187,7 +187,7 @@ XMLFeature.prototype.readProjection = function(source) {
|
||||
/**
|
||||
* @param {Document} doc Document.
|
||||
* @protected
|
||||
* @return {ol.proj.Projection} Projection.
|
||||
* @return {module:ol/proj/Projection~Projection} Projection.
|
||||
*/
|
||||
XMLFeature.prototype.readProjectionFromDocument = function(doc) {
|
||||
return this.defaultDataProjection;
|
||||
@@ -197,7 +197,7 @@ XMLFeature.prototype.readProjectionFromDocument = function(doc) {
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @protected
|
||||
* @return {ol.proj.Projection} Projection.
|
||||
* @return {module:ol/proj/Projection~Projection} Projection.
|
||||
*/
|
||||
XMLFeature.prototype.readProjectionFromNode = function(node) {
|
||||
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.
|
||||
* @protected
|
||||
* @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.
|
||||
* @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.
|
||||
* @return {Node} Node.
|
||||
*/
|
||||
|
||||
@@ -78,7 +78,7 @@ export function bbox(geometryName, extent, opt_srsName) {
|
||||
* contains a given geometry.
|
||||
*
|
||||
* @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
|
||||
* set on geometries when this is not provided.
|
||||
* @returns {!ol.format.filter.Contains} `<Contains>` operator.
|
||||
@@ -93,7 +93,7 @@ export function contains(geometryName, geometry, opt_srsName) {
|
||||
* intersects a given geometry.
|
||||
*
|
||||
* @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
|
||||
* set on geometries when this is not provided.
|
||||
* @returns {!ol.format.filter.Intersects} `<Intersects>` operator.
|
||||
@@ -108,7 +108,7 @@ export function intersects(geometryName, geometry, opt_srsName) {
|
||||
* is within a given geometry.
|
||||
*
|
||||
* @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
|
||||
* set on geometries when this is not provided.
|
||||
* @returns {!ol.format.filter.Within} `<Within>` operator.
|
||||
|
||||
@@ -11,7 +11,7 @@ import Spatial from '../filter/Spatial.js';
|
||||
*
|
||||
* @constructor
|
||||
* @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
|
||||
* set on geometries when this is not provided.
|
||||
* @extends {ol.format.filter.Spatial}
|
||||
|
||||
@@ -11,7 +11,7 @@ import Spatial from '../filter/Spatial.js';
|
||||
*
|
||||
* @constructor
|
||||
* @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
|
||||
* set on geometries when this is not provided.
|
||||
* @extends {ol.format.filter.Spatial}
|
||||
|
||||
@@ -14,7 +14,7 @@ import Filter from '../filter/Filter.js';
|
||||
* @abstract
|
||||
* @param {!string} tagName The XML tag name for this filter.
|
||||
* @param {!string} geometryName Geometry name to use.
|
||||
* @param {!ol.geom.Geometry} geometry Geometry.
|
||||
* @param {!module:ol/geom/Geometry~Geometry} geometry Geometry.
|
||||
* @param {string=} opt_srsName SRS name. No srsName attribute will be
|
||||
* set on geometries when this is not provided.
|
||||
* @extends {ol.format.filter.Filter}
|
||||
@@ -31,7 +31,7 @@ const Spatial = function(tagName, geometryName, geometry, opt_srsName) {
|
||||
|
||||
/**
|
||||
* @public
|
||||
* @type {ol.geom.Geometry}
|
||||
* @type {module:ol/geom/Geometry~Geometry}
|
||||
*/
|
||||
this.geometry = geometry;
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ import Spatial from '../filter/Spatial.js';
|
||||
*
|
||||
* @constructor
|
||||
* @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
|
||||
* set on geometries when this is not provided.
|
||||
* @extends {ol.format.filter.Spatial}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
* `readFeatures` returning an `Array.<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.
|
||||
|
||||
|
||||
@@ -13,10 +13,10 @@ import {deflateCoordinate} from '../geom/flat/deflate.js';
|
||||
* Circle geometry.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {ol.geom.SimpleGeometry}
|
||||
* @extends {module:ol/geom/SimpleGeometry~SimpleGeometry}
|
||||
* @param {module:ol/coordinate~Coordinate} center Center.
|
||||
* @param {number=} opt_radius Radius.
|
||||
* @param {ol.geom.GeometryLayout=} opt_layout Layout.
|
||||
* @param {module:ol/geom/GeometryLayout~GeometryLayout=} opt_layout Layout.
|
||||
* @api
|
||||
*/
|
||||
const Circle = function(center, opt_radius, opt_layout) {
|
||||
@@ -30,7 +30,7 @@ inherits(Circle, SimpleGeometry);
|
||||
|
||||
/**
|
||||
* Make a complete copy of the geometry.
|
||||
* @return {!ol.geom.Circle} Clone.
|
||||
* @return {!module:ol/geom/Circle~Circle} Clone.
|
||||
* @override
|
||||
* @api
|
||||
*/
|
||||
@@ -179,7 +179,7 @@ Circle.prototype.setCenter = function(center) {
|
||||
* number) of the circle.
|
||||
* @param {module:ol/coordinate~Coordinate} center Center.
|
||||
* @param {number} radius Radius.
|
||||
* @param {ol.geom.GeometryLayout=} opt_layout Layout.
|
||||
* @param {module:ol/geom/GeometryLayout~GeometryLayout=} opt_layout Layout.
|
||||
* @api
|
||||
*/
|
||||
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.
|
||||
*/
|
||||
Circle.prototype.setFlatCoordinates = function(layout, flatCoordinates) {
|
||||
@@ -251,10 +251,10 @@ Circle.prototype.setRadius = function(radius) {
|
||||
* of the original circle.
|
||||
*
|
||||
* @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
|
||||
* string identifier or a {@link ol.proj.Projection} object.
|
||||
* @return {ol.geom.Circle} This geometry. Note that original geometry is
|
||||
* string identifier or a {@link module:ol/proj/Projection~Projection} object.
|
||||
* @return {module:ol/geom/Circle~Circle} This geometry. Note that original geometry is
|
||||
* modified in place.
|
||||
* @function
|
||||
* @api
|
||||
|
||||
@@ -42,7 +42,7 @@ const Geometry = function() {
|
||||
|
||||
/**
|
||||
* @protected
|
||||
* @type {Object.<string, ol.geom.Geometry>}
|
||||
* @type {Object.<string, module:ol/geom/Geometry~Geometry>}
|
||||
*/
|
||||
this.simplifiedGeometryCache = {};
|
||||
|
||||
@@ -72,7 +72,7 @@ inherits(Geometry, BaseObject);
|
||||
/**
|
||||
* Make a complete copy of the geometry.
|
||||
* @abstract
|
||||
* @return {!ol.geom.Geometry} Clone.
|
||||
* @return {!module:ol/geom/Geometry~Geometry} Clone.
|
||||
*/
|
||||
Geometry.prototype.clone = function() {};
|
||||
|
||||
@@ -180,7 +180,7 @@ Geometry.prototype.scale = function(sx, opt_sy, opt_anchor) {};
|
||||
* simplification is used to preserve topology.
|
||||
* @function
|
||||
* @param {number} tolerance The tolerance distance for simplification.
|
||||
* @return {ol.geom.Geometry} A new, simplified version of the original
|
||||
* @return {module:ol/geom/Geometry~Geometry} A new, simplified version of the original
|
||||
* geometry.
|
||||
* @api
|
||||
*/
|
||||
@@ -195,7 +195,7 @@ Geometry.prototype.simplify = function(tolerance) {
|
||||
* @see https://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm
|
||||
* @abstract
|
||||
* @param {number} squaredTolerance Squared tolerance.
|
||||
* @return {ol.geom.Geometry} Simplified geometry.
|
||||
* @return {module:ol/geom/Geometry~Geometry} Simplified geometry.
|
||||
*/
|
||||
Geometry.prototype.getSimplifiedGeometry = function(squaredTolerance) {};
|
||||
|
||||
@@ -203,7 +203,7 @@ Geometry.prototype.getSimplifiedGeometry = function(squaredTolerance) {};
|
||||
/**
|
||||
* Get the type of this geometry.
|
||||
* @abstract
|
||||
* @return {ol.geom.GeometryType} Geometry type.
|
||||
* @return {module:ol/geom/GeometryType~GeometryType} Geometry type.
|
||||
*/
|
||||
Geometry.prototype.getType = function() {};
|
||||
|
||||
@@ -246,10 +246,10 @@ Geometry.prototype.translate = function(deltaX, deltaY) {};
|
||||
* then use this function on the clone.
|
||||
*
|
||||
* @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
|
||||
* string identifier or a {@link ol.proj.Projection} object.
|
||||
* @return {ol.geom.Geometry} This geometry. Note that original geometry is
|
||||
* string identifier or a {@link module:ol/proj/Projection~Projection} object.
|
||||
* @return {module:ol/geom/Geometry~Geometry} This geometry. Note that original geometry is
|
||||
* modified in place.
|
||||
* @api
|
||||
*/
|
||||
|
||||
@@ -11,11 +11,11 @@ import {clear} from '../obj.js';
|
||||
|
||||
/**
|
||||
* @classdesc
|
||||
* An array of {@link ol.geom.Geometry} objects.
|
||||
* An array of {@link module:ol/geom/Geometry~Geometry} objects.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {ol.geom.Geometry}
|
||||
* @param {Array.<ol.geom.Geometry>=} opt_geometries Geometries.
|
||||
* @extends {module:ol/geom/Geometry~Geometry}
|
||||
* @param {Array.<module:ol/geom/Geometry~Geometry>=} opt_geometries Geometries.
|
||||
* @api
|
||||
*/
|
||||
const GeometryCollection = function(opt_geometries) {
|
||||
@@ -24,7 +24,7 @@ const GeometryCollection = function(opt_geometries) {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {Array.<ol.geom.Geometry>}
|
||||
* @type {Array.<module:ol/geom/Geometry~Geometry>}
|
||||
*/
|
||||
this.geometries_ = opt_geometries ? opt_geometries : null;
|
||||
|
||||
@@ -35,8 +35,8 @@ inherits(GeometryCollection, Geometry);
|
||||
|
||||
|
||||
/**
|
||||
* @param {Array.<ol.geom.Geometry>} geometries Geometries.
|
||||
* @return {Array.<ol.geom.Geometry>} Cloned geometries.
|
||||
* @param {Array.<module:ol/geom/Geometry~Geometry>} geometries Geometries.
|
||||
* @return {Array.<module:ol/geom/Geometry~Geometry>} Cloned geometries.
|
||||
*/
|
||||
function cloneGeometries(geometries) {
|
||||
const clonedGeometries = [];
|
||||
@@ -79,7 +79,7 @@ GeometryCollection.prototype.listenGeometriesChange_ = function() {
|
||||
|
||||
/**
|
||||
* Make a complete copy of the geometry.
|
||||
* @return {!ol.geom.GeometryCollection} Clone.
|
||||
* @return {!module:ol/geom/GeometryCollection~GeometryCollection} Clone.
|
||||
* @override
|
||||
* @api
|
||||
*/
|
||||
@@ -135,7 +135,7 @@ GeometryCollection.prototype.computeExtent = function(extent) {
|
||||
|
||||
/**
|
||||
* Return the geometries that make up this geometry collection.
|
||||
* @return {Array.<ol.geom.Geometry>} Geometries.
|
||||
* @return {Array.<module:ol/geom/Geometry~Geometry>} Geometries.
|
||||
* @api
|
||||
*/
|
||||
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() {
|
||||
return this.geometries_;
|
||||
@@ -257,7 +257,7 @@ GeometryCollection.prototype.scale = function(sx, opt_sy, opt_anchor) {
|
||||
|
||||
/**
|
||||
* Set the geometries that make up this geometry collection.
|
||||
* @param {Array.<ol.geom.Geometry>} geometries Geometries.
|
||||
* @param {Array.<module:ol/geom/Geometry~Geometry>} geometries Geometries.
|
||||
* @api
|
||||
*/
|
||||
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) {
|
||||
this.unlistenGeometriesChange_();
|
||||
|
||||
@@ -21,9 +21,9 @@ import {douglasPeucker} from '../geom/flat/simplify.js';
|
||||
* Linestring geometry.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {ol.geom.SimpleGeometry}
|
||||
* @extends {module:ol/geom/SimpleGeometry~SimpleGeometry}
|
||||
* @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
|
||||
*/
|
||||
const LineString = function(coordinates, opt_layout) {
|
||||
@@ -78,7 +78,7 @@ LineString.prototype.appendCoordinate = function(coordinate) {
|
||||
|
||||
/**
|
||||
* Make a complete copy of the geometry.
|
||||
* @return {!ol.geom.LineString} Clone.
|
||||
* @return {!module:ol/geom/LineString~LineString} Clone.
|
||||
* @override
|
||||
* @api
|
||||
*/
|
||||
@@ -238,7 +238,7 @@ LineString.prototype.intersectsExtent = function(extent) {
|
||||
/**
|
||||
* Set the coordinates of the linestring.
|
||||
* @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
|
||||
* @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.
|
||||
*/
|
||||
LineString.prototype.setFlatCoordinates = function(layout, flatCoordinates) {
|
||||
|
||||
@@ -18,9 +18,9 @@ import {douglasPeucker} from '../geom/flat/simplify.js';
|
||||
* on its own.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {ol.geom.SimpleGeometry}
|
||||
* @extends {module:ol/geom/SimpleGeometry~SimpleGeometry}
|
||||
* @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
|
||||
*/
|
||||
const LinearRing = function(coordinates, opt_layout) {
|
||||
@@ -48,7 +48,7 @@ inherits(LinearRing, SimpleGeometry);
|
||||
|
||||
/**
|
||||
* Make a complete copy of the geometry.
|
||||
* @return {!ol.geom.LinearRing} Clone.
|
||||
* @return {!module:ol/geom/LinearRing~LinearRing} Clone.
|
||||
* @override
|
||||
* @api
|
||||
*/
|
||||
@@ -132,7 +132,7 @@ LinearRing.prototype.intersectsExtent = function(extent) {};
|
||||
/**
|
||||
* Set the coordinates of the linear ring.
|
||||
* @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
|
||||
* @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.
|
||||
*/
|
||||
LinearRing.prototype.setFlatCoordinates = function(layout, flatCoordinates) {
|
||||
|
||||
@@ -20,9 +20,9 @@ import {douglasPeuckerArray} from '../geom/flat/simplify.js';
|
||||
* Multi-linestring geometry.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {ol.geom.SimpleGeometry}
|
||||
* @extends {module:ol/geom/SimpleGeometry~SimpleGeometry}
|
||||
* @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
|
||||
*/
|
||||
const MultiLineString = function(coordinates, opt_layout) {
|
||||
@@ -56,7 +56,7 @@ inherits(MultiLineString, SimpleGeometry);
|
||||
|
||||
/**
|
||||
* Append the passed linestring to the multilinestring.
|
||||
* @param {ol.geom.LineString} lineString LineString.
|
||||
* @param {module:ol/geom/LineString~LineString} lineString LineString.
|
||||
* @api
|
||||
*/
|
||||
MultiLineString.prototype.appendLineString = function(lineString) {
|
||||
@@ -72,7 +72,7 @@ MultiLineString.prototype.appendLineString = function(lineString) {
|
||||
|
||||
/**
|
||||
* Make a complete copy of the geometry.
|
||||
* @return {!ol.geom.MultiLineString} Clone.
|
||||
* @return {!module:ol/geom/MultiLineString~MultiLineString} Clone.
|
||||
* @override
|
||||
* @api
|
||||
*/
|
||||
@@ -160,7 +160,7 @@ MultiLineString.prototype.getEnds = function() {
|
||||
/**
|
||||
* Return the linestring at the specified index.
|
||||
* @param {number} index Index.
|
||||
* @return {ol.geom.LineString} LineString.
|
||||
* @return {module:ol/geom/LineString~LineString} LineString.
|
||||
* @api
|
||||
*/
|
||||
MultiLineString.prototype.getLineString = function(index) {
|
||||
@@ -176,14 +176,14 @@ MultiLineString.prototype.getLineString = function(index) {
|
||||
|
||||
/**
|
||||
* Return the linestrings of this multilinestring.
|
||||
* @return {Array.<ol.geom.LineString>} LineStrings.
|
||||
* @return {Array.<module:ol/geom/LineString~LineString>} LineStrings.
|
||||
* @api
|
||||
*/
|
||||
MultiLineString.prototype.getLineStrings = function() {
|
||||
const flatCoordinates = this.flatCoordinates;
|
||||
const ends = this.ends_;
|
||||
const layout = this.layout;
|
||||
/** @type {Array.<ol.geom.LineString>} */
|
||||
/** @type {Array.<module:ol/geom/LineString~LineString>} */
|
||||
const lineStrings = [];
|
||||
let offset = 0;
|
||||
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.
|
||||
* @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
|
||||
* @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>} 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) {
|
||||
let layout = this.getLayout();
|
||||
|
||||
@@ -17,9 +17,9 @@ import {squaredDistance as squaredDx} from '../math.js';
|
||||
* Multi-point geometry.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {ol.geom.SimpleGeometry}
|
||||
* @extends {module:ol/geom/SimpleGeometry~SimpleGeometry}
|
||||
* @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
|
||||
*/
|
||||
const MultiPoint = function(coordinates, opt_layout) {
|
||||
@@ -32,7 +32,7 @@ inherits(MultiPoint, SimpleGeometry);
|
||||
|
||||
/**
|
||||
* Append the passed point to this multipoint.
|
||||
* @param {ol.geom.Point} point Point.
|
||||
* @param {module:ol/geom/Point~Point} point Point.
|
||||
* @api
|
||||
*/
|
||||
MultiPoint.prototype.appendPoint = function(point) {
|
||||
@@ -47,7 +47,7 @@ MultiPoint.prototype.appendPoint = function(point) {
|
||||
|
||||
/**
|
||||
* Make a complete copy of the geometry.
|
||||
* @return {!ol.geom.MultiPoint} Clone.
|
||||
* @return {!module:ol/geom/MultiPoint~MultiPoint} Clone.
|
||||
* @override
|
||||
* @api
|
||||
*/
|
||||
@@ -97,7 +97,7 @@ MultiPoint.prototype.getCoordinates = function() {
|
||||
/**
|
||||
* Return the point at the specified index.
|
||||
* @param {number} index Index.
|
||||
* @return {ol.geom.Point} Point.
|
||||
* @return {module:ol/geom/Point~Point} Point.
|
||||
* @api
|
||||
*/
|
||||
MultiPoint.prototype.getPoint = function(index) {
|
||||
@@ -114,14 +114,14 @@ MultiPoint.prototype.getPoint = function(index) {
|
||||
|
||||
/**
|
||||
* Return the points of this multipoint.
|
||||
* @return {Array.<ol.geom.Point>} Points.
|
||||
* @return {Array.<module:ol/geom/Point~Point>} Points.
|
||||
* @api
|
||||
*/
|
||||
MultiPoint.prototype.getPoints = function() {
|
||||
const flatCoordinates = this.flatCoordinates;
|
||||
const layout = this.layout;
|
||||
const stride = this.stride;
|
||||
/** @type {Array.<ol.geom.Point>} */
|
||||
/** @type {Array.<module:ol/geom/Point~Point>} */
|
||||
const points = [];
|
||||
for (let i = 0, ii = flatCoordinates.length; i < ii; i += stride) {
|
||||
const point = new Point(null);
|
||||
@@ -162,7 +162,7 @@ MultiPoint.prototype.intersectsExtent = function(extent) {
|
||||
/**
|
||||
* Set the coordinates of the multipoint.
|
||||
* @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
|
||||
* @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.
|
||||
*/
|
||||
MultiPoint.prototype.setFlatCoordinates = function(layout, flatCoordinates) {
|
||||
|
||||
@@ -25,9 +25,9 @@ import {quantizeMultiArray} from '../geom/flat/simplify.js';
|
||||
* Multi-polygon geometry.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {ol.geom.SimpleGeometry}
|
||||
* @extends {module:ol/geom/SimpleGeometry~SimpleGeometry}
|
||||
* @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
|
||||
*/
|
||||
const MultiPolygon = function(coordinates, opt_layout) {
|
||||
@@ -85,7 +85,7 @@ inherits(MultiPolygon, SimpleGeometry);
|
||||
|
||||
/**
|
||||
* Append the passed polygon to this multipolygon.
|
||||
* @param {ol.geom.Polygon} polygon Polygon.
|
||||
* @param {module:ol/geom/Polygon~Polygon} polygon Polygon.
|
||||
* @api
|
||||
*/
|
||||
MultiPolygon.prototype.appendPolygon = function(polygon) {
|
||||
@@ -110,7 +110,7 @@ MultiPolygon.prototype.appendPolygon = function(polygon) {
|
||||
|
||||
/**
|
||||
* Make a complete copy of the geometry.
|
||||
* @return {!ol.geom.MultiPolygon} Clone.
|
||||
* @return {!module:ol/geom/MultiPolygon~MultiPolygon} Clone.
|
||||
* @override
|
||||
* @api
|
||||
*/
|
||||
@@ -219,8 +219,8 @@ MultiPolygon.prototype.getFlatInteriorPoints = function() {
|
||||
|
||||
|
||||
/**
|
||||
* Return the interior points as {@link ol.geom.MultiPoint multipoint}.
|
||||
* @return {ol.geom.MultiPoint} Interior points as XYM coordinates, where M is
|
||||
* Return the interior points as {@link module:ol/geom/MultiPoint~MultiPoint multipoint}.
|
||||
* @return {module:ol/geom/MultiPoint~MultiPoint} Interior points as XYM coordinates, where M is
|
||||
* the length of the horizontal intersection that the point belongs to.
|
||||
* @api
|
||||
*/
|
||||
@@ -273,7 +273,7 @@ MultiPolygon.prototype.getSimplifiedGeometryInternal = function(squaredTolerance
|
||||
/**
|
||||
* Return the polygon at the specified index.
|
||||
* @param {number} index Index.
|
||||
* @return {ol.geom.Polygon} Polygon.
|
||||
* @return {module:ol/geom/Polygon~Polygon} Polygon.
|
||||
* @api
|
||||
*/
|
||||
MultiPolygon.prototype.getPolygon = function(index) {
|
||||
@@ -303,7 +303,7 @@ MultiPolygon.prototype.getPolygon = function(index) {
|
||||
|
||||
/**
|
||||
* Return the polygons of this multipolygon.
|
||||
* @return {Array.<ol.geom.Polygon>} Polygons.
|
||||
* @return {Array.<module:ol/geom/Polygon~Polygon>} Polygons.
|
||||
* @api
|
||||
*/
|
||||
MultiPolygon.prototype.getPolygons = function() {
|
||||
@@ -352,7 +352,7 @@ MultiPolygon.prototype.intersectsExtent = function(extent) {
|
||||
/**
|
||||
* Set the coordinates of the multipolygon.
|
||||
* @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
|
||||
* @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.<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) {
|
||||
let layout = this.getLayout();
|
||||
|
||||
@@ -14,9 +14,9 @@ import {squaredDistance as squaredDx} from '../math.js';
|
||||
* Point geometry.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {ol.geom.SimpleGeometry}
|
||||
* @extends {module:ol/geom/SimpleGeometry~SimpleGeometry}
|
||||
* @param {module:ol/coordinate~Coordinate} coordinates Coordinates.
|
||||
* @param {ol.geom.GeometryLayout=} opt_layout Layout.
|
||||
* @param {module:ol/geom/GeometryLayout~GeometryLayout=} opt_layout Layout.
|
||||
* @api
|
||||
*/
|
||||
const Point = function(coordinates, opt_layout) {
|
||||
@@ -29,7 +29,7 @@ inherits(Point, SimpleGeometry);
|
||||
|
||||
/**
|
||||
* Make a complete copy of the geometry.
|
||||
* @return {!ol.geom.Point} Clone.
|
||||
* @return {!module:ol/geom/Point~Point} Clone.
|
||||
* @override
|
||||
* @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.
|
||||
*/
|
||||
Point.prototype.setFlatCoordinates = function(layout, flatCoordinates) {
|
||||
|
||||
@@ -26,14 +26,14 @@ import {modulo} from '../math.js';
|
||||
* Polygon geometry.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {ol.geom.SimpleGeometry}
|
||||
* @extends {module:ol/geom/SimpleGeometry~SimpleGeometry}
|
||||
* @param {Array.<Array.<module:ol/coordinate~Coordinate>>} coordinates Array of linear
|
||||
* rings that define the polygon. The first linear ring of the array
|
||||
* defines the outer-boundary or surface of the polygon. Each subsequent
|
||||
* 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
|
||||
* last are equivalent.
|
||||
* @param {ol.geom.GeometryLayout=} opt_layout Layout.
|
||||
* @param {module:ol/geom/GeometryLayout~GeometryLayout=} opt_layout Layout.
|
||||
* @api
|
||||
*/
|
||||
const Polygon = function(coordinates, opt_layout) {
|
||||
@@ -91,7 +91,7 @@ inherits(Polygon, SimpleGeometry);
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
Polygon.prototype.appendLinearRing = function(linearRing) {
|
||||
@@ -107,7 +107,7 @@ Polygon.prototype.appendLinearRing = function(linearRing) {
|
||||
|
||||
/**
|
||||
* Make a complete copy of the geometry.
|
||||
* @return {!ol.geom.Polygon} Clone.
|
||||
* @return {!module:ol/geom/Polygon~Polygon} Clone.
|
||||
* @override
|
||||
* @api
|
||||
*/
|
||||
@@ -209,7 +209,7 @@ Polygon.prototype.getFlatInteriorPoint = function() {
|
||||
|
||||
/**
|
||||
* 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.
|
||||
* @api
|
||||
*/
|
||||
@@ -237,7 +237,7 @@ Polygon.prototype.getLinearRingCount = function() {
|
||||
* at index `1` and beyond.
|
||||
*
|
||||
* @param {number} index Index.
|
||||
* @return {ol.geom.LinearRing} Linear ring.
|
||||
* @return {module:ol/geom/LinearRing~LinearRing} Linear ring.
|
||||
* @api
|
||||
*/
|
||||
Polygon.prototype.getLinearRing = function(index) {
|
||||
@@ -253,7 +253,7 @@ Polygon.prototype.getLinearRing = function(index) {
|
||||
|
||||
/**
|
||||
* Return the linear rings of the polygon.
|
||||
* @return {Array.<ol.geom.LinearRing>} Linear rings.
|
||||
* @return {Array.<module:ol/geom/LinearRing~LinearRing>} Linear rings.
|
||||
* @api
|
||||
*/
|
||||
Polygon.prototype.getLinearRings = function() {
|
||||
@@ -333,7 +333,7 @@ Polygon.prototype.intersectsExtent = function(extent) {
|
||||
/**
|
||||
* Set the coordinates of the polygon.
|
||||
* @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
|
||||
* @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>} ends Ends.
|
||||
*/
|
||||
@@ -376,7 +376,7 @@ export default Polygon;
|
||||
* polygon. Default is `32`.
|
||||
* @param {number=} opt_sphereRadius Optional radius for the sphere (defaults to
|
||||
* the Earth's mean radius using the WGS84 ellipsoid).
|
||||
* @return {ol.geom.Polygon} The "circular" polygon.
|
||||
* @return {module:ol/geom/Polygon~Polygon} The "circular" polygon.
|
||||
* @api
|
||||
*/
|
||||
export function circular(center, radius, opt_n, opt_sphereRadius) {
|
||||
@@ -396,7 +396,7 @@ export function circular(center, radius, opt_n, opt_sphereRadius) {
|
||||
/**
|
||||
* Create a polygon from an extent. The layout used is `XY`.
|
||||
* @param {module:ol/extent~Extent} extent The extent.
|
||||
* @return {ol.geom.Polygon} The polygon.
|
||||
* @return {module:ol/geom/Polygon~Polygon} The polygon.
|
||||
* @api
|
||||
*/
|
||||
export function fromExtent(extent) {
|
||||
@@ -415,11 +415,11 @@ export function fromExtent(extent) {
|
||||
|
||||
/**
|
||||
* 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_angle Start angle for the first vertex of the polygon in
|
||||
* radians. Default is 0.
|
||||
* @return {ol.geom.Polygon} Polygon geometry.
|
||||
* @return {module:ol/geom/Polygon~Polygon} Polygon geometry.
|
||||
* @api
|
||||
*/
|
||||
export function fromCircle(circle, opt_sides, opt_angle) {
|
||||
@@ -441,7 +441,7 @@ export function fromCircle(circle, opt_sides, opt_angle) {
|
||||
|
||||
/**
|
||||
* Modify the coordinates of a polygon to make it a regular polygon.
|
||||
* @param {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 {number} radius Radius of the regular polygon.
|
||||
* @param {number=} opt_angle Start angle for the first vertex of the polygon in
|
||||
|
||||
@@ -16,7 +16,7 @@ import {clear} from '../obj.js';
|
||||
*
|
||||
* @constructor
|
||||
* @abstract
|
||||
* @extends {ol.geom.Geometry}
|
||||
* @extends {module:ol/geom/Geometry~Geometry}
|
||||
* @api
|
||||
*/
|
||||
const SimpleGeometry = function() {
|
||||
@@ -25,7 +25,7 @@ const SimpleGeometry = function() {
|
||||
|
||||
/**
|
||||
* @protected
|
||||
* @type {ol.geom.GeometryLayout}
|
||||
* @type {module:ol/geom/GeometryLayout~GeometryLayout}
|
||||
*/
|
||||
this.layout = GeometryLayout.XY;
|
||||
|
||||
@@ -48,7 +48,7 @@ inherits(SimpleGeometry, Geometry);
|
||||
|
||||
/**
|
||||
* @param {number} stride Stride.
|
||||
* @return {ol.geom.GeometryLayout} layout Layout.
|
||||
* @return {module:ol/geom/GeometryLayout~GeometryLayout} layout Layout.
|
||||
*/
|
||||
function getLayoutForStride(stride) {
|
||||
let layout;
|
||||
@@ -59,12 +59,12 @@ function getLayoutForStride(stride) {
|
||||
} else if (stride == 4) {
|
||||
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.
|
||||
*/
|
||||
export function getStrideForLayout(layout) {
|
||||
@@ -131,8 +131,8 @@ SimpleGeometry.prototype.getLastCoordinate = function() {
|
||||
|
||||
|
||||
/**
|
||||
* Return the {@link ol.geom.GeometryLayout layout} of the geometry.
|
||||
* @return {ol.geom.GeometryLayout} Layout.
|
||||
* Return the {@link module:ol/geom/GeometryLayout~GeometryLayout layout} of the geometry.
|
||||
* @return {module:ol/geom/GeometryLayout~GeometryLayout} Layout.
|
||||
* @api
|
||||
*/
|
||||
SimpleGeometry.prototype.getLayout = function() {
|
||||
@@ -182,7 +182,7 @@ SimpleGeometry.prototype.getSimplifiedGeometry = function(squaredTolerance) {
|
||||
|
||||
/**
|
||||
* @param {number} squaredTolerance Squared tolerance.
|
||||
* @return {ol.geom.SimpleGeometry} Simplified geometry.
|
||||
* @return {module:ol/geom/SimpleGeometry~SimpleGeometry} Simplified geometry.
|
||||
* @protected
|
||||
*/
|
||||
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.
|
||||
* @protected
|
||||
*/
|
||||
@@ -213,13 +213,13 @@ SimpleGeometry.prototype.setFlatCoordinatesInternal = function(layout, flatCoord
|
||||
/**
|
||||
* @abstract
|
||||
* @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) {};
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.geom.GeometryLayout|undefined} layout Layout.
|
||||
* @param {module:ol/geom/GeometryLayout~GeometryLayout|undefined} layout Layout.
|
||||
* @param {Array} coordinates Coordinates.
|
||||
* @param {number} nesting Nesting.
|
||||
* @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 {Array.<number>=} opt_dest Destination.
|
||||
* @return {Array.<number>} Transformed flat coordinates.
|
||||
|
||||
@@ -84,7 +84,7 @@ function line(interpolate, transform, squaredTolerance) {
|
||||
* @param {number} lat1 Latitude 1 in degrees.
|
||||
* @param {number} lon2 Longitude 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.
|
||||
* @return {Array.<number>} Flat coordinates.
|
||||
*/
|
||||
@@ -128,7 +128,7 @@ export function greatCircleArc(lon1, lat1, lon2, lat2, projection, squaredTolera
|
||||
* @param {number} lon Longitude.
|
||||
* @param {number} lat1 Latitude 1.
|
||||
* @param {number} lat2 Latitude 2.
|
||||
* @param {ol.proj.Projection} projection Projection.
|
||||
* @param {module:ol/proj/Projection~Projection} projection Projection.
|
||||
* @param {number} squaredTolerance Squared tolerance.
|
||||
* @return {Array.<number>} Flat coordinates.
|
||||
*/
|
||||
@@ -151,7 +151,7 @@ export function meridian(lon, lat1, lat2, projection, squaredTolerance) {
|
||||
* @param {number} lat Latitude.
|
||||
* @param {number} lon1 Longitude 1.
|
||||
* @param {number} lon2 Longitude 2.
|
||||
* @param {ol.proj.Projection} projection Projection.
|
||||
* @param {module:ol/proj/Projection~Projection} projection Projection.
|
||||
* @param {number} squaredTolerance Squared tolerance.
|
||||
* @return {Array.<number>} Flat coordinates.
|
||||
*/
|
||||
|
||||
@@ -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.
|
||||
* @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
|
||||
* @param {module:ol/MapBrowserEvent~MapBrowserEvent} mapBrowserEvent Map browser event.
|
||||
* @return {boolean} `false` to stop event propagation.
|
||||
* @this {ol.interaction.DoubleClickZoom}
|
||||
*/
|
||||
|
||||
@@ -35,8 +35,8 @@ const DragAndDropEventType = {
|
||||
* @implements {oli.interaction.DragAndDropEvent}
|
||||
* @param {ol.interaction.DragAndDropEventType} type Type.
|
||||
* @param {File} file File.
|
||||
* @param {Array.<ol.Feature>=} opt_features Features.
|
||||
* @param {ol.proj.Projection=} opt_projection Projection.
|
||||
* @param {Array.<module:ol/Feature~Feature>=} opt_features Features.
|
||||
* @param {module:ol/proj/Projection~Projection=} opt_projection 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.
|
||||
* @type {Array.<ol.Feature>|undefined}
|
||||
* @type {Array.<module:ol/Feature~Feature>|undefined}
|
||||
* @api
|
||||
*/
|
||||
this.features = opt_features;
|
||||
@@ -58,7 +58,7 @@ const DragAndDropEvent = function(type, file, opt_features, opt_projection) {
|
||||
|
||||
/**
|
||||
* The feature projection.
|
||||
* @type {ol.proj.Projection|undefined}
|
||||
* @type {module:ol/proj/Projection~Projection|undefined}
|
||||
* @api
|
||||
*/
|
||||
this.projection = opt_projection;
|
||||
@@ -94,7 +94,7 @@ const DragAndDrop = function(opt_options) {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {ol.proj.Projection}
|
||||
* @type {module:ol/proj/Projection~Projection}
|
||||
*/
|
||||
this.projection_ = options.projection ?
|
||||
getProjection(options.projection) : null;
|
||||
@@ -238,7 +238,7 @@ DragAndDrop.prototype.setMap = function(map) {
|
||||
* @param {string} text Text.
|
||||
* @param {module:ol/format/Feature~ReadOptions} options Read options.
|
||||
* @private
|
||||
* @return {Array.<ol.Feature>} Features.
|
||||
* @return {Array.<module:ol/Feature~Feature>} Features.
|
||||
*/
|
||||
DragAndDrop.prototype.tryReadFeatures_ = function(format, text, options) {
|
||||
try {
|
||||
|
||||
@@ -44,7 +44,7 @@ const DragBoxEventType = {
|
||||
*
|
||||
* @param {string} type The event type.
|
||||
* @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}
|
||||
* @constructor
|
||||
* @implements {oli.DragBoxEvent}
|
||||
@@ -62,7 +62,7 @@ const DragBoxEvent = function(type, coordinate, mapBrowserEvent) {
|
||||
|
||||
/**
|
||||
* @const
|
||||
* @type {ol.MapBrowserEvent}
|
||||
* @type {module:ol/MapBrowserEvent~MapBrowserEvent}
|
||||
* @api
|
||||
*/
|
||||
this.mapBrowserEvent = mapBrowserEvent;
|
||||
@@ -137,7 +137,7 @@ inherits(DragBox, PointerInteraction);
|
||||
/**
|
||||
* The default condition for determining whether the boxend event
|
||||
* should fire.
|
||||
* @param {ol.MapBrowserEvent} mapBrowserEvent The originating MapBrowserEvent
|
||||
* @param {module:ol/MapBrowserEvent~MapBrowserEvent} mapBrowserEvent The originating MapBrowserEvent
|
||||
* leading to the box end.
|
||||
* @param {module:ol~Pixel} startPixel The starting 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.
|
||||
* @return {ol.geom.Polygon} Geometry.
|
||||
* @return {module:ol/geom/Polygon~Polygon} Geometry.
|
||||
* @api
|
||||
*/
|
||||
DragBox.prototype.getGeometry = function() {
|
||||
@@ -180,7 +180,7 @@ DragBox.prototype.getGeometry = function() {
|
||||
/**
|
||||
* To be overridden by child classes.
|
||||
* 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
|
||||
*/
|
||||
DragBox.prototype.onBoxEnd = UNDEFINED;
|
||||
|
||||
@@ -70,7 +70,7 @@ const DrawEventType = {
|
||||
* @extends {ol.events.Event}
|
||||
* @implements {oli.DrawEvent}
|
||||
* @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) {
|
||||
|
||||
@@ -78,7 +78,7 @@ const DrawEvent = function(type, feature) {
|
||||
|
||||
/**
|
||||
* The feature being drawn.
|
||||
* @type {ol.Feature}
|
||||
* @type {module:ol/Feature~Feature}
|
||||
* @api
|
||||
*/
|
||||
this.feature = feature;
|
||||
@@ -145,7 +145,7 @@ const Draw = function(options) {
|
||||
|
||||
/**
|
||||
* Target collection for drawn features.
|
||||
* @type {ol.Collection.<ol.Feature>}
|
||||
* @type {ol.Collection.<module:ol/Feature~Feature>}
|
||||
* @private
|
||||
*/
|
||||
this.features_ = options.features ? options.features : null;
|
||||
@@ -159,10 +159,10 @@ const Draw = function(options) {
|
||||
|
||||
/**
|
||||
* Geometry type.
|
||||
* @type {ol.geom.GeometryType}
|
||||
* @type {module:ol/geom/GeometryType~GeometryType}
|
||||
* @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.
|
||||
@@ -211,11 +211,11 @@ const Draw = function(options) {
|
||||
/**
|
||||
* @param {!Array.<module:ol/coordinate~Coordinate>} coordinates
|
||||
* The coordinates.
|
||||
* @param {ol.geom.SimpleGeometry=} opt_geometry Optional geometry.
|
||||
* @return {ol.geom.SimpleGeometry} A geometry.
|
||||
* @param {module:ol/geom/SimpleGeometry~SimpleGeometry=} opt_geometry Optional geometry.
|
||||
* @return {module:ol/geom/SimpleGeometry~SimpleGeometry} A 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]);
|
||||
const squaredLength = squaredCoordinateDistance(
|
||||
coordinates[0], coordinates[1]);
|
||||
@@ -235,8 +235,8 @@ const Draw = function(options) {
|
||||
/**
|
||||
* @param {!Array.<module:ol/coordinate~Coordinate>} coordinates
|
||||
* The coordinates.
|
||||
* @param {ol.geom.SimpleGeometry=} opt_geometry Optional geometry.
|
||||
* @return {ol.geom.SimpleGeometry} A geometry.
|
||||
* @param {module:ol/geom/SimpleGeometry~SimpleGeometry=} opt_geometry Optional geometry.
|
||||
* @return {module:ol/geom/SimpleGeometry~SimpleGeometry} A geometry.
|
||||
*/
|
||||
geometryFunction = function(coordinates, opt_geometry) {
|
||||
let geometry = opt_geometry;
|
||||
@@ -281,14 +281,14 @@ const Draw = function(options) {
|
||||
|
||||
/**
|
||||
* Sketch feature.
|
||||
* @type {ol.Feature}
|
||||
* @type {module:ol/Feature~Feature}
|
||||
* @private
|
||||
*/
|
||||
this.sketchFeature_ = null;
|
||||
|
||||
/**
|
||||
* Sketch point.
|
||||
* @type {ol.Feature}
|
||||
* @type {module:ol/Feature~Feature}
|
||||
* @private
|
||||
*/
|
||||
this.sketchPoint_ = null;
|
||||
@@ -302,7 +302,7 @@ const Draw = function(options) {
|
||||
|
||||
/**
|
||||
* Sketch line. Used when drawing polygon.
|
||||
* @type {ol.Feature}
|
||||
* @type {module:ol/Feature~Feature}
|
||||
* @private
|
||||
*/
|
||||
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.
|
||||
* @param {ol.MapBrowserEvent} event Map browser event.
|
||||
* @param {module:ol/MapBrowserEvent~MapBrowserEvent} event Map browser event.
|
||||
* @return {boolean} `false` to stop event propagation.
|
||||
* @this {ol.interaction.Draw}
|
||||
* @api
|
||||
@@ -521,7 +521,7 @@ function handleUpEvent(event) {
|
||||
|
||||
/**
|
||||
* 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.
|
||||
* @private
|
||||
*/
|
||||
@@ -553,7 +553,7 @@ Draw.prototype.handlePointerMove_ = function(event) {
|
||||
|
||||
/**
|
||||
* 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.
|
||||
* @private
|
||||
*/
|
||||
@@ -592,7 +592,7 @@ Draw.prototype.atFinish_ = function(event) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.MapBrowserEvent} event Event.
|
||||
* @param {module:ol/MapBrowserEvent~MapBrowserEvent} event Event.
|
||||
* @private
|
||||
*/
|
||||
Draw.prototype.createOrUpdateSketchPoint_ = function(event) {
|
||||
@@ -601,7 +601,7 @@ Draw.prototype.createOrUpdateSketchPoint_ = function(event) {
|
||||
this.sketchPoint_ = new Feature(new Point(coordinates));
|
||||
this.updateSketchFeatures_();
|
||||
} else {
|
||||
const sketchPointGeom = /** @type {ol.geom.Point} */ (this.sketchPoint_.getGeometry());
|
||||
const sketchPointGeom = /** @type {module:ol/geom/Point~Point} */ (this.sketchPoint_.getGeometry());
|
||||
sketchPointGeom.setCoordinates(coordinates);
|
||||
}
|
||||
};
|
||||
@@ -609,7 +609,7 @@ Draw.prototype.createOrUpdateSketchPoint_ = function(event) {
|
||||
|
||||
/**
|
||||
* Start the drawing.
|
||||
* @param {ol.MapBrowserEvent} event Event.
|
||||
* @param {module:ol/MapBrowserEvent~MapBrowserEvent} event Event.
|
||||
* @private
|
||||
*/
|
||||
Draw.prototype.startDrawing_ = function(event) {
|
||||
@@ -640,12 +640,12 @@ Draw.prototype.startDrawing_ = function(event) {
|
||||
|
||||
/**
|
||||
* Modify the drawing.
|
||||
* @param {ol.MapBrowserEvent} event Event.
|
||||
* @param {module:ol/MapBrowserEvent~MapBrowserEvent} event Event.
|
||||
* @private
|
||||
*/
|
||||
Draw.prototype.modifyDrawing_ = function(event) {
|
||||
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;
|
||||
if (this.mode_ === Mode.POINT) {
|
||||
last = this.sketchCoords_;
|
||||
@@ -664,7 +664,7 @@ Draw.prototype.modifyDrawing_ = function(event) {
|
||||
last[1] = coordinate[1];
|
||||
this.geometryFunction_(/** @type {!Array.<module:ol/coordinate~Coordinate>} */ (this.sketchCoords_), geometry);
|
||||
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);
|
||||
}
|
||||
let sketchLineGeom;
|
||||
@@ -674,11 +674,11 @@ Draw.prototype.modifyDrawing_ = function(event) {
|
||||
this.sketchLine_ = new Feature(new LineString(null));
|
||||
}
|
||||
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(
|
||||
ring.getLayout(), ring.getFlatCoordinates());
|
||||
} 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_);
|
||||
}
|
||||
this.updateSketchFeatures_();
|
||||
@@ -687,12 +687,12 @@ Draw.prototype.modifyDrawing_ = function(event) {
|
||||
|
||||
/**
|
||||
* Add a new coordinate to the drawing.
|
||||
* @param {ol.MapBrowserEvent} event Event.
|
||||
* @param {module:ol/MapBrowserEvent~MapBrowserEvent} event Event.
|
||||
* @private
|
||||
*/
|
||||
Draw.prototype.addToDrawing_ = function(event) {
|
||||
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 coordinates;
|
||||
if (this.mode_ === Mode.LINE_STRING) {
|
||||
@@ -737,7 +737,7 @@ Draw.prototype.removeLastPoint = function() {
|
||||
if (!this.sketchFeature_) {
|
||||
return;
|
||||
}
|
||||
const geometry = /** @type {ol.geom.SimpleGeometry} */ (this.sketchFeature_.getGeometry());
|
||||
const geometry = /** @type {module:ol/geom/SimpleGeometry~SimpleGeometry} */ (this.sketchFeature_.getGeometry());
|
||||
let coordinates, sketchLineGeom;
|
||||
if (this.mode_ === Mode.LINE_STRING) {
|
||||
coordinates = this.sketchCoords_;
|
||||
@@ -749,7 +749,7 @@ Draw.prototype.removeLastPoint = function() {
|
||||
} else if (this.mode_ === Mode.POLYGON) {
|
||||
coordinates = this.sketchCoords_[0];
|
||||
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);
|
||||
this.geometryFunction_(this.sketchCoords_, geometry);
|
||||
}
|
||||
@@ -774,7 +774,7 @@ Draw.prototype.finishDrawing = function() {
|
||||
return;
|
||||
}
|
||||
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) {
|
||||
// remove the redundant last point
|
||||
coordinates.pop();
|
||||
@@ -810,7 +810,7 @@ Draw.prototype.finishDrawing = function() {
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
Draw.prototype.abortDrawing_ = function() {
|
||||
@@ -830,12 +830,12 @@ Draw.prototype.abortDrawing_ = function() {
|
||||
* Extend an existing geometry by adding additional points. This only works
|
||||
* on features with `LineString` geometries, where the interaction will
|
||||
* 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
|
||||
*/
|
||||
Draw.prototype.extend = function(feature) {
|
||||
const geometry = feature.getGeometry();
|
||||
const lineString = /** @type {ol.geom.LineString} */ (geometry);
|
||||
const lineString = /** @type {module:ol/geom/LineString~LineString} */ (geometry);
|
||||
this.sketchFeature_ = feature;
|
||||
this.sketchCoords_ = lineString.getCoordinates();
|
||||
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
|
||||
* 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
|
||||
* 32.
|
||||
* @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 radius = Math.sqrt(
|
||||
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);
|
||||
const angle = opt_angle ? opt_angle :
|
||||
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
|
||||
* 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.
|
||||
*/
|
||||
function getMode(type) {
|
||||
|
||||
@@ -89,14 +89,14 @@ const ExtentInteraction = function(opt_options) {
|
||||
|
||||
/**
|
||||
* Feature for displaying the visible extent
|
||||
* @type {ol.Feature}
|
||||
* @type {module:ol/Feature~Feature}
|
||||
* @private
|
||||
*/
|
||||
this.extentFeature_ = null;
|
||||
|
||||
/**
|
||||
* Feature for displaying the visible pointer
|
||||
* @type {ol.Feature}
|
||||
* @type {module:ol/Feature~Feature}
|
||||
* @private
|
||||
*/
|
||||
this.vertexFeature_ = null;
|
||||
@@ -151,7 +151,7 @@ const ExtentInteraction = function(opt_options) {
|
||||
inherits(ExtentInteraction, PointerInteraction);
|
||||
|
||||
/**
|
||||
* @param {ol.MapBrowserEvent} mapBrowserEvent Event.
|
||||
* @param {module:ol/MapBrowserEvent~MapBrowserEvent} mapBrowserEvent Event.
|
||||
* @return {boolean} Propagate event?
|
||||
* @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
|
||||
*/
|
||||
ExtentInteraction.prototype.handlePointerMove_ = function(mapBrowserEvent) {
|
||||
@@ -382,7 +382,7 @@ ExtentInteraction.prototype.handlePointerMove_ = function(mapBrowserEvent) {
|
||||
|
||||
/**
|
||||
* @param {module:ol/extent~Extent} extent extent
|
||||
* @returns {ol.Feature} extent as featrue
|
||||
* @returns {module:ol/Feature~Feature} extent as featrue
|
||||
* @private
|
||||
*/
|
||||
ExtentInteraction.prototype.createOrUpdateExtentFeature_ = function(extent) {
|
||||
@@ -409,7 +409,7 @@ ExtentInteraction.prototype.createOrUpdateExtentFeature_ = function(extent) {
|
||||
|
||||
/**
|
||||
* @param {module:ol/coordinate~Coordinate} vertex location of feature
|
||||
* @returns {ol.Feature} vertex as feature
|
||||
* @returns {module:ol/Feature~Feature} vertex as feature
|
||||
* @private
|
||||
*/
|
||||
ExtentInteraction.prototype.createOrUpdatePointerFeature_ = function(vertex) {
|
||||
@@ -419,7 +419,7 @@ ExtentInteraction.prototype.createOrUpdatePointerFeature_ = function(vertex) {
|
||||
this.vertexFeature_ = vertexFeature;
|
||||
this.vertexOverlay_.getSource().addFeature(vertexFeature);
|
||||
} else {
|
||||
const geometry = /** @type {ol.geom.Point} */ (vertexFeature.getGeometry());
|
||||
const geometry = /** @type {module:ol/geom/Point~Point} */ (vertexFeature.getGeometry());
|
||||
geometry.setCoordinates(vertex);
|
||||
}
|
||||
return vertexFeature;
|
||||
|
||||
@@ -35,7 +35,7 @@ const KeyboardPan = function(opt_options) {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @param {ol.MapBrowserEvent} mapBrowserEvent Browser event.
|
||||
* @param {module:ol/MapBrowserEvent~MapBrowserEvent} mapBrowserEvent Browser event.
|
||||
* @return {boolean} Combined condition result.
|
||||
*/
|
||||
this.defaultCondition_ = function(mapBrowserEvent) {
|
||||
@@ -68,10 +68,10 @@ const KeyboardPan = function(opt_options) {
|
||||
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
|
||||
* pressed).
|
||||
* @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
|
||||
* @param {module:ol/MapBrowserEvent~MapBrowserEvent} mapBrowserEvent Map browser event.
|
||||
* @return {boolean} `false` to stop event propagation.
|
||||
* @this {ol.interaction.KeyboardPan}
|
||||
*/
|
||||
|
||||
@@ -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
|
||||
* 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.
|
||||
* @this {ol.interaction.KeyboardZoom}
|
||||
*/
|
||||
|
||||
@@ -52,7 +52,7 @@ const ModifyEventType = {
|
||||
* @extends {ol.events.Event}
|
||||
* @implements {oli.ModifyEvent}
|
||||
* @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
|
||||
* {@link ol.MapBrowserPointerEvent}.
|
||||
*/
|
||||
@@ -62,14 +62,14 @@ export const ModifyEvent = function(type, features, mapBrowserPointerEvent) {
|
||||
|
||||
/**
|
||||
* The features being modified.
|
||||
* @type {ol.Collection.<ol.Feature>}
|
||||
* @type {ol.Collection.<module:ol/Feature~Feature>}
|
||||
* @api
|
||||
*/
|
||||
this.features = features;
|
||||
|
||||
/**
|
||||
* Associated {@link ol.MapBrowserEvent}.
|
||||
* @type {ol.MapBrowserEvent}
|
||||
* Associated {@link module:ol/MapBrowserEvent~MapBrowserEvent}.
|
||||
* @type {module:ol/MapBrowserEvent~MapBrowserEvent}
|
||||
* @api
|
||||
*/
|
||||
this.mapBrowserEvent = mapBrowserPointerEvent;
|
||||
@@ -115,7 +115,7 @@ const Modify = function(options) {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @param {ol.MapBrowserEvent} mapBrowserEvent Browser event.
|
||||
* @param {module:ol/MapBrowserEvent~MapBrowserEvent} mapBrowserEvent Browser event.
|
||||
* @return {boolean} Combined condition result.
|
||||
*/
|
||||
this.defaultDeleteCondition_ = function(mapBrowserEvent) {
|
||||
@@ -138,7 +138,7 @@ const Modify = function(options) {
|
||||
|
||||
/**
|
||||
* Editing vertex.
|
||||
* @type {ol.Feature}
|
||||
* @type {module:ol/Feature~Feature}
|
||||
* @private
|
||||
*/
|
||||
this.vertexFeature_ = null;
|
||||
@@ -223,7 +223,7 @@ const Modify = function(options) {
|
||||
/**
|
||||
* @const
|
||||
* @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_ = {
|
||||
'Point': this.writePointGeometry_,
|
||||
@@ -260,7 +260,7 @@ const Modify = function(options) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @type {ol.Collection.<ol.Feature>}
|
||||
* @type {ol.Collection.<module:ol/Feature~Feature>}
|
||||
* @private
|
||||
*/
|
||||
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
|
||||
*/
|
||||
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
|
||||
*/
|
||||
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
|
||||
*/
|
||||
Modify.prototype.removeFeatureSegmentData_ = function(feature) {
|
||||
@@ -415,7 +415,7 @@ Modify.prototype.handleSourceRemove_ = function(event) {
|
||||
* @private
|
||||
*/
|
||||
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) {
|
||||
if (!this.changingFeature_) {
|
||||
const feature = /** @type {ol.Feature} */ (evt.target);
|
||||
const feature = /** @type {module:ol/Feature~Feature} */ (evt.target);
|
||||
this.removeFeature_(feature);
|
||||
this.addFeature_(feature);
|
||||
}
|
||||
@@ -437,14 +437,14 @@ Modify.prototype.handleFeatureChange_ = function(evt) {
|
||||
* @private
|
||||
*/
|
||||
Modify.prototype.handleFeatureRemove_ = function(evt) {
|
||||
const feature = /** @type {ol.Feature} */ (evt.element);
|
||||
const feature = /** @type {module:ol/Feature~Feature} */ (evt.element);
|
||||
this.removeFeature_(feature);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.Feature} feature Feature
|
||||
* @param {ol.geom.Point} geometry Geometry.
|
||||
* @param {module:ol/Feature~Feature} feature Feature
|
||||
* @param {module:ol/geom/Point~Point} geometry Geometry.
|
||||
* @private
|
||||
*/
|
||||
Modify.prototype.writePointGeometry_ = function(feature, geometry) {
|
||||
@@ -459,8 +459,8 @@ Modify.prototype.writePointGeometry_ = function(feature, geometry) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.Feature} feature Feature
|
||||
* @param {ol.geom.MultiPoint} geometry Geometry.
|
||||
* @param {module:ol/Feature~Feature} feature Feature
|
||||
* @param {module:ol/geom/MultiPoint~MultiPoint} geometry Geometry.
|
||||
* @private
|
||||
*/
|
||||
Modify.prototype.writeMultiPointGeometry_ = function(feature, geometry) {
|
||||
@@ -480,8 +480,8 @@ Modify.prototype.writeMultiPointGeometry_ = function(feature, geometry) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.Feature} feature Feature
|
||||
* @param {ol.geom.LineString} geometry Geometry.
|
||||
* @param {module:ol/Feature~Feature} feature Feature
|
||||
* @param {module:ol/geom/LineString~LineString} geometry Geometry.
|
||||
* @private
|
||||
*/
|
||||
Modify.prototype.writeLineStringGeometry_ = function(feature, geometry) {
|
||||
@@ -500,8 +500,8 @@ Modify.prototype.writeLineStringGeometry_ = function(feature, geometry) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.Feature} feature Feature
|
||||
* @param {ol.geom.MultiLineString} geometry Geometry.
|
||||
* @param {module:ol/Feature~Feature} feature Feature
|
||||
* @param {module:ol/geom/MultiLineString~MultiLineString} geometry Geometry.
|
||||
* @private
|
||||
*/
|
||||
Modify.prototype.writeMultiLineStringGeometry_ = function(feature, geometry) {
|
||||
@@ -524,8 +524,8 @@ Modify.prototype.writeMultiLineStringGeometry_ = function(feature, geometry) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.Feature} feature Feature
|
||||
* @param {ol.geom.Polygon} geometry Geometry.
|
||||
* @param {module:ol/Feature~Feature} feature Feature
|
||||
* @param {module:ol/geom/Polygon~Polygon} geometry Geometry.
|
||||
* @private
|
||||
*/
|
||||
Modify.prototype.writePolygonGeometry_ = function(feature, geometry) {
|
||||
@@ -548,8 +548,8 @@ Modify.prototype.writePolygonGeometry_ = function(feature, geometry) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.Feature} feature Feature
|
||||
* @param {ol.geom.MultiPolygon} geometry Geometry.
|
||||
* @param {module:ol/Feature~Feature} feature Feature
|
||||
* @param {module:ol/geom/MultiPolygon~MultiPolygon} geometry Geometry.
|
||||
* @private
|
||||
*/
|
||||
Modify.prototype.writeMultiPolygonGeometry_ = function(feature, geometry) {
|
||||
@@ -581,8 +581,8 @@ Modify.prototype.writeMultiPolygonGeometry_ = function(feature, geometry) {
|
||||
* {@link CIRCLE_CIRCUMFERENCE_INDEX} is
|
||||
* the circumference, and is not a line segment.
|
||||
*
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {ol.geom.Circle} geometry Geometry.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
* @param {module:ol/geom/Circle~Circle} geometry Geometry.
|
||||
* @private
|
||||
*/
|
||||
Modify.prototype.writeCircleGeometry_ = function(feature, geometry) {
|
||||
@@ -607,8 +607,8 @@ Modify.prototype.writeCircleGeometry_ = function(feature, geometry) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.Feature} feature Feature
|
||||
* @param {ol.geom.GeometryCollection} geometry Geometry.
|
||||
* @param {module:ol/Feature~Feature} feature Feature
|
||||
* @param {module:ol/geom/GeometryCollection~GeometryCollection} geometry Geometry.
|
||||
* @private
|
||||
*/
|
||||
Modify.prototype.writeGeometryCollectionGeometry_ = function(feature, geometry) {
|
||||
@@ -621,7 +621,7 @@ Modify.prototype.writeGeometryCollectionGeometry_ = function(feature, geometry)
|
||||
|
||||
/**
|
||||
* @param {module:ol/coordinate~Coordinate} coordinates Coordinates.
|
||||
* @return {ol.Feature} Vertex feature.
|
||||
* @return {module:ol/Feature~Feature} Vertex feature.
|
||||
* @private
|
||||
*/
|
||||
Modify.prototype.createOrUpdateVertexFeature_ = function(coordinates) {
|
||||
@@ -631,7 +631,7 @@ Modify.prototype.createOrUpdateVertexFeature_ = function(coordinates) {
|
||||
this.vertexFeature_ = vertexFeature;
|
||||
this.overlay_.getSource().addFeature(vertexFeature);
|
||||
} else {
|
||||
const geometry = /** @type {ol.geom.Point} */ (vertexFeature.getGeometry());
|
||||
const geometry = /** @type {module:ol/geom/Point~Point} */ (vertexFeature.getGeometry());
|
||||
geometry.setCoordinates(coordinates);
|
||||
}
|
||||
return vertexFeature;
|
||||
@@ -664,7 +664,7 @@ function handleDownEvent(evt) {
|
||||
const vertexFeature = this.vertexFeature_;
|
||||
if (vertexFeature) {
|
||||
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 vertexExtent = boundingExtent([vertex]);
|
||||
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.
|
||||
* @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
|
||||
* @param {module:ol/MapBrowserEvent~MapBrowserEvent} mapBrowserEvent Map browser event.
|
||||
* @return {boolean} `false` to stop event propagation.
|
||||
* @this {ol.interaction.Modify}
|
||||
*/
|
||||
@@ -866,7 +866,7 @@ function handleEvent(mapBrowserEvent) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.MapBrowserEvent} evt Event.
|
||||
* @param {module:ol/MapBrowserEvent~MapBrowserEvent} evt Event.
|
||||
* @private
|
||||
*/
|
||||
Modify.prototype.handlePointerMove_ = function(evt) {
|
||||
@@ -956,7 +956,7 @@ function pointDistanceToSegmentDataSquared(pointCoordinates, segmentData) {
|
||||
const geometry = segmentData.geometry;
|
||||
|
||||
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) {
|
||||
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.
|
||||
* @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 {Array.<number>|undefined} depth Depth.
|
||||
* @param {number} delta Delta (1 or -1).
|
||||
|
||||
@@ -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.
|
||||
* @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
|
||||
* @param {module:ol/MapBrowserEvent~MapBrowserEvent} mapBrowserEvent Map browser event.
|
||||
* @return {boolean} Allow event propagation.
|
||||
* @this {ol.interaction.MouseWheelZoom}
|
||||
*/
|
||||
|
||||
@@ -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
|
||||
* detected.
|
||||
* @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
|
||||
* @param {module:ol/MapBrowserEvent~MapBrowserEvent} mapBrowserEvent Map browser event.
|
||||
* @return {boolean} `false` to stop event propagation.
|
||||
* @this {ol.interaction.Pointer}
|
||||
* @api
|
||||
|
||||
@@ -35,10 +35,10 @@ const SelectEventType = {
|
||||
* this type.
|
||||
*
|
||||
* @param {SelectEventType} type The event type.
|
||||
* @param {Array.<ol.Feature>} selected Selected features.
|
||||
* @param {Array.<ol.Feature>} deselected Deselected features.
|
||||
* @param {ol.MapBrowserEvent} mapBrowserEvent Associated
|
||||
* {@link ol.MapBrowserEvent}.
|
||||
* @param {Array.<module:ol/Feature~Feature>} selected Selected features.
|
||||
* @param {Array.<module:ol/Feature~Feature>} deselected Deselected features.
|
||||
* @param {module:ol/MapBrowserEvent~MapBrowserEvent} mapBrowserEvent Associated
|
||||
* {@link module:ol/MapBrowserEvent~MapBrowserEvent}.
|
||||
* @implements {oli.SelectEvent}
|
||||
* @extends {ol.events.Event}
|
||||
* @constructor
|
||||
@@ -48,21 +48,21 @@ const SelectEvent = function(type, selected, deselected, mapBrowserEvent) {
|
||||
|
||||
/**
|
||||
* Selected features array.
|
||||
* @type {Array.<ol.Feature>}
|
||||
* @type {Array.<module:ol/Feature~Feature>}
|
||||
* @api
|
||||
*/
|
||||
this.selected = selected;
|
||||
|
||||
/**
|
||||
* Deselected features array.
|
||||
* @type {Array.<ol.Feature>}
|
||||
* @type {Array.<module:ol/Feature~Feature>}
|
||||
* @api
|
||||
*/
|
||||
this.deselected = deselected;
|
||||
|
||||
/**
|
||||
* Associated {@link ol.MapBrowserEvent}.
|
||||
* @type {ol.MapBrowserEvent}
|
||||
* Associated {@link module:ol/MapBrowserEvent~MapBrowserEvent}.
|
||||
* @type {module:ol/MapBrowserEvent~MapBrowserEvent}
|
||||
* @api
|
||||
*/
|
||||
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.
|
||||
* @private
|
||||
*/
|
||||
@@ -210,7 +210,7 @@ Select.prototype.addFeatureLayerAssociation_ = function(feature, layer) {
|
||||
|
||||
/**
|
||||
* Get the selected features.
|
||||
* @return {ol.Collection.<ol.Feature>} Features collection.
|
||||
* @return {ol.Collection.<module:ol/Feature~Feature>} Features collection.
|
||||
* @api
|
||||
*/
|
||||
Select.prototype.getFeatures = function() {
|
||||
@@ -233,7 +233,7 @@ Select.prototype.getHitTolerance = function() {
|
||||
* the (last) selected feature. Note that this will not work with any
|
||||
* programmatic method like pushing features to
|
||||
* {@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.
|
||||
* @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.
|
||||
* @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
|
||||
* @param {module:ol/MapBrowserEvent~MapBrowserEvent} mapBrowserEvent Map browser event.
|
||||
* @return {boolean} `false` to stop event propagation.
|
||||
* @this {ol.interaction.Select}
|
||||
*/
|
||||
@@ -270,7 +270,7 @@ function handleEvent(mapBrowserEvent) {
|
||||
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.
|
||||
* @return {boolean|undefined} Continue to iterate over the features.
|
||||
*/
|
||||
@@ -303,7 +303,7 @@ function handleEvent(mapBrowserEvent) {
|
||||
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.
|
||||
* @return {boolean|undefined} Continue to iterate over the features.
|
||||
*/
|
||||
@@ -394,7 +394,7 @@ function getDefaultStyleFunction() {
|
||||
Select.prototype.addFeature_ = function(evt) {
|
||||
const map = this.getMap();
|
||||
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) {
|
||||
const map = this.getMap();
|
||||
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
|
||||
*/
|
||||
Select.prototype.removeFeatureLayerAssociation_ = function(feature) {
|
||||
|
||||
@@ -68,7 +68,7 @@ const Snap = function(opt_options) {
|
||||
this.edge_ = options.edge !== undefined ? options.edge : true;
|
||||
|
||||
/**
|
||||
* @type {ol.Collection.<ol.Feature>}
|
||||
* @type {ol.Collection.<module:ol/Feature~Feature>}
|
||||
* @private
|
||||
*/
|
||||
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
|
||||
* feature doesn't get updated right away. It will be at the next 'pointerup'
|
||||
* event fired.
|
||||
* @type {!Object.<number, ol.Feature>}
|
||||
* @type {!Object.<number, module:ol/Feature~Feature>}
|
||||
* @private
|
||||
*/
|
||||
this.pendingFeatures_ = {};
|
||||
@@ -134,7 +134,7 @@ const Snap = function(opt_options) {
|
||||
/**
|
||||
* @const
|
||||
* @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_ = {
|
||||
'Point': this.writePointGeometry_,
|
||||
@@ -154,7 +154,7 @@ inherits(Snap, PointerInteraction);
|
||||
|
||||
/**
|
||||
* 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
|
||||
* Defaults to `true`.
|
||||
* @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
|
||||
*/
|
||||
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
|
||||
*/
|
||||
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
|
||||
*/
|
||||
Snap.prototype.getFeatures_ = function() {
|
||||
@@ -209,7 +209,7 @@ Snap.prototype.getFeatures_ = function() {
|
||||
} else if (this.source_) {
|
||||
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) {
|
||||
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) {
|
||||
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
|
||||
*/
|
||||
Snap.prototype.handleFeatureChange_ = function(evt) {
|
||||
const feature = /** @type {ol.Feature} */ (evt.target);
|
||||
const feature = /** @type {module:ol/Feature~Feature} */ (evt.target);
|
||||
if (this.handlingDownUpSequence) {
|
||||
const uid = getUid(feature);
|
||||
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.
|
||||
* @param {ol.Feature} feature Feature
|
||||
* @param {module:ol/Feature~Feature} feature Feature
|
||||
* @param {boolean=} opt_unlisten Whether to unlisten to the feature change
|
||||
* or not. Defaults to `true`.
|
||||
* @api
|
||||
@@ -383,7 +383,7 @@ Snap.prototype.snapTo = function(pixel, pixelCoordinate, map) {
|
||||
} else if (this.edge_) {
|
||||
if (isCircle) {
|
||||
vertex = closestOnCircle(pixelCoordinate,
|
||||
/** @type {ol.geom.Circle} */ (segments[0].feature.getGeometry()));
|
||||
/** @type {module:ol/geom/Circle~Circle} */ (segments[0].feature.getGeometry()));
|
||||
} else {
|
||||
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
|
||||
*/
|
||||
Snap.prototype.updateFeature_ = function(feature) {
|
||||
@@ -427,8 +427,8 @@ Snap.prototype.updateFeature_ = function(feature) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.Feature} feature Feature
|
||||
* @param {ol.geom.Circle} geometry Geometry.
|
||||
* @param {module:ol/Feature~Feature} feature Feature
|
||||
* @param {module:ol/geom/Circle~Circle} geometry Geometry.
|
||||
* @private
|
||||
*/
|
||||
Snap.prototype.writeCircleGeometry_ = function(feature, geometry) {
|
||||
@@ -446,8 +446,8 @@ Snap.prototype.writeCircleGeometry_ = function(feature, geometry) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.Feature} feature Feature
|
||||
* @param {ol.geom.GeometryCollection} geometry Geometry.
|
||||
* @param {module:ol/Feature~Feature} feature Feature
|
||||
* @param {module:ol/geom/GeometryCollection~GeometryCollection} geometry Geometry.
|
||||
* @private
|
||||
*/
|
||||
Snap.prototype.writeGeometryCollectionGeometry_ = function(feature, geometry) {
|
||||
@@ -462,8 +462,8 @@ Snap.prototype.writeGeometryCollectionGeometry_ = function(feature, geometry) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.Feature} feature Feature
|
||||
* @param {ol.geom.LineString} geometry Geometry.
|
||||
* @param {module:ol/Feature~Feature} feature Feature
|
||||
* @param {module:ol/geom/LineString~LineString} geometry Geometry.
|
||||
* @private
|
||||
*/
|
||||
Snap.prototype.writeLineStringGeometry_ = function(feature, geometry) {
|
||||
@@ -480,8 +480,8 @@ Snap.prototype.writeLineStringGeometry_ = function(feature, geometry) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.Feature} feature Feature
|
||||
* @param {ol.geom.MultiLineString} geometry Geometry.
|
||||
* @param {module:ol/Feature~Feature} feature Feature
|
||||
* @param {module:ol/geom/MultiLineString~MultiLineString} geometry Geometry.
|
||||
* @private
|
||||
*/
|
||||
Snap.prototype.writeMultiLineStringGeometry_ = function(feature, geometry) {
|
||||
@@ -501,8 +501,8 @@ Snap.prototype.writeMultiLineStringGeometry_ = function(feature, geometry) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.Feature} feature Feature
|
||||
* @param {ol.geom.MultiPoint} geometry Geometry.
|
||||
* @param {module:ol/Feature~Feature} feature Feature
|
||||
* @param {module:ol/geom/MultiPoint~MultiPoint} geometry Geometry.
|
||||
* @private
|
||||
*/
|
||||
Snap.prototype.writeMultiPointGeometry_ = function(feature, geometry) {
|
||||
@@ -519,8 +519,8 @@ Snap.prototype.writeMultiPointGeometry_ = function(feature, geometry) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.Feature} feature Feature
|
||||
* @param {ol.geom.MultiPolygon} geometry Geometry.
|
||||
* @param {module:ol/Feature~Feature} feature Feature
|
||||
* @param {module:ol/geom/MultiPolygon~MultiPolygon} geometry Geometry.
|
||||
* @private
|
||||
*/
|
||||
Snap.prototype.writeMultiPolygonGeometry_ = function(feature, geometry) {
|
||||
@@ -543,8 +543,8 @@ Snap.prototype.writeMultiPolygonGeometry_ = function(feature, geometry) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.Feature} feature Feature
|
||||
* @param {ol.geom.Point} geometry Geometry.
|
||||
* @param {module:ol/Feature~Feature} feature Feature
|
||||
* @param {module:ol/geom/Point~Point} geometry Geometry.
|
||||
* @private
|
||||
*/
|
||||
Snap.prototype.writePointGeometry_ = function(feature, geometry) {
|
||||
@@ -558,8 +558,8 @@ Snap.prototype.writePointGeometry_ = function(feature, geometry) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.Feature} feature Feature
|
||||
* @param {ol.geom.Polygon} geometry Geometry.
|
||||
* @param {module:ol/Feature~Feature} feature Feature
|
||||
* @param {module:ol/geom/Polygon~Polygon} geometry Geometry.
|
||||
* @private
|
||||
*/
|
||||
Snap.prototype.writePolygonGeometry_ = function(feature, geometry) {
|
||||
@@ -580,7 +580,7 @@ Snap.prototype.writePolygonGeometry_ = function(feature, geometry) {
|
||||
|
||||
/**
|
||||
* 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.
|
||||
* @this {ol.interaction.Snap}
|
||||
*/
|
||||
|
||||
@@ -46,7 +46,7 @@ const TranslateEventType = {
|
||||
* @extends {ol.events.Event}
|
||||
* @implements {oli.interaction.TranslateEvent}
|
||||
* @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.
|
||||
*/
|
||||
export const TranslateEvent = function(type, features, coordinate) {
|
||||
@@ -55,7 +55,7 @@ export const TranslateEvent = function(type, features, coordinate) {
|
||||
|
||||
/**
|
||||
* The features being translated.
|
||||
* @type {ol.Collection.<ol.Feature>}
|
||||
* @type {ol.Collection.<module:ol/Feature~Feature>}
|
||||
* @api
|
||||
*/
|
||||
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
|
||||
*/
|
||||
this.features_ = options.features !== undefined ? options.features : null;
|
||||
@@ -134,7 +134,7 @@ const Translate = function(opt_options) {
|
||||
this.hitTolerance_ = options.hitTolerance ? options.hitTolerance : 0;
|
||||
|
||||
/**
|
||||
* @type {ol.Feature}
|
||||
* @type {module:ol/Feature~Feature}
|
||||
* @private
|
||||
*/
|
||||
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}
|
||||
*/
|
||||
function handleMoveEvent(event) {
|
||||
@@ -243,7 +243,7 @@ function handleMoveEvent(event) {
|
||||
* features.
|
||||
* @param {module:ol~Pixel} pixel Pixel coordinate to test for intersection.
|
||||
* @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.
|
||||
* @private
|
||||
*/
|
||||
|
||||
@@ -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.
|
||||
*/
|
||||
VectorLayer.prototype.getRenderOrder = function() {
|
||||
|
||||
@@ -7,7 +7,7 @@ import {METERS_PER_UNIT} from '../proj/Units.js';
|
||||
/**
|
||||
* @typedef {Object} Options
|
||||
* @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`.
|
||||
* @property {ol.Extent|undefined} extent The validity extent for the SRS.
|
||||
* @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
|
||||
* whole globe. Default is `false`.
|
||||
* @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.
|
||||
* @property {ol.Extent|undefined} worldExtent The world extent for the SRS.
|
||||
* @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
|
||||
* 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.
|
||||
*
|
||||
* 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
|
||||
* [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
|
||||
* @param {module:ol/proj/Projection~Options} options Projection options.
|
||||
@@ -64,17 +64,17 @@ const Projection = function(options) {
|
||||
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
|
||||
* tile.
|
||||
* @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
|
||||
* 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.
|
||||
* @private
|
||||
* @type {module:ol/extent~Extent}
|
||||
@@ -83,7 +83,7 @@ const Projection = function(options) {
|
||||
|
||||
/**
|
||||
* 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.
|
||||
* @private
|
||||
* @type {module:ol/extent~Extent}
|
||||
@@ -160,7 +160,7 @@ Projection.prototype.getExtent = function() {
|
||||
|
||||
/**
|
||||
* Get the units of this projection.
|
||||
* @return {ol.proj.Units} Units.
|
||||
* @return {module:ol/proj/Units~Units} Units.
|
||||
* @api
|
||||
*/
|
||||
Projection.prototype.getUnits = function() {
|
||||
|
||||
@@ -20,7 +20,7 @@ const Units = {
|
||||
/**
|
||||
* Meters per unit lookup table.
|
||||
* @const
|
||||
* @type {Object.<ol.proj.Units, number>}
|
||||
* @type {Object.<module:ol/proj/Units~Units, number>}
|
||||
* @api
|
||||
*/
|
||||
export const METERS_PER_UNIT = {};
|
||||
|
||||
@@ -45,7 +45,7 @@ export const WORLD_EXTENT = [-180, -85, 180, 85];
|
||||
* Projection object for web/spherical Mercator (EPSG:3857).
|
||||
*
|
||||
* @constructor
|
||||
* @extends {ol.proj.Projection}
|
||||
* @extends {module:ol/proj/Projection~Projection}
|
||||
* @param {string} code Code.
|
||||
*/
|
||||
function EPSG3857Projection(code) {
|
||||
@@ -67,7 +67,7 @@ inherits(EPSG3857Projection, Projection);
|
||||
* Projections equal to EPSG:3857.
|
||||
*
|
||||
* @const
|
||||
* @type {Array.<ol.proj.Projection>}
|
||||
* @type {Array.<module:ol/proj/Projection~Projection>}
|
||||
*/
|
||||
export const PROJECTIONS = [
|
||||
new EPSG3857Projection('EPSG:3857'),
|
||||
|
||||
@@ -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.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {ol.proj.Projection}
|
||||
* @extends {module:ol/proj/Projection~Projection}
|
||||
* @param {string} code Code.
|
||||
* @param {string=} opt_axisOrientation Axis orientation.
|
||||
*/
|
||||
@@ -62,7 +62,7 @@ inherits(EPSG4326Projection, Projection);
|
||||
* Projections equal to EPSG:4326.
|
||||
*
|
||||
* @const
|
||||
* @type {Array.<ol.proj.Projection>}
|
||||
* @type {Array.<module:ol/proj/Projection~Projection>}
|
||||
*/
|
||||
export const PROJECTIONS = [
|
||||
new EPSG4326Projection('CRS:84'),
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
|
||||
/**
|
||||
* @type {Object.<string, ol.proj.Projection>}
|
||||
* @type {Object.<string, module:ol/proj/Projection~Projection>}
|
||||
*/
|
||||
let cache = {};
|
||||
|
||||
@@ -20,7 +20,7 @@ export function clear() {
|
||||
/**
|
||||
* Get a cached projection by code.
|
||||
* @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) {
|
||||
return cache[code] || null;
|
||||
@@ -30,7 +30,7 @@ export function get(code) {
|
||||
/**
|
||||
* Add a projection to the cache.
|
||||
* @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) {
|
||||
cache[code] = projection;
|
||||
|
||||
@@ -23,8 +23,8 @@ export function clear() {
|
||||
* Registers a conversion function to convert coordinates from the source
|
||||
* projection to the destination projection.
|
||||
*
|
||||
* @param {ol.proj.Projection} source Source.
|
||||
* @param {ol.proj.Projection} destination Destination.
|
||||
* @param {module:ol/proj/Projection~Projection} source Source.
|
||||
* @param {module:ol/proj/Projection~Projection} destination Destination.
|
||||
* @param {module:ol/proj~TransformFunction} transformFn Transform.
|
||||
*/
|
||||
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
|
||||
* cached transforms during testing.
|
||||
*
|
||||
* @param {ol.proj.Projection} source Source projection.
|
||||
* @param {ol.proj.Projection} destination Destination projection.
|
||||
* @param {module:ol/proj/Projection~Projection} source Source projection.
|
||||
* @param {module:ol/proj/Projection~Projection} destination Destination projection.
|
||||
* @return {module:ol/proj~TransformFunction} transformFn The unregistered transform.
|
||||
*/
|
||||
export function remove(source, destination) {
|
||||
|
||||
@@ -15,7 +15,7 @@ import Polygon from '../geom/Polygon.js';
|
||||
const RenderBox = function(className) {
|
||||
|
||||
/**
|
||||
* @type {ol.geom.Polygon}
|
||||
* @type {module:ol/geom/Polygon~Polygon}
|
||||
* @private
|
||||
*/
|
||||
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() {
|
||||
return this.geometry_;
|
||||
|
||||
@@ -12,12 +12,12 @@ import {transform2D} from '../geom/flat/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
|
||||
* through the API is limited to getting the type and extent of the geometry.
|
||||
*
|
||||
* @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
|
||||
* to be right-handed for polygons.
|
||||
* @param {Array.<number>|Array.<Array.<number>>} ends Ends or Endss.
|
||||
@@ -39,7 +39,7 @@ const RenderFeature = function(type, flatCoordinates, ends, properties, id) {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {ol.geom.GeometryType}
|
||||
* @type {module:ol/geom/GeometryType~GeometryType}
|
||||
*/
|
||||
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}).
|
||||
* @return {ol.render.Feature} Feature.
|
||||
* @api
|
||||
@@ -249,7 +249,7 @@ RenderFeature.prototype.getStyleFunction = UNDEFINED;
|
||||
|
||||
/**
|
||||
* Get the type of this feature's geometry.
|
||||
* @return {ol.geom.GeometryType} Geometry type.
|
||||
* @return {module:ol/geom/GeometryType~GeometryType} Geometry type.
|
||||
* @api
|
||||
*/
|
||||
RenderFeature.prototype.getType = function() {
|
||||
|
||||
@@ -16,8 +16,8 @@ const VectorContext = function() {
|
||||
/**
|
||||
* Render a geometry with a custom renderer.
|
||||
*
|
||||
* @param {ol.geom.SimpleGeometry} geometry Geometry.
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/geom/SimpleGeometry~SimpleGeometry} geometry Geometry.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
* @param {Function} renderer Renderer.
|
||||
*/
|
||||
VectorContext.prototype.drawCustom = function(geometry, feature, renderer) {};
|
||||
@@ -26,7 +26,7 @@ VectorContext.prototype.drawCustom = function(geometry, feature, renderer) {};
|
||||
/**
|
||||
* 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) {};
|
||||
|
||||
@@ -40,76 +40,76 @@ VectorContext.prototype.setStyle = function(style) {};
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.geom.Circle} circleGeometry Circle geometry.
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {module:ol/geom/Circle~Circle} circleGeometry Circle geometry.
|
||||
* @param {module:ol/Feature~Feature} feature 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.
|
||||
*/
|
||||
VectorContext.prototype.drawFeature = function(feature, style) {};
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.geom.GeometryCollection} geometryCollectionGeometry Geometry
|
||||
* @param {module:ol/geom/GeometryCollection~GeometryCollection} geometryCollectionGeometry Geometry
|
||||
* collection.
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature} feature 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.
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature 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.
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature 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.
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
*/
|
||||
VectorContext.prototype.drawMultiPoint = function(multiPointGeometry, feature) {};
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.geom.MultiPolygon} multiPolygonGeometry MultiPolygon geometry.
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/geom/MultiPolygon~MultiPolygon} multiPolygonGeometry MultiPolygon geometry.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
*/
|
||||
VectorContext.prototype.drawMultiPolygon = function(multiPolygonGeometry, feature) {};
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.geom.Point|ol.render.Feature} pointGeometry Point geometry.
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/geom/Point~Point|ol.render.Feature} pointGeometry Point geometry.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature 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.
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
*/
|
||||
VectorContext.prototype.drawPolygon = function(polygonGeometry, feature) {};
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.geom.Geometry|ol.render.Feature} geometry Geometry.
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/geom/Geometry~Geometry|ol.render.Feature} geometry Geometry.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
*/
|
||||
VectorContext.prototype.drawText = function(geometry, feature) {};
|
||||
|
||||
|
||||
@@ -394,7 +394,7 @@ CanvasImmediateRenderer.prototype.drawRings_ = function(flatCoordinates, offset,
|
||||
* Render a circle geometry into the canvas. Rendering is immediate and uses
|
||||
* the current fill and stroke styles.
|
||||
*
|
||||
* @param {ol.geom.Circle} geometry Circle geometry.
|
||||
* @param {module:ol/geom/Circle~Circle} geometry Circle geometry.
|
||||
* @override
|
||||
* @api
|
||||
*/
|
||||
@@ -450,7 +450,7 @@ CanvasImmediateRenderer.prototype.setStyle = function(style) {
|
||||
* Render a geometry into the canvas. Call
|
||||
* {@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
|
||||
* @api
|
||||
*/
|
||||
@@ -458,28 +458,28 @@ CanvasImmediateRenderer.prototype.drawGeometry = function(geometry) {
|
||||
const type = geometry.getType();
|
||||
switch (type) {
|
||||
case GeometryType.POINT:
|
||||
this.drawPoint(/** @type {ol.geom.Point} */ (geometry));
|
||||
this.drawPoint(/** @type {module:ol/geom/Point~Point} */ (geometry));
|
||||
break;
|
||||
case GeometryType.LINE_STRING:
|
||||
this.drawLineString(/** @type {ol.geom.LineString} */ (geometry));
|
||||
this.drawLineString(/** @type {module:ol/geom/LineString~LineString} */ (geometry));
|
||||
break;
|
||||
case GeometryType.POLYGON:
|
||||
this.drawPolygon(/** @type {ol.geom.Polygon} */ (geometry));
|
||||
this.drawPolygon(/** @type {module:ol/geom/Polygon~Polygon} */ (geometry));
|
||||
break;
|
||||
case GeometryType.MULTI_POINT:
|
||||
this.drawMultiPoint(/** @type {ol.geom.MultiPoint} */ (geometry));
|
||||
this.drawMultiPoint(/** @type {module:ol/geom/MultiPoint~MultiPoint} */ (geometry));
|
||||
break;
|
||||
case GeometryType.MULTI_LINE_STRING:
|
||||
this.drawMultiLineString(/** @type {ol.geom.MultiLineString} */ (geometry));
|
||||
this.drawMultiLineString(/** @type {module:ol/geom/MultiLineString~MultiLineString} */ (geometry));
|
||||
break;
|
||||
case GeometryType.MULTI_POLYGON:
|
||||
this.drawMultiPolygon(/** @type {ol.geom.MultiPolygon} */ (geometry));
|
||||
this.drawMultiPolygon(/** @type {module:ol/geom/MultiPolygon~MultiPolygon} */ (geometry));
|
||||
break;
|
||||
case GeometryType.GEOMETRY_COLLECTION:
|
||||
this.drawGeometryCollection(/** @type {ol.geom.GeometryCollection} */ (geometry));
|
||||
this.drawGeometryCollection(/** @type {module:ol/geom/GeometryCollection~GeometryCollection} */ (geometry));
|
||||
break;
|
||||
case GeometryType.CIRCLE:
|
||||
this.drawCircle(/** @type {ol.geom.Circle} */ (geometry));
|
||||
this.drawCircle(/** @type {module:ol/geom/Circle~Circle} */ (geometry));
|
||||
break;
|
||||
default:
|
||||
}
|
||||
@@ -492,7 +492,7 @@ CanvasImmediateRenderer.prototype.drawGeometry = function(geometry) {
|
||||
* this method is called. If you need `zIndex` support, you should be using an
|
||||
* {@link ol.layer.Vector} instead.
|
||||
*
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
* @param {ol.style.Style} style Style.
|
||||
* @override
|
||||
* @api
|
||||
@@ -511,7 +511,7 @@ CanvasImmediateRenderer.prototype.drawFeature = function(feature, style) {
|
||||
* Render a GeometryCollection to the canvas. Rendering is immediate and
|
||||
* 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
|
||||
*/
|
||||
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
|
||||
* 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
|
||||
*/
|
||||
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
|
||||
* 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
|
||||
*/
|
||||
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
|
||||
* 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
|
||||
*/
|
||||
CanvasImmediateRenderer.prototype.drawLineString = function(geometry) {
|
||||
@@ -591,7 +591,7 @@ CanvasImmediateRenderer.prototype.drawLineString = function(geometry) {
|
||||
* Render a MultiLineString geometry into the canvas. Rendering is immediate
|
||||
* 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.
|
||||
* @override
|
||||
*/
|
||||
@@ -624,7 +624,7 @@ CanvasImmediateRenderer.prototype.drawMultiLineString = function(geometry) {
|
||||
* Render a Polygon geometry into the canvas. Rendering is immediate and uses
|
||||
* 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
|
||||
*/
|
||||
CanvasImmediateRenderer.prototype.drawPolygon = function(geometry) {
|
||||
@@ -659,7 +659,7 @@ CanvasImmediateRenderer.prototype.drawPolygon = function(geometry) {
|
||||
/**
|
||||
* Render MultiPolygon geometry into the canvas. Rendering is immediate and
|
||||
* uses the current style.
|
||||
* @param {ol.geom.MultiPolygon} geometry MultiPolygon geometry.
|
||||
* @param {module:ol/geom/MultiPolygon~MultiPolygon} geometry MultiPolygon geometry.
|
||||
* @override
|
||||
*/
|
||||
CanvasImmediateRenderer.prototype.drawMultiPolygon = function(geometry) {
|
||||
|
||||
@@ -201,7 +201,7 @@ CanvasPolygonReplay.prototype.finish = function() {
|
||||
|
||||
/**
|
||||
* @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) {
|
||||
const state = this.state;
|
||||
|
||||
@@ -407,7 +407,7 @@ CanvasReplay.prototype.drawCustom = function(geometry, feature, renderer) {
|
||||
let flatCoordinates, replayEnd, replayEnds, replayEndss;
|
||||
let offset;
|
||||
if (type == GeometryType.MULTI_POLYGON) {
|
||||
geometry = /** @type {ol.geom.MultiPolygon} */ (geometry);
|
||||
geometry = /** @type {module:ol/geom/MultiPolygon~MultiPolygon} */ (geometry);
|
||||
flatCoordinates = geometry.getOrientedFlatCoordinates();
|
||||
replayEndss = [];
|
||||
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) {
|
||||
replayEnds = [];
|
||||
flatCoordinates = (type == GeometryType.POLYGON) ?
|
||||
/** @type {ol.geom.Polygon} */ (geometry).getOrientedFlatCoordinates() :
|
||||
/** @type {module:ol/geom/Polygon~Polygon} */ (geometry).getOrientedFlatCoordinates() :
|
||||
geometry.getFlatCoordinates();
|
||||
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);
|
||||
this.instructions.push([CanvasInstruction.CUSTOM,
|
||||
replayBegin, replayEnds, geometry, renderer, inflateCoordinatesArray]);
|
||||
@@ -448,8 +448,8 @@ CanvasReplay.prototype.drawCustom = function(geometry, feature, renderer) {
|
||||
|
||||
/**
|
||||
* @protected
|
||||
* @param {ol.geom.Geometry|ol.render.Feature} geometry Geometry.
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/geom/Geometry~Geometry|ol.render.Feature} geometry Geometry.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
*/
|
||||
CanvasReplay.prototype.beginGeometry = function(geometry, feature) {
|
||||
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.Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
*/
|
||||
CanvasReplay.prototype.renderDeclutter_ = function(declutterGroup, feature) {
|
||||
if (declutterGroup && declutterGroup.length > 5) {
|
||||
@@ -538,7 +538,7 @@ CanvasReplay.prototype.renderDeclutter_ = function(declutterGroup, feature) {
|
||||
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
|
||||
* to skip.
|
||||
* @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.
|
||||
* @param {module:ol/extent~Extent=} opt_hitExtent Only check features that intersect this
|
||||
* extent.
|
||||
@@ -584,14 +584,14 @@ CanvasReplay.prototype.replay_ = function(
|
||||
// When the batch size gets too big, performance decreases. 200 is a good
|
||||
// balance between batch size and number of fill/stroke instructions.
|
||||
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;
|
||||
while (i < ii) {
|
||||
const instruction = instructions[i];
|
||||
const type = /** @type {ol.render.canvas.Instruction} */ (instruction[0]);
|
||||
switch (type) {
|
||||
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 &&
|
||||
skippedFeaturesHash[getUid(feature).toString()]) ||
|
||||
!feature.getGeometry()) {
|
||||
@@ -638,7 +638,7 @@ CanvasReplay.prototype.replay_ = function(
|
||||
case CanvasInstruction.CUSTOM:
|
||||
d = /** @type {number} */ (instruction[1]);
|
||||
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 fn = instruction.length == 6 ? instruction[5] : undefined;
|
||||
state.geometry = geometry;
|
||||
@@ -760,7 +760,7 @@ CanvasReplay.prototype.replay_ = function(
|
||||
break;
|
||||
case CanvasInstruction.END_GEOMETRY:
|
||||
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);
|
||||
if (result) {
|
||||
return result;
|
||||
@@ -870,7 +870,7 @@ CanvasReplay.prototype.replay = function(
|
||||
* @param {number} viewRotation View rotation.
|
||||
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
|
||||
* 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.
|
||||
* @param {module:ol/extent~Extent=} opt_hitExtent Only check features that intersect this
|
||||
* extent.
|
||||
@@ -967,7 +967,7 @@ CanvasReplay.prototype.setFillStrokeStyle = function(fillStyle, strokeStyle) {
|
||||
|
||||
/**
|
||||
* @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.
|
||||
*/
|
||||
CanvasReplay.prototype.createFill = function(state, geometry) {
|
||||
@@ -1005,8 +1005,8 @@ CanvasReplay.prototype.createStroke = function(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 {ol.geom.Geometry|ol.render.Feature} geometry Geometry.
|
||||
* @param {function(this:ol.render.canvas.Replay, ol.CanvasFillStrokeState, (module:ol/geom/Geometry~Geometry|ol.render.Feature)):Array.<*>} createFill Create fill.
|
||||
* @param {module:ol/geom/Geometry~Geometry|ol.render.Feature} geometry Geometry.
|
||||
*/
|
||||
CanvasReplay.prototype.updateFillStyle = function(state, createFill, geometry) {
|
||||
const fillStyle = state.fillStyle;
|
||||
@@ -1053,8 +1053,8 @@ CanvasReplay.prototype.updateStrokeStyle = function(state, applyStroke) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.geom.Geometry|ol.render.Feature} geometry Geometry.
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/geom/Geometry~Geometry|ol.render.Feature} geometry Geometry.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
*/
|
||||
CanvasReplay.prototype.endGeometry = function(geometry, feature) {
|
||||
this.beginGeometryInstruction1_[2] = this.instructions.length;
|
||||
|
||||
@@ -288,7 +288,7 @@ CanvasReplayGroup.prototype.finish = function() {
|
||||
* @param {number} hitTolerance Hit tolerance in pixels.
|
||||
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
|
||||
* 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.
|
||||
* @param {Object.<string, ol.DeclutterGroup>} declutterReplays Declutter
|
||||
* replays.
|
||||
@@ -335,7 +335,7 @@ CanvasReplayGroup.prototype.forEachFeatureAtCoordinate = function(
|
||||
let replayType;
|
||||
|
||||
/**
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
* @return {?} Callback result.
|
||||
*/
|
||||
function featureCallback(feature) {
|
||||
|
||||
@@ -226,24 +226,24 @@ CanvasTextReplay.prototype.drawText = function(geometry, feature) {
|
||||
end = flatCoordinates.length;
|
||||
break;
|
||||
case GeometryType.LINE_STRING:
|
||||
flatCoordinates = /** @type {ol.geom.LineString} */ (geometry).getFlatMidpoint();
|
||||
flatCoordinates = /** @type {module:ol/geom/LineString~LineString} */ (geometry).getFlatMidpoint();
|
||||
break;
|
||||
case GeometryType.CIRCLE:
|
||||
flatCoordinates = /** @type {ol.geom.Circle} */ (geometry).getCenter();
|
||||
flatCoordinates = /** @type {module:ol/geom/Circle~Circle} */ (geometry).getCenter();
|
||||
break;
|
||||
case GeometryType.MULTI_LINE_STRING:
|
||||
flatCoordinates = /** @type {ol.geom.MultiLineString} */ (geometry).getFlatMidpoints();
|
||||
flatCoordinates = /** @type {module:ol/geom/MultiLineString~MultiLineString} */ (geometry).getFlatMidpoints();
|
||||
end = flatCoordinates.length;
|
||||
break;
|
||||
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) {
|
||||
return;
|
||||
}
|
||||
stride = 3;
|
||||
break;
|
||||
case GeometryType.MULTI_POLYGON:
|
||||
const interiorPoints = /** @type {ol.geom.MultiPolygon} */ (geometry).getFlatInteriorPoints();
|
||||
const interiorPoints = /** @type {module:ol/geom/MultiPolygon~MultiPolygon} */ (geometry).getFlatInteriorPoints();
|
||||
flatCoordinates = [];
|
||||
for (i = 0, ii = interiorPoints.length; i < ii; i += 3) {
|
||||
if (textState.overflow || interiorPoints[i + 2] / this.resolution >= width) {
|
||||
|
||||
@@ -89,7 +89,7 @@ inherits(WebGLImmediateRenderer, VectorContext);
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
WebGLImmediateRenderer.prototype.drawText_ = function(replayGroup, geometry) {
|
||||
@@ -130,7 +130,7 @@ WebGLImmediateRenderer.prototype.setStyle = function(style) {
|
||||
* Render a geometry into the canvas. Call
|
||||
* {@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
|
||||
* @api
|
||||
*/
|
||||
@@ -138,28 +138,28 @@ WebGLImmediateRenderer.prototype.drawGeometry = function(geometry) {
|
||||
const type = geometry.getType();
|
||||
switch (type) {
|
||||
case GeometryType.POINT:
|
||||
this.drawPoint(/** @type {ol.geom.Point} */ (geometry), null);
|
||||
this.drawPoint(/** @type {module:ol/geom/Point~Point} */ (geometry), null);
|
||||
break;
|
||||
case GeometryType.LINE_STRING:
|
||||
this.drawLineString(/** @type {ol.geom.LineString} */ (geometry), null);
|
||||
this.drawLineString(/** @type {module:ol/geom/LineString~LineString} */ (geometry), null);
|
||||
break;
|
||||
case GeometryType.POLYGON:
|
||||
this.drawPolygon(/** @type {ol.geom.Polygon} */ (geometry), null);
|
||||
this.drawPolygon(/** @type {module:ol/geom/Polygon~Polygon} */ (geometry), null);
|
||||
break;
|
||||
case GeometryType.MULTI_POINT:
|
||||
this.drawMultiPoint(/** @type {ol.geom.MultiPoint} */ (geometry), null);
|
||||
this.drawMultiPoint(/** @type {module:ol/geom/MultiPoint~MultiPoint} */ (geometry), null);
|
||||
break;
|
||||
case GeometryType.MULTI_LINE_STRING:
|
||||
this.drawMultiLineString(/** @type {ol.geom.MultiLineString} */ (geometry), null);
|
||||
this.drawMultiLineString(/** @type {module:ol/geom/MultiLineString~MultiLineString} */ (geometry), null);
|
||||
break;
|
||||
case GeometryType.MULTI_POLYGON:
|
||||
this.drawMultiPolygon(/** @type {ol.geom.MultiPolygon} */ (geometry), null);
|
||||
this.drawMultiPolygon(/** @type {module:ol/geom/MultiPolygon~MultiPolygon} */ (geometry), null);
|
||||
break;
|
||||
case GeometryType.GEOMETRY_COLLECTION:
|
||||
this.drawGeometryCollection(/** @type {ol.geom.GeometryCollection} */ (geometry), null);
|
||||
this.drawGeometryCollection(/** @type {module:ol/geom/GeometryCollection~GeometryCollection} */ (geometry), null);
|
||||
break;
|
||||
case GeometryType.CIRCLE:
|
||||
this.drawCircle(/** @type {ol.geom.Circle} */ (geometry), null);
|
||||
this.drawCircle(/** @type {module:ol/geom/Circle~Circle} */ (geometry), null);
|
||||
break;
|
||||
default:
|
||||
// pass
|
||||
|
||||
@@ -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.
|
||||
*/
|
||||
WebGLLineStringReplay.prototype.setPolygonStyle = function(feature, opt_index) {
|
||||
|
||||
@@ -95,7 +95,7 @@ const WebGLReplay = function(tolerance, maxExtent) {
|
||||
/**
|
||||
* Start index per feature (the feature).
|
||||
* @protected
|
||||
* @type {Array.<ol.Feature|ol.render.Feature>}
|
||||
* @type {Array.<module:ol/Feature~Feature|ol.render.Feature>}
|
||||
*/
|
||||
this.startIndicesFeature = [];
|
||||
|
||||
@@ -184,7 +184,7 @@ WebGLReplay.prototype.drawReplay = function(gl, context, skippedFeaturesHash, hi
|
||||
* @param {ol.webgl.Context} context Context.
|
||||
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
|
||||
* 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
|
||||
* this extent are checked.
|
||||
* @return {T|undefined} Callback result.
|
||||
@@ -199,7 +199,7 @@ WebGLReplay.prototype.drawHitDetectionReplayOneByOne = function(gl, context, ski
|
||||
* @param {ol.webgl.Context} context Context.
|
||||
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
|
||||
* 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 {module:ol/extent~Extent=} opt_hitExtent Hit extent: Only features intersecting
|
||||
* this extent are checked.
|
||||
@@ -226,7 +226,7 @@ WebGLReplay.prototype.drawHitDetectionReplay = function(gl, context, skippedFeat
|
||||
* @param {ol.webgl.Context} context Context.
|
||||
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
|
||||
* 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.
|
||||
* @template T
|
||||
*/
|
||||
@@ -254,7 +254,7 @@ WebGLReplay.prototype.drawHitDetectionReplayAll = function(gl, context, skippedF
|
||||
* @param {number} opacity Global opacity.
|
||||
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
|
||||
* 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 {module:ol/extent~Extent=} opt_hitExtent Hit extent: Only features intersecting
|
||||
* this extent are checked.
|
||||
|
||||
@@ -195,7 +195,7 @@ WebGLReplayGroup.prototype.replay = function(context,
|
||||
* @param {number} opacity Global opacity.
|
||||
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
|
||||
* 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 {module:ol/extent~Extent=} opt_hitExtent Hit extent: Only features intersecting
|
||||
* this extent are checked.
|
||||
@@ -241,7 +241,7 @@ WebGLReplayGroup.prototype.replayHitDetection_ = function(context,
|
||||
* @param {number} opacity Global opacity.
|
||||
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
|
||||
* 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.
|
||||
* @template T
|
||||
*/
|
||||
@@ -268,7 +268,7 @@ WebGLReplayGroup.prototype.forEachFeatureAtCoordinate = function(
|
||||
coordinate, resolution, rotation, HIT_DETECTION_SIZE,
|
||||
pixelRatio, opacity, skippedFeaturesHash,
|
||||
/**
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
* @return {?} Callback result.
|
||||
*/
|
||||
function(feature) {
|
||||
@@ -309,7 +309,7 @@ WebGLReplayGroup.prototype.hasFeatureAtCoordinate = function(
|
||||
coordinate, resolution, rotation, HIT_DETECTION_SIZE,
|
||||
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?
|
||||
*/
|
||||
function(feature) {
|
||||
|
||||
@@ -136,20 +136,20 @@ WebGLTextReplay.prototype.drawText = function(geometry, feature) {
|
||||
stride = geometry.getStride();
|
||||
break;
|
||||
case GeometryType.CIRCLE:
|
||||
flatCoordinates = /** @type {ol.geom.Circle} */ (geometry).getCenter();
|
||||
flatCoordinates = /** @type {module:ol/geom/Circle~Circle} */ (geometry).getCenter();
|
||||
break;
|
||||
case GeometryType.LINE_STRING:
|
||||
flatCoordinates = /** @type {ol.geom.LineString} */ (geometry).getFlatMidpoint();
|
||||
flatCoordinates = /** @type {module:ol/geom/LineString~LineString} */ (geometry).getFlatMidpoint();
|
||||
break;
|
||||
case GeometryType.MULTI_LINE_STRING:
|
||||
flatCoordinates = /** @type {ol.geom.MultiLineString} */ (geometry).getFlatMidpoints();
|
||||
flatCoordinates = /** @type {module:ol/geom/MultiLineString~MultiLineString} */ (geometry).getFlatMidpoints();
|
||||
end = flatCoordinates.length;
|
||||
break;
|
||||
case GeometryType.POLYGON:
|
||||
flatCoordinates = /** @type {ol.geom.Polygon} */ (geometry).getFlatInteriorPoint();
|
||||
flatCoordinates = /** @type {module:ol/geom/Polygon~Polygon} */ (geometry).getFlatInteriorPoint();
|
||||
break;
|
||||
case GeometryType.MULTI_POLYGON:
|
||||
flatCoordinates = /** @type {ol.geom.MultiPolygon} */ (geometry).getFlatInteriorPoints();
|
||||
flatCoordinates = /** @type {module:ol/geom/MultiPolygon~MultiPolygon} */ (geometry).getFlatInteriorPoints();
|
||||
end = flatCoordinates.length;
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -36,7 +36,7 @@ inherits(LayerRenderer, Observable);
|
||||
* @param {module:ol/coordinate~Coordinate} coordinate Coordinate.
|
||||
* @param {olx.FrameState} frameState Frame state.
|
||||
* @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.
|
||||
* @param {S} thisArg Value to use as `this` when executing `callback`.
|
||||
* @return {T|undefined} Callback result.
|
||||
@@ -56,10 +56,10 @@ LayerRenderer.prototype.hasFeatureAtCoordinate = FALSE;
|
||||
/**
|
||||
* Create a function that adds loaded tiles to the tile lookup.
|
||||
* @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
|
||||
* 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
|
||||
* lookup.
|
||||
* @protected
|
||||
@@ -68,7 +68,7 @@ LayerRenderer.prototype.createLoadedTileFinder = function(source, projection, ti
|
||||
return (
|
||||
/**
|
||||
* @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.
|
||||
*/
|
||||
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 {number} z Z.
|
||||
* @param {ol.TileRange} tileRange Tile range.
|
||||
* @param {module:ol/TileRange~TileRange} tileRange Tile range.
|
||||
* @protected
|
||||
*/
|
||||
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.tilegrid.TileGrid} tileGrid Tile grid.
|
||||
* @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 {number} currentZ Current Z.
|
||||
* @param {number} preload Load low resolution tiles up to 'preload' levels.
|
||||
|
||||
@@ -90,7 +90,7 @@ function expireIconCache(map, frameState) {
|
||||
* @param {module:ol/coordinate~Coordinate} coordinate Coordinate.
|
||||
* @param {olx.FrameState} frameState FrameState.
|
||||
* @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.
|
||||
* @param {S} thisArg Value to use as `this` when executing `callback`.
|
||||
* @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;
|
||||
|
||||
/**
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
* @param {ol.layer.Layer} layer Layer.
|
||||
* @return {?} Callback result.
|
||||
*/
|
||||
|
||||
@@ -107,7 +107,7 @@ IntermediateCanvasRenderer.prototype.forEachFeatureAtCoordinate = function(coord
|
||||
return source.forEachFeatureAtCoordinate(
|
||||
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.
|
||||
*/
|
||||
function(feature) {
|
||||
|
||||
@@ -60,7 +60,7 @@ const CanvasTileLayerRenderer = function(tileLayer) {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {ol.TileRange}
|
||||
* @type {module:ol/TileRange~TileRange}
|
||||
*/
|
||||
this.tmpTileRange_ = new TileRange(0, 0, 0, 0);
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ const CanvasVectorLayerRenderer = function(vectorLayer) {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {function(ol.Feature, ol.Feature): number|null}
|
||||
* @type {function(module:ol/Feature~Feature, module:ol/Feature~Feature): number|null}
|
||||
*/
|
||||
this.renderedRenderOrder_ = null;
|
||||
|
||||
@@ -257,7 +257,7 @@ CanvasVectorLayerRenderer.prototype.forEachFeatureAtCoordinate = function(coordi
|
||||
const features = {};
|
||||
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.
|
||||
*/
|
||||
function(feature) {
|
||||
@@ -358,7 +358,7 @@ CanvasVectorLayerRenderer.prototype.prepareFrame = function(frameState, layerSta
|
||||
pixelRatio, vectorSource.getOverlaps(), this.declutterTree_, vectorLayer.getRenderBuffer());
|
||||
vectorSource.loadFeatures(extent, resolution, projection);
|
||||
/**
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
* @this {ol.renderer.canvas.VectorLayer}
|
||||
*/
|
||||
const render = function(feature) {
|
||||
@@ -374,11 +374,11 @@ CanvasVectorLayerRenderer.prototype.prepareFrame = function(frameState, layerSta
|
||||
}
|
||||
}.bind(this);
|
||||
if (vectorLayerRenderOrder) {
|
||||
/** @type {Array.<ol.Feature>} */
|
||||
/** @type {Array.<module:ol/Feature~Feature>} */
|
||||
const features = [];
|
||||
vectorSource.forEachFeatureInExtent(extent,
|
||||
/**
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
*/
|
||||
function(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} pixelRatio Pixel ratio.
|
||||
* @param {(ol.style.Style|Array.<ol.style.Style>)} styles The style or array of
|
||||
|
||||
@@ -197,7 +197,7 @@ CanvasVectorTileLayerRenderer.prototype.createReplayGroup_ = function(tile, fram
|
||||
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}
|
||||
*/
|
||||
const render = function(feature) {
|
||||
@@ -292,7 +292,7 @@ CanvasVectorTileLayerRenderer.prototype.forEachFeatureAtCoordinate = function(co
|
||||
replayGroup = sourceTile.getReplayGroup(layer, tile.tileCoord.toString());
|
||||
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.
|
||||
*/
|
||||
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 {(ol.style.Style|Array.<ol.style.Style>)} styles The style or array of
|
||||
* styles.
|
||||
|
||||
@@ -16,8 +16,8 @@ const SIMPLIFY_TOLERANCE = 0.5;
|
||||
|
||||
/**
|
||||
* @const
|
||||
* @type {Object.<ol.geom.GeometryType,
|
||||
* function(ol.render.ReplayGroup, ol.geom.Geometry,
|
||||
* @type {Object.<module:ol/geom/GeometryType~GeometryType,
|
||||
* function(ol.render.ReplayGroup, module:ol/geom/Geometry~Geometry,
|
||||
* ol.style.Style, Object)>}
|
||||
*/
|
||||
const GEOMETRY_RENDERERS = {
|
||||
@@ -33,8 +33,8 @@ const GEOMETRY_RENDERERS = {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.Feature|ol.render.Feature} feature1 Feature 1.
|
||||
* @param {ol.Feature|ol.render.Feature} feature2 Feature 2.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature1 Feature 1.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature2 Feature 2.
|
||||
* @return {number} Order.
|
||||
*/
|
||||
export function defaultOrder(feature1, feature2) {
|
||||
@@ -65,9 +65,9 @@ export function getTolerance(resolution, pixelRatio) {
|
||||
|
||||
/**
|
||||
* @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.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
*/
|
||||
function renderCircleGeometry(replayGroup, geometry, style, feature) {
|
||||
const fillStyle = style.getFill();
|
||||
@@ -88,7 +88,7 @@ function renderCircleGeometry(replayGroup, geometry, style, feature) {
|
||||
|
||||
/**
|
||||
* @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 {number} squaredTolerance Squared tolerance.
|
||||
* @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.Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
* @param {ol.style.Style} style Style.
|
||||
* @param {number} squaredTolerance Squared tolerance.
|
||||
*/
|
||||
@@ -142,28 +142,28 @@ function renderFeatureInternal(replayGroup, feature, style, squaredTolerance) {
|
||||
|
||||
/**
|
||||
* @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.Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
*/
|
||||
function renderGeometry(replayGroup, geometry, style, feature) {
|
||||
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) {
|
||||
renderGeometry(replayGroup, geometries[i], style, feature);
|
||||
}
|
||||
return;
|
||||
}
|
||||
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.geom.GeometryCollection} geometry Geometry.
|
||||
* @param {module:ol/geom/GeometryCollection~GeometryCollection} geometry Geometry.
|
||||
* @param {ol.style.Style} style Style.
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
*/
|
||||
function renderGeometryCollectionGeometry(replayGroup, geometry, style, feature) {
|
||||
const geometries = geometry.getGeometriesArray();
|
||||
@@ -178,9 +178,9 @@ function renderGeometryCollectionGeometry(replayGroup, geometry, style, feature)
|
||||
|
||||
/**
|
||||
* @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.Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
*/
|
||||
function renderLineStringGeometry(replayGroup, geometry, style, feature) {
|
||||
const strokeStyle = style.getStroke();
|
||||
@@ -200,9 +200,9 @@ function renderLineStringGeometry(replayGroup, geometry, style, feature) {
|
||||
|
||||
/**
|
||||
* @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.Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
*/
|
||||
function renderMultiLineStringGeometry(replayGroup, geometry, style, feature) {
|
||||
const strokeStyle = style.getStroke();
|
||||
@@ -222,9 +222,9 @@ function renderMultiLineStringGeometry(replayGroup, geometry, style, feature) {
|
||||
|
||||
/**
|
||||
* @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.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
*/
|
||||
function renderMultiPolygonGeometry(replayGroup, geometry, style, feature) {
|
||||
const fillStyle = style.getFill();
|
||||
@@ -245,9 +245,9 @@ function renderMultiPolygonGeometry(replayGroup, geometry, style, feature) {
|
||||
|
||||
/**
|
||||
* @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.Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
*/
|
||||
function renderPointGeometry(replayGroup, geometry, style, feature) {
|
||||
const imageStyle = style.getImage();
|
||||
@@ -270,9 +270,9 @@ function renderPointGeometry(replayGroup, geometry, style, feature) {
|
||||
|
||||
/**
|
||||
* @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.Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
*/
|
||||
function renderMultiPointGeometry(replayGroup, geometry, style, feature) {
|
||||
const imageStyle = style.getImage();
|
||||
@@ -295,9 +295,9 @@ function renderMultiPointGeometry(replayGroup, geometry, style, feature) {
|
||||
|
||||
/**
|
||||
* @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.Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
*/
|
||||
function renderPolygonGeometry(replayGroup, geometry, style, feature) {
|
||||
const fillStyle = style.getFill();
|
||||
|
||||
@@ -116,7 +116,7 @@ WebGLImageLayerRenderer.prototype.forEachFeatureAtCoordinate = function(coordina
|
||||
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.
|
||||
*/
|
||||
function(feature) {
|
||||
|
||||
@@ -68,7 +68,7 @@ const WebGLTileLayerRenderer = function(mapRenderer, tileLayer) {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {ol.TileRange}
|
||||
* @type {module:ol/TileRange~TileRange}
|
||||
*/
|
||||
this.renderedTileRange_ = null;
|
||||
|
||||
@@ -139,7 +139,7 @@ WebGLTileLayerRenderer.prototype.createLoadedTileFinder = function(source, proje
|
||||
return (
|
||||
/**
|
||||
* @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.
|
||||
*/
|
||||
function(zoom, tileRange) {
|
||||
|
||||
@@ -48,7 +48,7 @@ const WebGLVectorLayerRenderer = function(mapRenderer, vectorLayer) {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {function(ol.Feature, ol.Feature): number|null}
|
||||
* @type {function(module:ol/Feature~Feature, module:ol/Feature~Feature): number|null}
|
||||
*/
|
||||
this.renderedRenderOrder_ = null;
|
||||
|
||||
@@ -150,7 +150,7 @@ WebGLVectorLayerRenderer.prototype.forEachFeatureAtCoordinate = function(coordin
|
||||
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.
|
||||
*/
|
||||
function(feature) {
|
||||
@@ -261,7 +261,7 @@ WebGLVectorLayerRenderer.prototype.prepareFrame = function(frameState, layerStat
|
||||
extent, vectorLayer.getRenderBuffer());
|
||||
vectorSource.loadFeatures(extent, resolution, projection);
|
||||
/**
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
* @this {ol.renderer.webgl.VectorLayer}
|
||||
*/
|
||||
const render = function(feature) {
|
||||
@@ -277,11 +277,11 @@ WebGLVectorLayerRenderer.prototype.prepareFrame = function(frameState, layerStat
|
||||
}
|
||||
};
|
||||
if (vectorLayerRenderOrder) {
|
||||
/** @type {Array.<ol.Feature>} */
|
||||
/** @type {Array.<module:ol/Feature~Feature>} */
|
||||
const features = [];
|
||||
vectorSource.forEachFeatureInExtent(extent,
|
||||
/**
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
*/
|
||||
function(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} pixelRatio Pixel ratio.
|
||||
* @param {(ol.style.Style|Array.<ol.style.Style>)} styles The style or array of
|
||||
|
||||
@@ -18,8 +18,8 @@ import Triangulation from '../reproj/Triangulation.js';
|
||||
*
|
||||
* @constructor
|
||||
* @extends {ol.ImageBase}
|
||||
* @param {ol.proj.Projection} sourceProj Source projection (of the data).
|
||||
* @param {ol.proj.Projection} targetProj Target projection.
|
||||
* @param {module:ol/proj/Projection~Projection} sourceProj Source projection (of the data).
|
||||
* @param {module:ol/proj/Projection~Projection} targetProj Target projection.
|
||||
* @param {module:ol/extent~Extent} targetExtent Target extent.
|
||||
* @param {number} targetResolution Target resolution.
|
||||
* @param {number} pixelRatio Pixel ratio.
|
||||
@@ -31,7 +31,7 @@ const ReprojImage = function(sourceProj, targetProj,
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {ol.proj.Projection}
|
||||
* @type {module:ol/proj/Projection~Projection}
|
||||
*/
|
||||
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() {
|
||||
return this.targetProj_;
|
||||
|
||||
@@ -19,9 +19,9 @@ import Triangulation from '../reproj/Triangulation.js';
|
||||
*
|
||||
* @constructor
|
||||
* @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.proj.Projection} targetProj Target projection.
|
||||
* @param {module:ol/proj/Projection~Projection} targetProj Target projection.
|
||||
* @param {ol.tilegrid.TileGrid} targetTileGrid Target tile grid.
|
||||
* @param {module:ol/tilecoord~TileCoord} tileCoord Coordinate of the tile.
|
||||
* @param {module:ol/tilecoord~TileCoord} wrappedTileCoord Coordinate of the tile wrapped in X.
|
||||
|
||||
@@ -33,8 +33,8 @@ const MAX_TRIANGLE_WIDTH = 0.25;
|
||||
* Class containing triangulation of the given target extent.
|
||||
* Used for determining source data and the reprojection itself.
|
||||
*
|
||||
* @param {ol.proj.Projection} sourceProj Source projection.
|
||||
* @param {ol.proj.Projection} targetProj Target projection.
|
||||
* @param {module:ol/proj/Projection~Projection} sourceProj Source 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} maxSourceExtent Maximal source extent that can be used.
|
||||
* @param {number} errorThreshold Acceptable error (in source units).
|
||||
@@ -44,13 +44,13 @@ const Triangulation = function(sourceProj, targetProj, targetExtent,
|
||||
maxSourceExtent, errorThreshold) {
|
||||
|
||||
/**
|
||||
* @type {ol.proj.Projection}
|
||||
* @type {module:ol/proj/Projection~Projection}
|
||||
* @private
|
||||
*/
|
||||
this.sourceProj_ = sourceProj;
|
||||
|
||||
/**
|
||||
* @type {ol.proj.Projection}
|
||||
* @type {module:ol/proj/Projection~Projection}
|
||||
* @private
|
||||
*/
|
||||
this.targetProj_ = targetProj;
|
||||
|
||||
@@ -151,7 +151,7 @@ BingMaps.prototype.handleImageryMetadataResponse = function(response) {
|
||||
/**
|
||||
* @param {module:ol/tilecoord~TileCoord} tileCoord Tile coordinate.
|
||||
* @param {number} pixelRatio Pixel ratio.
|
||||
* @param {ol.proj.Projection} projection Projection.
|
||||
* @param {module:ol/proj/Projection~Projection} projection Projection.
|
||||
* @return {string|undefined} Tile URL.
|
||||
*/
|
||||
function(tileCoord, pixelRatio, projection) {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user