Module types for ol/geom
This commit is contained in:
@@ -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) {
|
||||
@@ -254,7 +254,7 @@ Circle.prototype.setRadius = function(radius) {
|
||||
* string identifier or a {@link ol.proj.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
|
||||
* @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() {};
|
||||
|
||||
@@ -249,7 +249,7 @@ Geometry.prototype.translate = function(deltaX, deltaY) {};
|
||||
* string identifier or a {@link ol.proj.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
|
||||
* @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) {
|
||||
|
||||
+11
-11
@@ -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) {
|
||||
|
||||
+14
-14
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user