Merge pull request #2534 from fredj/polygon-api
Document ol.geom.Polygon#getLinearRing function
This commit is contained in:
@@ -193,6 +193,23 @@ ol.geom.Polygon.prototype.getInteriorPoint = function() {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Return the number of rings of the polygon, this includes the exterior
|
||||||
|
* ring and any interior rings.
|
||||||
|
*
|
||||||
|
* @return {number} Number of rings.
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
ol.geom.Polygon.prototype.getLinearRingCount = function() {
|
||||||
|
return this.ends_.length;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the Nth linear ring of the polygon geometry. Return `null` if the
|
||||||
|
* given index is out of range.
|
||||||
|
* The exterior linear ring is available at index `0` and the interior rings
|
||||||
|
* at index `1` and beyond.
|
||||||
|
*
|
||||||
* @param {number} index Index.
|
* @param {number} index Index.
|
||||||
* @return {ol.geom.LinearRing} Linear ring.
|
* @return {ol.geom.LinearRing} Linear ring.
|
||||||
* @api stable
|
* @api stable
|
||||||
|
|||||||
Reference in New Issue
Block a user