Add ol.geom.Polygon#getInteriorPoint
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
@exportProperty ol.geom.Polygon.prototype.clone
|
@exportProperty ol.geom.Polygon.prototype.clone
|
||||||
@exportProperty ol.geom.Polygon.prototype.getArea
|
@exportProperty ol.geom.Polygon.prototype.getArea
|
||||||
@exportProperty ol.geom.Polygon.prototype.getCoordinates
|
@exportProperty ol.geom.Polygon.prototype.getCoordinates
|
||||||
|
@exportProperty ol.geom.Polygon.prototype.getInteriorPoint
|
||||||
@exportProperty ol.geom.Polygon.prototype.getLinearRings
|
@exportProperty ol.geom.Polygon.prototype.getLinearRings
|
||||||
@exportProperty ol.geom.Polygon.prototype.getType
|
@exportProperty ol.geom.Polygon.prototype.getType
|
||||||
@exportProperty ol.geom.Polygon.prototype.setCoordinates
|
@exportProperty ol.geom.Polygon.prototype.setCoordinates
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ goog.provide('ol.geom.Polygon');
|
|||||||
goog.require('ol.extent');
|
goog.require('ol.extent');
|
||||||
goog.require('ol.geom.GeometryType');
|
goog.require('ol.geom.GeometryType');
|
||||||
goog.require('ol.geom.LinearRing');
|
goog.require('ol.geom.LinearRing');
|
||||||
|
goog.require('ol.geom.Point');
|
||||||
goog.require('ol.geom.SimpleGeometry');
|
goog.require('ol.geom.SimpleGeometry');
|
||||||
goog.require('ol.geom.closest');
|
goog.require('ol.geom.closest');
|
||||||
goog.require('ol.geom.flat');
|
goog.require('ol.geom.flat');
|
||||||
@@ -152,6 +153,14 @@ ol.geom.Polygon.prototype.getFlatInteriorPoint = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return {ol.geom.Point} Interior point.
|
||||||
|
*/
|
||||||
|
ol.geom.Polygon.prototype.getInteriorPoint = function() {
|
||||||
|
return new ol.geom.Point(this.getFlatInteriorPoint());
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return {Array.<ol.geom.LinearRing>} Linear rings.
|
* @return {Array.<ol.geom.LinearRing>} Linear rings.
|
||||||
* @todo stability experimental
|
* @todo stability experimental
|
||||||
|
|||||||
Reference in New Issue
Block a user