Add @api stable annotations for ol.geom.Polygon
This commit is contained in:
@@ -27,7 +27,7 @@ goog.require('ol.geom.flat.simplify');
|
|||||||
* @extends {ol.geom.SimpleGeometry}
|
* @extends {ol.geom.SimpleGeometry}
|
||||||
* @param {ol.geom.RawPolygon} coordinates Coordinates.
|
* @param {ol.geom.RawPolygon} coordinates Coordinates.
|
||||||
* @param {ol.geom.GeometryLayout=} opt_layout Layout.
|
* @param {ol.geom.GeometryLayout=} opt_layout Layout.
|
||||||
* @api
|
* @api stable
|
||||||
*/
|
*/
|
||||||
ol.geom.Polygon = function(coordinates, opt_layout) {
|
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.
|
* @param {ol.geom.LinearRing} linearRing Linear ring.
|
||||||
* @api
|
* @api stable
|
||||||
*/
|
*/
|
||||||
ol.geom.Polygon.prototype.appendLinearRing = function(linearRing) {
|
ol.geom.Polygon.prototype.appendLinearRing = function(linearRing) {
|
||||||
goog.asserts.assert(linearRing.getLayout() == this.layout);
|
goog.asserts.assert(linearRing.getLayout() == this.layout);
|
||||||
@@ -100,7 +100,7 @@ ol.geom.Polygon.prototype.appendLinearRing = function(linearRing) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
* @api
|
* @api stable
|
||||||
*/
|
*/
|
||||||
ol.geom.Polygon.prototype.clone = function() {
|
ol.geom.Polygon.prototype.clone = function() {
|
||||||
var polygon = new ol.geom.Polygon(null);
|
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).
|
* @return {number} Area (on projected plane).
|
||||||
* @api
|
* @api stable
|
||||||
*/
|
*/
|
||||||
ol.geom.Polygon.prototype.getArea = function() {
|
ol.geom.Polygon.prototype.getArea = function() {
|
||||||
return ol.geom.flat.area.linearRings(
|
return ol.geom.flat.area.linearRings(
|
||||||
@@ -151,7 +151,7 @@ ol.geom.Polygon.prototype.getArea = function() {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @return {ol.geom.RawPolygon} Coordinates.
|
* @return {ol.geom.RawPolygon} Coordinates.
|
||||||
* @api
|
* @api stable
|
||||||
*/
|
*/
|
||||||
ol.geom.Polygon.prototype.getCoordinates = function() {
|
ol.geom.Polygon.prototype.getCoordinates = function() {
|
||||||
return ol.geom.flat.inflate.coordinatess(
|
return ol.geom.flat.inflate.coordinatess(
|
||||||
@@ -184,7 +184,7 @@ ol.geom.Polygon.prototype.getFlatInteriorPoint = function() {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @return {ol.geom.Point} Interior point.
|
* @return {ol.geom.Point} Interior point.
|
||||||
* @api
|
* @api stable
|
||||||
*/
|
*/
|
||||||
ol.geom.Polygon.prototype.getInteriorPoint = function() {
|
ol.geom.Polygon.prototype.getInteriorPoint = function() {
|
||||||
return new ol.geom.Point(this.getFlatInteriorPoint());
|
return new ol.geom.Point(this.getFlatInteriorPoint());
|
||||||
@@ -194,7 +194,7 @@ ol.geom.Polygon.prototype.getInteriorPoint = function() {
|
|||||||
/**
|
/**
|
||||||
* @param {number} index Index.
|
* @param {number} index Index.
|
||||||
* @return {ol.geom.LinearRing} Linear ring.
|
* @return {ol.geom.LinearRing} Linear ring.
|
||||||
* @api
|
* @api stable
|
||||||
*/
|
*/
|
||||||
ol.geom.Polygon.prototype.getLinearRing = function(index) {
|
ol.geom.Polygon.prototype.getLinearRing = function(index) {
|
||||||
goog.asserts.assert(0 <= index && index < this.ends_.length);
|
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.
|
* @return {Array.<ol.geom.LinearRing>} Linear rings.
|
||||||
* @api
|
* @api stable
|
||||||
*/
|
*/
|
||||||
ol.geom.Polygon.prototype.getLinearRings = function() {
|
ol.geom.Polygon.prototype.getLinearRings = function() {
|
||||||
var layout = this.layout;
|
var layout = this.layout;
|
||||||
@@ -271,7 +271,7 @@ ol.geom.Polygon.prototype.getSimplifiedGeometryInternal =
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
* @api
|
* @api stable
|
||||||
*/
|
*/
|
||||||
ol.geom.Polygon.prototype.getType = function() {
|
ol.geom.Polygon.prototype.getType = function() {
|
||||||
return ol.geom.GeometryType.POLYGON;
|
return ol.geom.GeometryType.POLYGON;
|
||||||
@@ -281,7 +281,7 @@ ol.geom.Polygon.prototype.getType = function() {
|
|||||||
/**
|
/**
|
||||||
* @param {ol.geom.RawPolygon} coordinates Coordinates.
|
* @param {ol.geom.RawPolygon} coordinates Coordinates.
|
||||||
* @param {ol.geom.GeometryLayout=} opt_layout Layout.
|
* @param {ol.geom.GeometryLayout=} opt_layout Layout.
|
||||||
* @api
|
* @api stable
|
||||||
*/
|
*/
|
||||||
ol.geom.Polygon.prototype.setCoordinates = function(coordinates, opt_layout) {
|
ol.geom.Polygon.prototype.setCoordinates = function(coordinates, opt_layout) {
|
||||||
if (goog.isNull(coordinates)) {
|
if (goog.isNull(coordinates)) {
|
||||||
@@ -326,7 +326,7 @@ ol.geom.Polygon.prototype.setFlatCoordinates =
|
|||||||
* @param {number} radius Radius.
|
* @param {number} radius Radius.
|
||||||
* @param {number=} opt_n Optional number of points. Default is `32`.
|
* @param {number=} opt_n Optional number of points. Default is `32`.
|
||||||
* @return {ol.geom.Polygon} Circle geometry.
|
* @return {ol.geom.Polygon} Circle geometry.
|
||||||
* @api
|
* @api stable
|
||||||
*/
|
*/
|
||||||
ol.geom.Polygon.circular = function(sphere, center, radius, opt_n) {
|
ol.geom.Polygon.circular = function(sphere, center, radius, opt_n) {
|
||||||
var n = goog.isDef(opt_n) ? opt_n : 32;
|
var n = goog.isDef(opt_n) ? opt_n : 32;
|
||||||
|
|||||||
Reference in New Issue
Block a user