Merge pull request #2565 from elemoine/apistable5
Add @api stable annotations for ol.Feature and the ol.geom namespace
This commit is contained in:
@@ -14,7 +14,7 @@ goog.require('ol.geom.flat.deflate');
|
||||
*
|
||||
* @constructor
|
||||
* @extends {ol.geom.SimpleGeometry}
|
||||
* @param {ol.geom.RawPoint} center Center.
|
||||
* @param {ol.Coordinate} center Center.
|
||||
* @param {number=} opt_radius Radius.
|
||||
* @param {ol.geom.GeometryLayout=} opt_layout Layout.
|
||||
* @api
|
||||
@@ -82,7 +82,7 @@ ol.geom.Circle.prototype.containsXY = function(x, y) {
|
||||
|
||||
|
||||
/**
|
||||
* @return {ol.geom.RawPoint} Center.
|
||||
* @return {ol.Coordinate} Center.
|
||||
* @api
|
||||
*/
|
||||
ol.geom.Circle.prototype.getCenter = function() {
|
||||
@@ -139,7 +139,7 @@ ol.geom.Circle.prototype.getType = function() {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.geom.RawPoint} center Center.
|
||||
* @param {ol.Coordinate} center Center.
|
||||
* @api
|
||||
*/
|
||||
ol.geom.Circle.prototype.setCenter = function(center) {
|
||||
@@ -157,7 +157,7 @@ ol.geom.Circle.prototype.setCenter = function(center) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.geom.RawPoint} center Center.
|
||||
* @param {ol.Coordinate} center Center.
|
||||
* @param {number} radius Radius.
|
||||
* @param {ol.geom.GeometryLayout=} opt_layout Layout.
|
||||
* @api
|
||||
|
||||
+9
-66
@@ -12,7 +12,7 @@ goog.require('ol.proj');
|
||||
* `'Polygon'`, `'MultiPoint'`, `'MultiLineString'`, `'MultiPolygon'`,
|
||||
* `'GeometryCollection'`, `'Circle'`.
|
||||
* @enum {string}
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.GeometryType = {
|
||||
POINT: 'Point',
|
||||
@@ -32,7 +32,7 @@ ol.geom.GeometryType = {
|
||||
* or measure ('M') coordinate is available. Supported values are `'XY'`,
|
||||
* `'XYZ'`, `'XYM'`, `'XYZM'`.
|
||||
* @enum {string}
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.GeometryLayout = {
|
||||
XY: 'XY',
|
||||
@@ -52,7 +52,7 @@ ol.geom.GeometryLayout = {
|
||||
* @constructor
|
||||
* @extends {ol.Observable}
|
||||
* @fires change Triggered when the geometry changes.
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.Geometry = function() {
|
||||
|
||||
@@ -96,7 +96,7 @@ goog.inherits(ol.geom.Geometry, ol.Observable);
|
||||
* Make a complete copy of the geometry.
|
||||
* @function
|
||||
* @return {ol.geom.Geometry} Clone.
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.Geometry.prototype.clone = goog.abstractMethod;
|
||||
|
||||
@@ -115,7 +115,7 @@ ol.geom.Geometry.prototype.closestPointXY = goog.abstractMethod;
|
||||
* @param {ol.Coordinate} point Point.
|
||||
* @param {ol.Coordinate=} opt_closestPoint Closest point.
|
||||
* @return {ol.Coordinate} Closest point.
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.Geometry.prototype.getClosestPoint = function(point, opt_closestPoint) {
|
||||
var closestPoint = goog.isDef(opt_closestPoint) ?
|
||||
@@ -147,7 +147,7 @@ ol.geom.Geometry.prototype.containsXY = goog.functions.FALSE;
|
||||
* @function
|
||||
* @param {ol.Extent=} opt_extent Extent.
|
||||
* @return {ol.Extent} extent Extent.
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.Geometry.prototype.getExtent = goog.abstractMethod;
|
||||
|
||||
@@ -159,7 +159,6 @@ ol.geom.Geometry.prototype.getExtent = goog.abstractMethod;
|
||||
* @function
|
||||
* @param {number} squaredTolerance Squared tolerance.
|
||||
* @return {ol.geom.Geometry} Simplified geometry.
|
||||
* @api
|
||||
*/
|
||||
ol.geom.Geometry.prototype.getSimplifiedGeometry = goog.abstractMethod;
|
||||
|
||||
@@ -168,7 +167,7 @@ ol.geom.Geometry.prototype.getSimplifiedGeometry = goog.abstractMethod;
|
||||
* Get the type of this geometry.
|
||||
* @function
|
||||
* @return {ol.geom.GeometryType} Geometry type.
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.Geometry.prototype.getType = goog.abstractMethod;
|
||||
|
||||
@@ -179,7 +178,7 @@ ol.geom.Geometry.prototype.getType = goog.abstractMethod;
|
||||
* then use this function on the clone.
|
||||
* @function
|
||||
* @param {ol.TransformFunction} transformFn Transform.
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.Geometry.prototype.applyTransform = goog.abstractMethod;
|
||||
|
||||
@@ -196,65 +195,9 @@ ol.geom.Geometry.prototype.applyTransform = goog.abstractMethod;
|
||||
* string identifier or a {@link ol.proj.Projection} object.
|
||||
* @return {ol.geom.Geometry} This geometry. Note that original geometry is
|
||||
* modified in place.
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.Geometry.prototype.transform = function(source, destination) {
|
||||
this.applyTransform(ol.proj.getTransform(source, destination));
|
||||
return this;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Array representation of a point. Example: `[16, 48]`.
|
||||
* @typedef {ol.Coordinate}
|
||||
* @api
|
||||
*/
|
||||
ol.geom.RawPoint;
|
||||
|
||||
|
||||
/**
|
||||
* Array representation of a linestring.
|
||||
* @typedef {Array.<ol.Coordinate>}
|
||||
* @api
|
||||
*/
|
||||
ol.geom.RawLineString;
|
||||
|
||||
|
||||
/**
|
||||
* Array representation of a linear ring.
|
||||
* @typedef {Array.<ol.Coordinate>}
|
||||
* @api
|
||||
*/
|
||||
ol.geom.RawLinearRing;
|
||||
|
||||
|
||||
/**
|
||||
* Array representation of a polygon.
|
||||
* @typedef {Array.<ol.geom.RawLinearRing>}
|
||||
* @api
|
||||
*/
|
||||
ol.geom.RawPolygon;
|
||||
|
||||
|
||||
/**
|
||||
* Array representation of a multipoint.
|
||||
* @typedef {Array.<ol.geom.RawPoint>}
|
||||
* @api
|
||||
*/
|
||||
ol.geom.RawMultiPoint;
|
||||
|
||||
|
||||
/**
|
||||
* Array representation of a multilinestring.
|
||||
* @typedef {Array.<ol.geom.RawLineString>}
|
||||
* @api
|
||||
*/
|
||||
ol.geom.RawMultiLineString;
|
||||
|
||||
|
||||
/**
|
||||
* Array representation of a multipolygon.
|
||||
* @typedef {Array.<ol.geom.RawPolygon>}
|
||||
* @api
|
||||
*/
|
||||
ol.geom.RawMultiPolygon;
|
||||
|
||||
@@ -18,7 +18,7 @@ goog.require('ol.geom.GeometryType');
|
||||
* @constructor
|
||||
* @extends {ol.geom.Geometry}
|
||||
* @param {Array.<ol.geom.Geometry>=} opt_geometries Geometries.
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.GeometryCollection = function(opt_geometries) {
|
||||
|
||||
@@ -84,7 +84,7 @@ ol.geom.GeometryCollection.prototype.listenGeometriesChange_ = function() {
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.GeometryCollection.prototype.clone = function() {
|
||||
var geometryCollection = new ol.geom.GeometryCollection(null);
|
||||
@@ -129,7 +129,7 @@ ol.geom.GeometryCollection.prototype.containsXY = function(x, y) {
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.GeometryCollection.prototype.getExtent = function(opt_extent) {
|
||||
if (this.extentRevision != this.getRevision()) {
|
||||
@@ -149,7 +149,7 @@ ol.geom.GeometryCollection.prototype.getExtent = function(opt_extent) {
|
||||
|
||||
/**
|
||||
* @return {Array.<ol.geom.Geometry>} Geometries.
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.GeometryCollection.prototype.getGeometries = function() {
|
||||
return ol.geom.GeometryCollection.cloneGeometries_(this.geometries_);
|
||||
@@ -166,7 +166,6 @@ ol.geom.GeometryCollection.prototype.getGeometriesArray = function() {
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* @api
|
||||
*/
|
||||
ol.geom.GeometryCollection.prototype.getSimplifiedGeometry =
|
||||
function(squaredTolerance) {
|
||||
@@ -211,7 +210,7 @@ ol.geom.GeometryCollection.prototype.getSimplifiedGeometry =
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.GeometryCollection.prototype.getType = function() {
|
||||
return ol.geom.GeometryType.GEOMETRY_COLLECTION;
|
||||
@@ -228,7 +227,7 @@ ol.geom.GeometryCollection.prototype.isEmpty = function() {
|
||||
|
||||
/**
|
||||
* @param {Array.<ol.geom.Geometry>} geometries Geometries.
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.GeometryCollection.prototype.setGeometries = function(geometries) {
|
||||
this.setGeometriesArray(
|
||||
|
||||
@@ -18,9 +18,9 @@ goog.require('ol.geom.flat.simplify');
|
||||
*
|
||||
* @constructor
|
||||
* @extends {ol.geom.SimpleGeometry}
|
||||
* @param {ol.geom.RawLinearRing} coordinates Coordinates.
|
||||
* @param {Array.<ol.Coordinate>} coordinates Coordinates.
|
||||
* @param {ol.geom.GeometryLayout=} opt_layout Layout.
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.LinearRing = function(coordinates, opt_layout) {
|
||||
|
||||
@@ -47,7 +47,7 @@ goog.inherits(ol.geom.LinearRing, ol.geom.SimpleGeometry);
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.LinearRing.prototype.clone = function() {
|
||||
var linearRing = new ol.geom.LinearRing(null);
|
||||
@@ -78,7 +78,7 @@ ol.geom.LinearRing.prototype.closestPointXY =
|
||||
|
||||
/**
|
||||
* @return {number} Area (on projected plane).
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.LinearRing.prototype.getArea = function() {
|
||||
return ol.geom.flat.area.linearRing(
|
||||
@@ -87,8 +87,8 @@ ol.geom.LinearRing.prototype.getArea = function() {
|
||||
|
||||
|
||||
/**
|
||||
* @return {ol.geom.RawLinearRing} Coordinates.
|
||||
* @api
|
||||
* @return {Array.<ol.Coordinate>} Coordinates.
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.LinearRing.prototype.getCoordinates = function() {
|
||||
return ol.geom.flat.inflate.coordinates(
|
||||
@@ -114,7 +114,7 @@ ol.geom.LinearRing.prototype.getSimplifiedGeometryInternal =
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.LinearRing.prototype.getType = function() {
|
||||
return ol.geom.GeometryType.LINEAR_RING;
|
||||
@@ -122,9 +122,9 @@ ol.geom.LinearRing.prototype.getType = function() {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.geom.RawLinearRing} coordinates Coordinates.
|
||||
* @param {Array.<ol.Coordinate>} coordinates Coordinates.
|
||||
* @param {ol.geom.GeometryLayout=} opt_layout Layout.
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.LinearRing.prototype.setCoordinates =
|
||||
function(coordinates, opt_layout) {
|
||||
|
||||
+11
-11
@@ -20,9 +20,9 @@ goog.require('ol.geom.flat.simplify');
|
||||
*
|
||||
* @constructor
|
||||
* @extends {ol.geom.SimpleGeometry}
|
||||
* @param {ol.geom.RawLineString} coordinates Coordinates.
|
||||
* @param {Array.<ol.Coordinate>} coordinates Coordinates.
|
||||
* @param {ol.geom.GeometryLayout=} opt_layout Layout.
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.LineString = function(coordinates, opt_layout) {
|
||||
|
||||
@@ -61,7 +61,7 @@ goog.inherits(ol.geom.LineString, ol.geom.SimpleGeometry);
|
||||
|
||||
/**
|
||||
* @param {ol.Coordinate} coordinate Coordinate.
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.LineString.prototype.appendCoordinate = function(coordinate) {
|
||||
goog.asserts.assert(coordinate.length == this.stride);
|
||||
@@ -76,7 +76,7 @@ ol.geom.LineString.prototype.appendCoordinate = function(coordinate) {
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.LineString.prototype.clone = function() {
|
||||
var lineString = new ol.geom.LineString(null);
|
||||
@@ -117,7 +117,7 @@ ol.geom.LineString.prototype.closestPointXY =
|
||||
* @param {number} m M.
|
||||
* @param {boolean=} opt_extrapolate Extrapolate.
|
||||
* @return {ol.Coordinate} Coordinate.
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.LineString.prototype.getCoordinateAtM = function(m, opt_extrapolate) {
|
||||
if (this.layout != ol.geom.GeometryLayout.XYM &&
|
||||
@@ -131,8 +131,8 @@ ol.geom.LineString.prototype.getCoordinateAtM = function(m, opt_extrapolate) {
|
||||
|
||||
|
||||
/**
|
||||
* @return {ol.geom.RawLineString} Coordinates.
|
||||
* @api
|
||||
* @return {Array.<ol.Coordinate>} Coordinates.
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.LineString.prototype.getCoordinates = function() {
|
||||
return ol.geom.flat.inflate.coordinates(
|
||||
@@ -142,7 +142,7 @@ ol.geom.LineString.prototype.getCoordinates = function() {
|
||||
|
||||
/**
|
||||
* @return {number} Length (on projected plane).
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.LineString.prototype.getLength = function() {
|
||||
return ol.geom.flat.length.lineString(
|
||||
@@ -182,7 +182,7 @@ ol.geom.LineString.prototype.getSimplifiedGeometryInternal =
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.LineString.prototype.getType = function() {
|
||||
return ol.geom.GeometryType.LINE_STRING;
|
||||
@@ -190,9 +190,9 @@ ol.geom.LineString.prototype.getType = function() {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.geom.RawLineString} coordinates Coordinates.
|
||||
* @param {Array.<ol.Coordinate>} coordinates Coordinates.
|
||||
* @param {ol.geom.GeometryLayout=} opt_layout Layout.
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.LineString.prototype.setCoordinates =
|
||||
function(coordinates, opt_layout) {
|
||||
|
||||
@@ -20,9 +20,9 @@ goog.require('ol.geom.flat.simplify');
|
||||
*
|
||||
* @constructor
|
||||
* @extends {ol.geom.SimpleGeometry}
|
||||
* @param {ol.geom.RawMultiLineString} coordinates Coordinates.
|
||||
* @param {Array.<Array.<ol.Coordinate>>} coordinates Coordinates.
|
||||
* @param {ol.geom.GeometryLayout=} opt_layout Layout.
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.MultiLineString = function(coordinates, opt_layout) {
|
||||
|
||||
@@ -55,7 +55,7 @@ goog.inherits(ol.geom.MultiLineString, ol.geom.SimpleGeometry);
|
||||
|
||||
/**
|
||||
* @param {ol.geom.LineString} lineString LineString.
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.MultiLineString.prototype.appendLineString = function(lineString) {
|
||||
goog.asserts.assert(lineString.getLayout() == this.layout);
|
||||
@@ -72,7 +72,7 @@ ol.geom.MultiLineString.prototype.appendLineString = function(lineString) {
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.MultiLineString.prototype.clone = function() {
|
||||
var multiLineString = new ol.geom.MultiLineString(null);
|
||||
@@ -122,7 +122,7 @@ ol.geom.MultiLineString.prototype.closestPointXY =
|
||||
* @param {boolean=} opt_extrapolate Extrapolate.
|
||||
* @param {boolean=} opt_interpolate Interpolate.
|
||||
* @return {ol.Coordinate} Coordinate.
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.MultiLineString.prototype.getCoordinateAtM =
|
||||
function(m, opt_extrapolate, opt_interpolate) {
|
||||
@@ -139,8 +139,8 @@ ol.geom.MultiLineString.prototype.getCoordinateAtM =
|
||||
|
||||
|
||||
/**
|
||||
* @return {ol.geom.RawMultiLineString} Coordinates.
|
||||
* @api
|
||||
* @return {Array.<Array.<ol.Coordinate>>} Coordinates.
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.MultiLineString.prototype.getCoordinates = function() {
|
||||
return ol.geom.flat.inflate.coordinatess(
|
||||
@@ -159,7 +159,7 @@ ol.geom.MultiLineString.prototype.getEnds = function() {
|
||||
/**
|
||||
* @param {number} index Index.
|
||||
* @return {ol.geom.LineString} LineString.
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.MultiLineString.prototype.getLineString = function(index) {
|
||||
goog.asserts.assert(0 <= index && index < this.ends_.length);
|
||||
@@ -175,7 +175,7 @@ ol.geom.MultiLineString.prototype.getLineString = function(index) {
|
||||
|
||||
/**
|
||||
* @return {Array.<ol.geom.LineString>} LineStrings.
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.MultiLineString.prototype.getLineStrings = function() {
|
||||
var flatCoordinates = this.flatCoordinates;
|
||||
@@ -236,7 +236,7 @@ ol.geom.MultiLineString.prototype.getSimplifiedGeometryInternal =
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.MultiLineString.prototype.getType = function() {
|
||||
return ol.geom.GeometryType.MULTI_LINE_STRING;
|
||||
@@ -244,9 +244,9 @@ ol.geom.MultiLineString.prototype.getType = function() {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.geom.RawMultiLineString} coordinates Coordinates.
|
||||
* @param {Array.<Array.<ol.Coordinate>>} coordinates Coordinates.
|
||||
* @param {ol.geom.GeometryLayout=} opt_layout Layout.
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.MultiLineString.prototype.setCoordinates =
|
||||
function(coordinates, opt_layout) {
|
||||
|
||||
+11
-11
@@ -18,9 +18,9 @@ goog.require('ol.math');
|
||||
*
|
||||
* @constructor
|
||||
* @extends {ol.geom.SimpleGeometry}
|
||||
* @param {ol.geom.RawMultiPoint} coordinates Coordinates.
|
||||
* @param {Array.<ol.Coordinate>} coordinates Coordinates.
|
||||
* @param {ol.geom.GeometryLayout=} opt_layout Layout.
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.MultiPoint = function(coordinates, opt_layout) {
|
||||
goog.base(this);
|
||||
@@ -32,7 +32,7 @@ goog.inherits(ol.geom.MultiPoint, ol.geom.SimpleGeometry);
|
||||
|
||||
/**
|
||||
* @param {ol.geom.Point} point Point.
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.MultiPoint.prototype.appendPoint = function(point) {
|
||||
goog.asserts.assert(point.getLayout() == this.layout);
|
||||
@@ -47,7 +47,7 @@ ol.geom.MultiPoint.prototype.appendPoint = function(point) {
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.MultiPoint.prototype.clone = function() {
|
||||
var multiPoint = new ol.geom.MultiPoint(null);
|
||||
@@ -84,8 +84,8 @@ ol.geom.MultiPoint.prototype.closestPointXY =
|
||||
|
||||
|
||||
/**
|
||||
* @return {ol.geom.RawMultiPoint} Coordinates.
|
||||
* @api
|
||||
* @return {Array.<ol.Coordinate>} Coordinates.
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.MultiPoint.prototype.getCoordinates = function() {
|
||||
return ol.geom.flat.inflate.coordinates(
|
||||
@@ -96,7 +96,7 @@ ol.geom.MultiPoint.prototype.getCoordinates = function() {
|
||||
/**
|
||||
* @param {number} index Index.
|
||||
* @return {ol.geom.Point} Point.
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.MultiPoint.prototype.getPoint = function(index) {
|
||||
var n = goog.isNull(this.flatCoordinates) ?
|
||||
@@ -114,7 +114,7 @@ ol.geom.MultiPoint.prototype.getPoint = function(index) {
|
||||
|
||||
/**
|
||||
* @return {Array.<ol.geom.Point>} Points.
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.MultiPoint.prototype.getPoints = function() {
|
||||
var flatCoordinates = this.flatCoordinates;
|
||||
@@ -134,7 +134,7 @@ ol.geom.MultiPoint.prototype.getPoints = function() {
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.MultiPoint.prototype.getType = function() {
|
||||
return ol.geom.GeometryType.MULTI_POINT;
|
||||
@@ -142,9 +142,9 @@ ol.geom.MultiPoint.prototype.getType = function() {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.geom.RawMultiPoint} coordinates Coordinates.
|
||||
* @param {Array.<ol.Coordinate>} coordinates Coordinates.
|
||||
* @param {ol.geom.GeometryLayout=} opt_layout Layout.
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.MultiPoint.prototype.setCoordinates =
|
||||
function(coordinates, opt_layout) {
|
||||
|
||||
+13
-13
@@ -25,9 +25,9 @@ goog.require('ol.geom.flat.simplify');
|
||||
*
|
||||
* @constructor
|
||||
* @extends {ol.geom.SimpleGeometry}
|
||||
* @param {ol.geom.RawMultiPolygon} coordinates Coordinates.
|
||||
* @param {Array.<Array.<Array.<ol.Coordinate>>>} coordinates Coordinates.
|
||||
* @param {ol.geom.GeometryLayout=} opt_layout Layout.
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.MultiPolygon = function(coordinates, opt_layout) {
|
||||
|
||||
@@ -84,7 +84,7 @@ goog.inherits(ol.geom.MultiPolygon, ol.geom.SimpleGeometry);
|
||||
|
||||
/**
|
||||
* @param {ol.geom.Polygon} polygon Polygon.
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.MultiPolygon.prototype.appendPolygon = function(polygon) {
|
||||
goog.asserts.assert(polygon.getLayout() == this.layout);
|
||||
@@ -110,7 +110,7 @@ ol.geom.MultiPolygon.prototype.appendPolygon = function(polygon) {
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.MultiPolygon.prototype.clone = function() {
|
||||
var multiPolygon = new ol.geom.MultiPolygon(null);
|
||||
@@ -151,7 +151,7 @@ ol.geom.MultiPolygon.prototype.containsXY = function(x, y) {
|
||||
|
||||
/**
|
||||
* @return {number} Area (on projected plane).
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.MultiPolygon.prototype.getArea = function() {
|
||||
return ol.geom.flat.area.linearRingss(
|
||||
@@ -160,8 +160,8 @@ ol.geom.MultiPolygon.prototype.getArea = function() {
|
||||
|
||||
|
||||
/**
|
||||
* @return {ol.geom.RawMultiPolygon} Coordinates.
|
||||
* @api
|
||||
* @return {Array.<Array.<Array.<ol.Coordinate>>>} Coordinates.
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.MultiPolygon.prototype.getCoordinates = function() {
|
||||
return ol.geom.flat.inflate.coordinatesss(
|
||||
@@ -195,7 +195,7 @@ ol.geom.MultiPolygon.prototype.getFlatInteriorPoints = function() {
|
||||
|
||||
/**
|
||||
* @return {ol.geom.MultiPoint} Interior points.
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.MultiPolygon.prototype.getInteriorPoints = function() {
|
||||
var interiorPoints = new ol.geom.MultiPoint(null);
|
||||
@@ -247,7 +247,7 @@ ol.geom.MultiPolygon.prototype.getSimplifiedGeometryInternal =
|
||||
/**
|
||||
* @param {number} index Index.
|
||||
* @return {ol.geom.Polygon} Polygon.
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.MultiPolygon.prototype.getPolygon = function(index) {
|
||||
goog.asserts.assert(0 <= index && index < this.endss_.length);
|
||||
@@ -278,7 +278,7 @@ ol.geom.MultiPolygon.prototype.getPolygon = function(index) {
|
||||
|
||||
/**
|
||||
* @return {Array.<ol.geom.Polygon>} Polygons.
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.MultiPolygon.prototype.getPolygons = function() {
|
||||
var layout = this.layout;
|
||||
@@ -307,7 +307,7 @@ ol.geom.MultiPolygon.prototype.getPolygons = function() {
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.MultiPolygon.prototype.getType = function() {
|
||||
return ol.geom.GeometryType.MULTI_POLYGON;
|
||||
@@ -315,9 +315,9 @@ ol.geom.MultiPolygon.prototype.getType = function() {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.geom.RawMultiPolygon} coordinates Coordinates.
|
||||
* @param {Array.<Array.<Array.<ol.Coordinate>>>} coordinates Coordinates.
|
||||
* @param {ol.geom.GeometryLayout=} opt_layout Layout.
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.MultiPolygon.prototype.setCoordinates =
|
||||
function(coordinates, opt_layout) {
|
||||
|
||||
@@ -15,9 +15,9 @@ goog.require('ol.math');
|
||||
*
|
||||
* @constructor
|
||||
* @extends {ol.geom.SimpleGeometry}
|
||||
* @param {ol.geom.RawPoint} coordinates Coordinates.
|
||||
* @param {ol.Coordinate} coordinates Coordinates.
|
||||
* @param {ol.geom.GeometryLayout=} opt_layout Layout.
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.Point = function(coordinates, opt_layout) {
|
||||
goog.base(this);
|
||||
@@ -29,7 +29,7 @@ goog.inherits(ol.geom.Point, ol.geom.SimpleGeometry);
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.Point.prototype.clone = function() {
|
||||
var point = new ol.geom.Point(null);
|
||||
@@ -61,8 +61,8 @@ ol.geom.Point.prototype.closestPointXY =
|
||||
|
||||
|
||||
/**
|
||||
* @return {ol.geom.RawPoint} Coordinates.
|
||||
* @api
|
||||
* @return {ol.Coordinate} Coordinates.
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.Point.prototype.getCoordinates = function() {
|
||||
return goog.isNull(this.flatCoordinates) ? [] : this.flatCoordinates.slice();
|
||||
@@ -85,7 +85,7 @@ ol.geom.Point.prototype.getExtent = function(opt_extent) {
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.Point.prototype.getType = function() {
|
||||
return ol.geom.GeometryType.POINT;
|
||||
@@ -93,9 +93,9 @@ ol.geom.Point.prototype.getType = function() {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.geom.RawPoint} coordinates Coordinates.
|
||||
* @param {ol.Coordinate} coordinates Coordinates.
|
||||
* @param {ol.geom.GeometryLayout=} opt_layout Layout.
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.Point.prototype.setCoordinates = function(coordinates, opt_layout) {
|
||||
if (goog.isNull(coordinates)) {
|
||||
|
||||
+14
-14
@@ -25,9 +25,9 @@ goog.require('ol.geom.flat.simplify');
|
||||
*
|
||||
* @constructor
|
||||
* @extends {ol.geom.SimpleGeometry}
|
||||
* @param {ol.geom.RawPolygon} coordinates Coordinates.
|
||||
* @param {Array.<Array.<ol.Coordinate>>} coordinates Coordinates.
|
||||
* @param {ol.geom.GeometryLayout=} opt_layout Layout.
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.Polygon = function(coordinates, opt_layout) {
|
||||
|
||||
@@ -84,7 +84,7 @@ goog.inherits(ol.geom.Polygon, ol.geom.SimpleGeometry);
|
||||
|
||||
/**
|
||||
* @param {ol.geom.LinearRing} linearRing Linear ring.
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.Polygon.prototype.appendLinearRing = function(linearRing) {
|
||||
goog.asserts.assert(linearRing.getLayout() == this.layout);
|
||||
@@ -100,7 +100,7 @@ ol.geom.Polygon.prototype.appendLinearRing = function(linearRing) {
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.Polygon.prototype.clone = function() {
|
||||
var polygon = new ol.geom.Polygon(null);
|
||||
@@ -141,7 +141,7 @@ ol.geom.Polygon.prototype.containsXY = function(x, y) {
|
||||
|
||||
/**
|
||||
* @return {number} Area (on projected plane).
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.Polygon.prototype.getArea = function() {
|
||||
return ol.geom.flat.area.linearRings(
|
||||
@@ -150,8 +150,8 @@ ol.geom.Polygon.prototype.getArea = function() {
|
||||
|
||||
|
||||
/**
|
||||
* @return {ol.geom.RawPolygon} Coordinates.
|
||||
* @api
|
||||
* @return {Array.<Array.<ol.Coordinate>>} Coordinates.
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.Polygon.prototype.getCoordinates = function() {
|
||||
return ol.geom.flat.inflate.coordinatess(
|
||||
@@ -184,7 +184,7 @@ ol.geom.Polygon.prototype.getFlatInteriorPoint = function() {
|
||||
|
||||
/**
|
||||
* @return {ol.geom.Point} Interior point.
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.Polygon.prototype.getInteriorPoint = function() {
|
||||
return new ol.geom.Point(this.getFlatInteriorPoint());
|
||||
@@ -194,7 +194,7 @@ ol.geom.Polygon.prototype.getInteriorPoint = function() {
|
||||
/**
|
||||
* @param {number} index Index.
|
||||
* @return {ol.geom.LinearRing} Linear ring.
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.Polygon.prototype.getLinearRing = function(index) {
|
||||
goog.asserts.assert(0 <= index && index < this.ends_.length);
|
||||
@@ -210,7 +210,7 @@ ol.geom.Polygon.prototype.getLinearRing = function(index) {
|
||||
|
||||
/**
|
||||
* @return {Array.<ol.geom.LinearRing>} Linear rings.
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.Polygon.prototype.getLinearRings = function() {
|
||||
var layout = this.layout;
|
||||
@@ -271,7 +271,7 @@ ol.geom.Polygon.prototype.getSimplifiedGeometryInternal =
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.Polygon.prototype.getType = function() {
|
||||
return ol.geom.GeometryType.POLYGON;
|
||||
@@ -279,9 +279,9 @@ ol.geom.Polygon.prototype.getType = function() {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.geom.RawPolygon} coordinates Coordinates.
|
||||
* @param {Array.<Array.<ol.Coordinate>>} coordinates Coordinates.
|
||||
* @param {ol.geom.GeometryLayout=} opt_layout Layout.
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.Polygon.prototype.setCoordinates = function(coordinates, opt_layout) {
|
||||
if (goog.isNull(coordinates)) {
|
||||
@@ -326,7 +326,7 @@ ol.geom.Polygon.prototype.setFlatCoordinates =
|
||||
* @param {number} radius Radius.
|
||||
* @param {number=} opt_n Optional number of points. Default is `32`.
|
||||
* @return {ol.geom.Polygon} Circle geometry.
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.Polygon.circular = function(sphere, center, radius, opt_n) {
|
||||
var n = goog.isDef(opt_n) ? opt_n : 32;
|
||||
|
||||
@@ -16,7 +16,7 @@ goog.require('ol.geom.flat.transform');
|
||||
*
|
||||
* @constructor
|
||||
* @extends {ol.geom.Geometry}
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.SimpleGeometry = function() {
|
||||
|
||||
@@ -90,7 +90,7 @@ ol.geom.SimpleGeometry.prototype.containsXY = goog.functions.FALSE;
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.SimpleGeometry.prototype.getExtent = function(opt_extent) {
|
||||
if (this.extentRevision != this.getRevision()) {
|
||||
@@ -106,7 +106,7 @@ ol.geom.SimpleGeometry.prototype.getExtent = function(opt_extent) {
|
||||
|
||||
/**
|
||||
* @return {ol.Coordinate} First coordinate.
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.SimpleGeometry.prototype.getFirstCoordinate = function() {
|
||||
return this.flatCoordinates.slice(0, this.stride);
|
||||
@@ -123,7 +123,7 @@ ol.geom.SimpleGeometry.prototype.getFlatCoordinates = function() {
|
||||
|
||||
/**
|
||||
* @return {ol.Coordinate} Last point.
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.SimpleGeometry.prototype.getLastCoordinate = function() {
|
||||
return this.flatCoordinates.slice(this.flatCoordinates.length - this.stride);
|
||||
@@ -132,7 +132,7 @@ ol.geom.SimpleGeometry.prototype.getLastCoordinate = function() {
|
||||
|
||||
/**
|
||||
* @return {ol.geom.GeometryLayout} Layout.
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.SimpleGeometry.prototype.getLayout = function() {
|
||||
return this.layout;
|
||||
@@ -141,7 +141,6 @@ ol.geom.SimpleGeometry.prototype.getLayout = function() {
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* @api
|
||||
*/
|
||||
ol.geom.SimpleGeometry.prototype.getSimplifiedGeometry =
|
||||
function(squaredTolerance) {
|
||||
|
||||
Reference in New Issue
Block a user