Get rid of olx.js and typedef.js typedefs for ol

This commit is contained in:
Andreas Hocevar
2018-03-08 18:42:57 +01:00
parent 8f0ffe2043
commit 95d6251dbb
198 changed files with 2262 additions and 2698 deletions
+9 -9
View File
@@ -14,7 +14,7 @@ import {deflateCoordinate} from '../geom/flat/deflate.js';
*
* @constructor
* @extends {ol.geom.SimpleGeometry}
* @param {ol.Coordinate} center Center.
* @param {module:ol/coordinate~Coordinate} center Center.
* @param {number=} opt_radius Radius.
* @param {ol.geom.GeometryLayout=} opt_layout Layout.
* @api
@@ -82,8 +82,8 @@ Circle.prototype.containsXY = function(x, y) {
/**
* Return the center of the circle as {@link ol.Coordinate coordinate}.
* @return {ol.Coordinate} Center.
* Return the center of the circle as {@link module:ol/coordinate~Coordinate coordinate}.
* @return {module:ol/coordinate~Coordinate} Center.
* @api
*/
Circle.prototype.getCenter = function() {
@@ -158,8 +158,8 @@ Circle.prototype.intersectsExtent = function(extent) {
/**
* Set the center of the circle as {@link ol.Coordinate coordinate}.
* @param {ol.Coordinate} center Center.
* Set the center of the circle as {@link module:ol/coordinate~Coordinate coordinate}.
* @param {module:ol/coordinate~Coordinate} center Center.
* @api
*/
Circle.prototype.setCenter = function(center) {
@@ -175,9 +175,9 @@ Circle.prototype.setCenter = function(center) {
/**
* Set the center (as {@link ol.Coordinate coordinate}) and the radius (as
* Set the center (as {@link module:ol/coordinate~Coordinate coordinate}) and the radius (as
* number) of the circle.
* @param {ol.Coordinate} center Center.
* @param {module:ol/coordinate~Coordinate} center Center.
* @param {number} radius Radius.
* @param {ol.geom.GeometryLayout=} opt_layout Layout.
* @api
@@ -250,9 +250,9 @@ Circle.prototype.setRadius = function(radius) {
* correspond to the shape that would be obtained by transforming every point
* of the original circle.
*
* @param {ol.ProjectionLike} source The current projection. Can be a
* @param {module:ol/proj~ProjectionLike} source The current projection. Can be a
* string identifier or a {@link ol.proj.Projection} object.
* @param {ol.ProjectionLike} destination The desired projection. Can be a
* @param {module:ol/proj~ProjectionLike} destination The desired projection. Can be a
* string identifier or a {@link ol.proj.Projection} object.
* @return {ol.geom.Circle} This geometry. Note that original geometry is
* modified in place.
+18 -18
View File
@@ -30,7 +30,7 @@ const Geometry = function() {
/**
* @private
* @type {ol.Extent}
* @type {module:ol/extent~Extent}
*/
this.extent_ = createEmpty();
@@ -60,7 +60,7 @@ const Geometry = function() {
/**
* @private
* @type {ol.Transform}
* @type {module:ol/transform~Transform}
*/
this.tmpTransform_ = createTransform();
@@ -81,7 +81,7 @@ Geometry.prototype.clone = function() {};
* @abstract
* @param {number} x X.
* @param {number} y Y.
* @param {ol.Coordinate} closestPoint Closest point.
* @param {module:ol/coordinate~Coordinate} closestPoint Closest point.
* @param {number} minSquaredDistance Minimum squared distance.
* @return {number} Minimum squared distance.
*/
@@ -90,10 +90,10 @@ Geometry.prototype.closestPointXY = function(x, y, closestPoint, minSquaredDista
/**
* Return the closest point of the geometry to the passed point as
* {@link ol.Coordinate coordinate}.
* @param {ol.Coordinate} point Point.
* @param {ol.Coordinate=} opt_closestPoint Closest point.
* @return {ol.Coordinate} Closest point.
* {@link module:ol/coordinate~Coordinate coordinate}.
* @param {module:ol/coordinate~Coordinate} point Point.
* @param {module:ol/coordinate~Coordinate=} opt_closestPoint Closest point.
* @return {module:ol/coordinate~Coordinate} Closest point.
* @api
*/
Geometry.prototype.getClosestPoint = function(point, opt_closestPoint) {
@@ -106,7 +106,7 @@ Geometry.prototype.getClosestPoint = function(point, opt_closestPoint) {
/**
* Returns true if this geometry includes the specified coordinate. If the
* coordinate is on the boundary of the geometry, returns false.
* @param {ol.Coordinate} coordinate Coordinate.
* @param {module:ol/coordinate~Coordinate} coordinate Coordinate.
* @return {boolean} Contains coordinate.
* @api
*/
@@ -117,9 +117,9 @@ Geometry.prototype.intersectsCoordinate = function(coordinate) {
/**
* @abstract
* @param {ol.Extent} extent Extent.
* @param {module:ol/extent~Extent} extent Extent.
* @protected
* @return {ol.Extent} extent Extent.
* @return {module:ol/extent~Extent} extent Extent.
*/
Geometry.prototype.computeExtent = function(extent) {};
@@ -134,8 +134,8 @@ Geometry.prototype.containsXY = FALSE;
/**
* Get the extent of the geometry.
* @param {ol.Extent=} opt_extent Extent.
* @return {ol.Extent} extent Extent.
* @param {module:ol/extent~Extent=} opt_extent Extent.
* @return {module:ol/extent~Extent} extent Extent.
* @api
*/
Geometry.prototype.getExtent = function(opt_extent) {
@@ -152,7 +152,7 @@ Geometry.prototype.getExtent = function(opt_extent) {
* coordinates in place.
* @abstract
* @param {number} angle Rotation angle in radians.
* @param {ol.Coordinate} anchor The rotation center.
* @param {module:ol/coordinate~Coordinate} anchor The rotation center.
* @api
*/
Geometry.prototype.rotate = function(angle, anchor) {};
@@ -165,7 +165,7 @@ Geometry.prototype.rotate = function(angle, anchor) {};
* @param {number} sx The scaling factor in the x-direction.
* @param {number=} opt_sy The scaling factor in the y-direction (defaults to
* sx).
* @param {ol.Coordinate=} opt_anchor The scale origin (defaults to the center
* @param {module:ol/coordinate~Coordinate=} opt_anchor The scale origin (defaults to the center
* of the geometry extent).
* @api
*/
@@ -214,7 +214,7 @@ Geometry.prototype.getType = function() {};
* If you do not want the geometry modified in place, first `clone()` it and
* then use this function on the clone.
* @abstract
* @param {ol.TransformFunction} transformFn Transform.
* @param {module:ol/proj~TransformFunction} transformFn Transform.
*/
Geometry.prototype.applyTransform = function(transformFn) {};
@@ -222,7 +222,7 @@ Geometry.prototype.applyTransform = function(transformFn) {};
/**
* Test if the geometry and the passed extent intersect.
* @abstract
* @param {ol.Extent} extent Extent.
* @param {module:ol/extent~Extent} extent Extent.
* @return {boolean} `true` if the geometry and the extent intersect.
*/
Geometry.prototype.intersectsExtent = function(extent) {};
@@ -245,9 +245,9 @@ Geometry.prototype.translate = function(deltaX, deltaY) {};
* If you do not want the geometry modified in place, first `clone()` it and
* then use this function on the clone.
*
* @param {ol.ProjectionLike} source The current projection. Can be a
* @param {module:ol/proj~ProjectionLike} source The current projection. Can be a
* string identifier or a {@link ol.proj.Projection} object.
* @param {ol.ProjectionLike} destination The desired projection. Can be a
* @param {module:ol/proj~ProjectionLike} destination The desired projection. Can be a
* string identifier or a {@link ol.proj.Projection} object.
* @return {ol.geom.Geometry} This geometry. Note that original geometry is
* modified in place.
+9 -9
View File
@@ -22,7 +22,7 @@ import {douglasPeucker} from '../geom/flat/simplify.js';
*
* @constructor
* @extends {ol.geom.SimpleGeometry}
* @param {Array.<ol.Coordinate>} coordinates Coordinates.
* @param {Array.<module:ol/coordinate~Coordinate>} coordinates Coordinates.
* @param {ol.geom.GeometryLayout=} opt_layout Layout.
* @api
*/
@@ -32,7 +32,7 @@ const LineString = function(coordinates, opt_layout) {
/**
* @private
* @type {ol.Coordinate}
* @type {module:ol/coordinate~Coordinate}
*/
this.flatMidpoint_ = null;
@@ -63,7 +63,7 @@ inherits(LineString, SimpleGeometry);
/**
* Append the passed coordinate to the coordinates of the linestring.
* @param {ol.Coordinate} coordinate Coordinate.
* @param {module:ol/coordinate~Coordinate} coordinate Coordinate.
* @api
*/
LineString.prototype.appendCoordinate = function(coordinate) {
@@ -112,7 +112,7 @@ LineString.prototype.closestPointXY = function(x, y, closestPoint, minSquaredDis
* If the callback returns a truthy value the function returns that
* value immediately. Otherwise the function returns `false`.
*
* @param {function(this: S, ol.Coordinate, ol.Coordinate): T} callback Function
* @param {function(this: S, module:ol/coordinate~Coordinate, module:ol/coordinate~Coordinate): T} callback Function
* called for each segment.
* @return {T|boolean} Value.
* @template T,S
@@ -134,7 +134,7 @@ LineString.prototype.forEachSegment = function(callback) {
*
* @param {number} m M.
* @param {boolean=} opt_extrapolate Extrapolate. Default is `false`.
* @return {ol.Coordinate} Coordinate.
* @return {module:ol/coordinate~Coordinate} Coordinate.
* @api
*/
LineString.prototype.getCoordinateAtM = function(m, opt_extrapolate) {
@@ -150,7 +150,7 @@ LineString.prototype.getCoordinateAtM = function(m, opt_extrapolate) {
/**
* Return the coordinates of the linestring.
* @return {Array.<ol.Coordinate>} Coordinates.
* @return {Array.<module:ol/coordinate~Coordinate>} Coordinates.
* @override
* @api
*/
@@ -165,9 +165,9 @@ LineString.prototype.getCoordinates = function() {
* The `fraction` is a number between 0 and 1, where 0 is the start of the
* linestring and 1 is the end.
* @param {number} fraction Fraction.
* @param {ol.Coordinate=} opt_dest Optional coordinate whose values will
* @param {module:ol/coordinate~Coordinate=} opt_dest Optional coordinate whose values will
* be modified. If not provided, a new coordinate will be returned.
* @return {ol.Coordinate} Coordinate of the interpolated point.
* @return {module:ol/coordinate~Coordinate} Coordinate of the interpolated point.
* @api
*/
LineString.prototype.getCoordinateAt = function(fraction, opt_dest) {
@@ -237,7 +237,7 @@ LineString.prototype.intersectsExtent = function(extent) {
/**
* Set the coordinates of the linestring.
* @param {Array.<ol.Coordinate>} coordinates Coordinates.
* @param {Array.<module:ol/coordinate~Coordinate>} coordinates Coordinates.
* @param {ol.geom.GeometryLayout=} opt_layout Layout.
* @override
* @api
+3 -3
View File
@@ -19,7 +19,7 @@ import {douglasPeucker} from '../geom/flat/simplify.js';
*
* @constructor
* @extends {ol.geom.SimpleGeometry}
* @param {Array.<ol.Coordinate>} coordinates Coordinates.
* @param {Array.<module:ol/coordinate~Coordinate>} coordinates Coordinates.
* @param {ol.geom.GeometryLayout=} opt_layout Layout.
* @api
*/
@@ -89,7 +89,7 @@ LinearRing.prototype.getArea = function() {
/**
* Return the coordinates of the linear ring.
* @return {Array.<ol.Coordinate>} Coordinates.
* @return {Array.<module:ol/coordinate~Coordinate>} Coordinates.
* @override
* @api
*/
@@ -131,7 +131,7 @@ LinearRing.prototype.intersectsExtent = function(extent) {};
/**
* Set the coordinates of the linear ring.
* @param {Array.<ol.Coordinate>} coordinates Coordinates.
* @param {Array.<module:ol/coordinate~Coordinate>} coordinates Coordinates.
* @param {ol.geom.GeometryLayout=} opt_layout Layout.
* @override
* @api
+4 -4
View File
@@ -21,7 +21,7 @@ import {douglasPeuckerArray} from '../geom/flat/simplify.js';
*
* @constructor
* @extends {ol.geom.SimpleGeometry}
* @param {Array.<Array.<ol.Coordinate>>} coordinates Coordinates.
* @param {Array.<Array.<module:ol/coordinate~Coordinate>>} coordinates Coordinates.
* @param {ol.geom.GeometryLayout=} opt_layout Layout.
* @api
*/
@@ -121,7 +121,7 @@ MultiLineString.prototype.closestPointXY = function(x, y, closestPoint, minSquar
* @param {number} m M.
* @param {boolean=} opt_extrapolate Extrapolate. Default is `false`.
* @param {boolean=} opt_interpolate Interpolate. Default is `false`.
* @return {ol.Coordinate} Coordinate.
* @return {module:ol/coordinate~Coordinate} Coordinate.
* @api
*/
MultiLineString.prototype.getCoordinateAtM = function(m, opt_extrapolate, opt_interpolate) {
@@ -139,7 +139,7 @@ MultiLineString.prototype.getCoordinateAtM = function(m, opt_extrapolate, opt_in
/**
* Return the coordinates of the multilinestring.
* @return {Array.<Array.<ol.Coordinate>>} Coordinates.
* @return {Array.<Array.<module:ol/coordinate~Coordinate>>} Coordinates.
* @override
* @api
*/
@@ -254,7 +254,7 @@ MultiLineString.prototype.intersectsExtent = function(extent) {
/**
* Set the coordinates of the multilinestring.
* @param {Array.<Array.<ol.Coordinate>>} coordinates Coordinates.
* @param {Array.<Array.<module:ol/coordinate~Coordinate>>} coordinates Coordinates.
* @param {ol.geom.GeometryLayout=} opt_layout Layout.
* @override
* @api
+3 -3
View File
@@ -18,7 +18,7 @@ import {squaredDistance as squaredDx} from '../math.js';
*
* @constructor
* @extends {ol.geom.SimpleGeometry}
* @param {Array.<ol.Coordinate>} coordinates Coordinates.
* @param {Array.<module:ol/coordinate~Coordinate>} coordinates Coordinates.
* @param {ol.geom.GeometryLayout=} opt_layout Layout.
* @api
*/
@@ -84,7 +84,7 @@ MultiPoint.prototype.closestPointXY = function(x, y, closestPoint, minSquaredDis
/**
* Return the coordinates of the multipoint.
* @return {Array.<ol.Coordinate>} Coordinates.
* @return {Array.<module:ol/coordinate~Coordinate>} Coordinates.
* @override
* @api
*/
@@ -161,7 +161,7 @@ MultiPoint.prototype.intersectsExtent = function(extent) {
/**
* Set the coordinates of the multipoint.
* @param {Array.<ol.Coordinate>} coordinates Coordinates.
* @param {Array.<module:ol/coordinate~Coordinate>} coordinates Coordinates.
* @param {ol.geom.GeometryLayout=} opt_layout Layout.
* @override
* @api
+3 -3
View File
@@ -26,7 +26,7 @@ import {quantizeMultiArray} from '../geom/flat/simplify.js';
*
* @constructor
* @extends {ol.geom.SimpleGeometry}
* @param {Array.<Array.<Array.<ol.Coordinate>>>} coordinates Coordinates.
* @param {Array.<Array.<Array.<module:ol/coordinate~Coordinate>>>} coordinates Coordinates.
* @param {ol.geom.GeometryLayout=} opt_layout Layout.
* @api
*/
@@ -175,7 +175,7 @@ MultiPolygon.prototype.getArea = function() {
* (clockwise for exterior and counter-clockwise for interior rings).
* By default, coordinate orientation will depend on how the geometry was
* constructed.
* @return {Array.<Array.<Array.<ol.Coordinate>>>} Coordinates.
* @return {Array.<Array.<Array.<module:ol/coordinate~Coordinate>>>} Coordinates.
* @override
* @api
*/
@@ -351,7 +351,7 @@ MultiPolygon.prototype.intersectsExtent = function(extent) {
/**
* Set the coordinates of the multipolygon.
* @param {Array.<Array.<Array.<ol.Coordinate>>>} coordinates Coordinates.
* @param {Array.<Array.<Array.<module:ol/coordinate~Coordinate>>>} coordinates Coordinates.
* @param {ol.geom.GeometryLayout=} opt_layout Layout.
* @override
* @api
+2 -2
View File
@@ -15,7 +15,7 @@ import {squaredDistance as squaredDx} from '../math.js';
*
* @constructor
* @extends {ol.geom.SimpleGeometry}
* @param {ol.Coordinate} coordinates Coordinates.
* @param {module:ol/coordinate~Coordinate} coordinates Coordinates.
* @param {ol.geom.GeometryLayout=} opt_layout Layout.
* @api
*/
@@ -61,7 +61,7 @@ Point.prototype.closestPointXY = function(x, y, closestPoint, minSquaredDistance
/**
* Return the coordinate of the point.
* @return {ol.Coordinate} Coordinates.
* @return {module:ol/coordinate~Coordinate} Coordinates.
* @override
* @api
*/
+7 -7
View File
@@ -27,7 +27,7 @@ import {modulo} from '../math.js';
*
* @constructor
* @extends {ol.geom.SimpleGeometry}
* @param {Array.<Array.<ol.Coordinate>>} coordinates Array of linear
* @param {Array.<Array.<module:ol/coordinate~Coordinate>>} coordinates Array of linear
* rings that define the polygon. The first linear ring of the array
* 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
@@ -54,7 +54,7 @@ const Polygon = function(coordinates, opt_layout) {
/**
* @private
* @type {ol.Coordinate}
* @type {module:ol/coordinate~Coordinate}
*/
this.flatInteriorPoint_ = null;
@@ -165,7 +165,7 @@ Polygon.prototype.getArea = function() {
* (clockwise for exterior and counter-clockwise for interior rings).
* By default, coordinate orientation will depend on how the geometry was
* constructed.
* @return {Array.<Array.<ol.Coordinate>>} Coordinates.
* @return {Array.<Array.<module:ol/coordinate~Coordinate>>} Coordinates.
* @override
* @api
*/
@@ -332,7 +332,7 @@ Polygon.prototype.intersectsExtent = function(extent) {
/**
* Set the coordinates of the polygon.
* @param {Array.<Array.<ol.Coordinate>>} coordinates Coordinates.
* @param {Array.<Array.<module:ol/coordinate~Coordinate>>} coordinates Coordinates.
* @param {ol.geom.GeometryLayout=} opt_layout Layout.
* @override
* @api
@@ -369,7 +369,7 @@ export default Polygon;
/**
* Create an approximation of a circle on the surface of a sphere.
* @param {ol.Coordinate} center Center (`[lon, lat]` in degrees).
* @param {module:ol/coordinate~Coordinate} center Center (`[lon, lat]` in degrees).
* @param {number} radius The great-circle distance from the center to
* the polygon vertices.
* @param {number=} opt_n Optional number of vertices for the resulting
@@ -395,7 +395,7 @@ export function circular(center, radius, opt_n, opt_sphereRadius) {
/**
* Create a polygon from an extent. The layout used is `XY`.
* @param {ol.Extent} extent The extent.
* @param {module:ol/extent~Extent} extent The extent.
* @return {ol.geom.Polygon} The polygon.
* @api
*/
@@ -442,7 +442,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 {ol.Coordinate} center Center of the regular polygon.
* @param {module:ol/coordinate~Coordinate} center Center of the regular polygon.
* @param {number} radius Radius of the regular polygon.
* @param {number=} opt_angle Start angle for the first vertex of the polygon in
* radians. Default is 0.
+3 -3
View File
@@ -104,7 +104,7 @@ SimpleGeometry.prototype.getCoordinates = function() {};
/**
* Return the first coordinate of the geometry.
* @return {ol.Coordinate} First coordinate.
* @return {module:ol/coordinate~Coordinate} First coordinate.
* @api
*/
SimpleGeometry.prototype.getFirstCoordinate = function() {
@@ -122,7 +122,7 @@ SimpleGeometry.prototype.getFlatCoordinates = function() {
/**
* Return the last coordinate of the geometry.
* @return {ol.Coordinate} Last point.
* @return {module:ol/coordinate~Coordinate} Last point.
* @api
*/
SimpleGeometry.prototype.getLastCoordinate = function() {
@@ -317,7 +317,7 @@ SimpleGeometry.prototype.translate = function(deltaX, deltaY) {
/**
* @param {ol.geom.SimpleGeometry} simpleGeometry Simple geometry.
* @param {ol.Transform} transform Transform.
* @param {module:ol/transform~Transform} transform Transform.
* @param {Array.<number>=} opt_dest Destination.
* @return {Array.<number>} Transformed flat coordinates.
*/
+2 -2
View File
@@ -9,13 +9,13 @@ import {forEachCorner} from '../../extent.js';
* @param {number} offset Offset.
* @param {number} end End.
* @param {number} stride Stride.
* @param {ol.Extent} extent Extent.
* @param {module:ol/extent~Extent} extent Extent.
* @return {boolean} Contains extent.
*/
export function linearRingContainsExtent(flatCoordinates, offset, end, stride, extent) {
const outside = forEachCorner(extent,
/**
* @param {ol.Coordinate} coordinate Coordinate.
* @param {module:ol/coordinate~Coordinate} coordinate Coordinate.
* @return {boolean} Contains (x, y).
*/
function(coordinate) {
+4 -4
View File
@@ -6,7 +6,7 @@
/**
* @param {Array.<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {ol.Coordinate} coordinate Coordinate.
* @param {module:ol/coordinate~Coordinate} coordinate Coordinate.
* @param {number} stride Stride.
* @return {number} offset Offset.
*/
@@ -21,7 +21,7 @@ export function deflateCoordinate(flatCoordinates, offset, coordinate, stride) {
/**
* @param {Array.<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {Array.<ol.Coordinate>} coordinates Coordinates.
* @param {Array.<module:ol/coordinate~Coordinate>} coordinates Coordinates.
* @param {number} stride Stride.
* @return {number} offset Offset.
*/
@@ -39,7 +39,7 @@ export function deflateCoordinates(flatCoordinates, offset, coordinates, stride)
/**
* @param {Array.<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {Array.<Array.<ol.Coordinate>>} coordinatess Coordinatess.
* @param {Array.<Array.<module:ol/coordinate~Coordinate>>} coordinatess Coordinatess.
* @param {number} stride Stride.
* @param {Array.<number>=} opt_ends Ends.
* @return {Array.<number>} Ends.
@@ -61,7 +61,7 @@ export function deflateCoordinatesArray(flatCoordinates, offset, coordinatess, s
/**
* @param {Array.<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {Array.<Array.<Array.<ol.Coordinate>>>} coordinatesss Coordinatesss.
* @param {Array.<Array.<Array.<module:ol/coordinate~Coordinate>>>} coordinatesss Coordinatesss.
* @param {number} stride Stride.
* @param {Array.<Array.<number>>=} opt_endss Endss.
* @return {Array.<Array.<number>>} Endss.
+7 -7
View File
@@ -6,8 +6,8 @@ import {get as getProjection, getTransform} from '../../proj.js';
/**
* @param {function(number): ol.Coordinate} interpolate Interpolate function.
* @param {ol.TransformFunction} transform Transform from longitude/latitude to
* @param {function(number): module:ol/coordinate~Coordinate} interpolate Interpolate function.
* @param {module:ol/proj~TransformFunction} transform Transform from longitude/latitude to
* projected coordinates.
* @param {number} squaredTolerance Squared tolerance.
* @return {Array.<number>} Flat coordinates.
@@ -25,9 +25,9 @@ function line(interpolate, transform, squaredTolerance) {
let a = transform(geoA);
let b = transform(geoB);
/** @type {Array.<ol.Coordinate>} */
/** @type {Array.<module:ol/coordinate~Coordinate>} */
const geoStack = [geoB, geoA];
/** @type {Array.<ol.Coordinate>} */
/** @type {Array.<module:ol/coordinate~Coordinate>} */
const stack = [b, a];
/** @type {Array.<number>} */
const fractionStack = [1, 0];
@@ -102,7 +102,7 @@ export function greatCircleArc(lon1, lat1, lon2, lat2, projection, squaredTolera
return line(
/**
* @param {number} frac Fraction.
* @return {ol.Coordinate} Coordinate.
* @return {module:ol/coordinate~Coordinate} Coordinate.
*/
function(frac) {
if (1 <= d) {
@@ -137,7 +137,7 @@ export function meridian(lon, lat1, lat2, projection, squaredTolerance) {
return line(
/**
* @param {number} frac Fraction.
* @return {ol.Coordinate} Coordinate.
* @return {module:ol/coordinate~Coordinate} Coordinate.
*/
function(frac) {
return [lon, lat1 + ((lat2 - lat1) * frac)];
@@ -160,7 +160,7 @@ export function parallel(lat, lon1, lon2, projection, squaredTolerance) {
return line(
/**
* @param {number} frac Fraction.
* @return {ol.Coordinate} Coordinate.
* @return {module:ol/coordinate~Coordinate} Coordinate.
*/
function(frac) {
return [lon1 + ((lon2 - lon1) * frac), lat];
+6 -6
View File
@@ -8,8 +8,8 @@
* @param {number} offset Offset.
* @param {number} end End.
* @param {number} stride Stride.
* @param {Array.<ol.Coordinate>=} opt_coordinates Coordinates.
* @return {Array.<ol.Coordinate>} Coordinates.
* @param {Array.<module:ol/coordinate~Coordinate>=} opt_coordinates Coordinates.
* @return {Array.<module:ol/coordinate~Coordinate>} Coordinates.
*/
export function inflateCoordinates(flatCoordinates, offset, end, stride, opt_coordinates) {
const coordinates = opt_coordinates !== undefined ? opt_coordinates : [];
@@ -27,8 +27,8 @@ export function inflateCoordinates(flatCoordinates, offset, end, stride, opt_coo
* @param {number} offset Offset.
* @param {Array.<number>} ends Ends.
* @param {number} stride Stride.
* @param {Array.<Array.<ol.Coordinate>>=} opt_coordinatess Coordinatess.
* @return {Array.<Array.<ol.Coordinate>>} Coordinatess.
* @param {Array.<Array.<module:ol/coordinate~Coordinate>>=} opt_coordinatess Coordinatess.
* @return {Array.<Array.<module:ol/coordinate~Coordinate>>} Coordinatess.
*/
export function inflateCoordinatesArray(flatCoordinates, offset, ends, stride, opt_coordinatess) {
const coordinatess = opt_coordinatess !== undefined ? opt_coordinatess : [];
@@ -49,9 +49,9 @@ export function inflateCoordinatesArray(flatCoordinates, offset, ends, stride, o
* @param {number} offset Offset.
* @param {Array.<Array.<number>>} endss Endss.
* @param {number} stride Stride.
* @param {Array.<Array.<Array.<ol.Coordinate>>>=} opt_coordinatesss
* @param {Array.<Array.<Array.<module:ol/coordinate~Coordinate>>>=} opt_coordinatesss
* Coordinatesss.
* @return {Array.<Array.<Array.<ol.Coordinate>>>} Coordinatesss.
* @return {Array.<Array.<Array.<module:ol/coordinate~Coordinate>>>} Coordinatesss.
*/
export function inflateMultiCoordinatesArray(flatCoordinates, offset, endss, stride, opt_coordinatesss) {
const coordinatesss = opt_coordinatesss !== undefined ? opt_coordinatesss : [];
+2 -2
View File
@@ -71,7 +71,7 @@ export function interpolatePoint(flatCoordinates, offset, end, stride, fraction,
* @param {number} stride Stride.
* @param {number} m M.
* @param {boolean} extrapolate Extrapolate.
* @return {ol.Coordinate} Coordinate.
* @return {module:ol/coordinate~Coordinate} Coordinate.
*/
export function lineStringCoordinateAtM(flatCoordinates, offset, end, stride, m, extrapolate) {
if (end == offset) {
@@ -133,7 +133,7 @@ export function lineStringCoordinateAtM(flatCoordinates, offset, end, stride, m,
* @param {number} m M.
* @param {boolean} extrapolate Extrapolate.
* @param {boolean} interpolate Interpolate.
* @return {ol.Coordinate} Coordinate.
* @return {module:ol/coordinate~Coordinate} Coordinate.
*/
export function lineStringsCoordinateAtM(
flatCoordinates, offset, ends, stride, m, extrapolate, interpolate) {
+7 -7
View File
@@ -11,7 +11,7 @@ import {forEach as forEachSegment} from '../flat/segments.js';
* @param {number} offset Offset.
* @param {number} end End.
* @param {number} stride Stride.
* @param {ol.Extent} extent Extent.
* @param {module:ol/extent~Extent} extent Extent.
* @return {boolean} True if the geometry and the extent intersect.
*/
export function intersectsLineString(flatCoordinates, offset, end, stride, extent) {
@@ -33,8 +33,8 @@ export function intersectsLineString(flatCoordinates, offset, end, stride, exten
}
return forEachSegment(flatCoordinates, offset, end, stride,
/**
* @param {ol.Coordinate} point1 Start point.
* @param {ol.Coordinate} point2 End point.
* @param {module:ol/coordinate~Coordinate} point1 Start point.
* @param {module:ol/coordinate~Coordinate} point2 End point.
* @return {boolean} `true` if the segment and the extent intersect,
* `false` otherwise.
*/
@@ -49,7 +49,7 @@ export function intersectsLineString(flatCoordinates, offset, end, stride, exten
* @param {number} offset Offset.
* @param {Array.<number>} ends Ends.
* @param {number} stride Stride.
* @param {ol.Extent} extent Extent.
* @param {module:ol/extent~Extent} extent Extent.
* @return {boolean} True if the geometry and the extent intersect.
*/
export function intersectsLineStringArray(flatCoordinates, offset, ends, stride, extent) {
@@ -69,7 +69,7 @@ export function intersectsLineStringArray(flatCoordinates, offset, ends, stride,
* @param {number} offset Offset.
* @param {number} end End.
* @param {number} stride Stride.
* @param {ol.Extent} extent Extent.
* @param {module:ol/extent~Extent} extent Extent.
* @return {boolean} True if the geometry and the extent intersect.
*/
export function intersectsLinearRing(flatCoordinates, offset, end, stride, extent) {
@@ -98,7 +98,7 @@ export function intersectsLinearRing(flatCoordinates, offset, end, stride, exten
* @param {number} offset Offset.
* @param {Array.<number>} ends Ends.
* @param {number} stride Stride.
* @param {ol.Extent} extent Extent.
* @param {module:ol/extent~Extent} extent Extent.
* @return {boolean} True if the geometry and the extent intersect.
*/
export function intersectsLinearRingArray(flatCoordinates, offset, ends, stride, extent) {
@@ -123,7 +123,7 @@ export function intersectsLinearRingArray(flatCoordinates, offset, ends, stride,
* @param {number} offset Offset.
* @param {Array.<Array.<number>>} endss Endss.
* @param {number} stride Stride.
* @param {ol.Extent} extent Extent.
* @param {module:ol/extent~Extent} extent Extent.
* @return {boolean} True if the geometry and the extent intersect.
*/
export function intersectsLinearRingMultiArray(flatCoordinates, offset, endss, stride, extent) {
+1 -1
View File
@@ -11,7 +11,7 @@
* @param {number} offset Offset.
* @param {number} end End.
* @param {number} stride Stride.
* @param {function(this: S, ol.Coordinate, ol.Coordinate): T} callback Function
* @param {function(this: S, module:ol/coordinate~Coordinate, module:ol/coordinate~Coordinate): T} callback Function
* called for each segment.
* @param {S=} opt_this The object to be used as the value of 'this'
* within callback.
+1 -1
View File
@@ -8,7 +8,7 @@
* @param {number} offset Offset.
* @param {number} end End.
* @param {number} stride Stride.
* @param {ol.Transform} transform Transform.
* @param {module:ol/transform~Transform} transform Transform.
* @param {Array.<number>=} opt_dest Destination.
* @return {Array.<number>} Transformed coordinates.
*/