Better docs for ol.geom.Polygon#createCircularSphere
This commit is contained in:
@@ -169,7 +169,7 @@ ol.Geolocation.prototype.positionChange_ = function(position) {
|
||||
this.set(ol.GeolocationProperty.POSITION, projectedPosition);
|
||||
this.set(ol.GeolocationProperty.SPEED,
|
||||
goog.isNull(coords.speed) ? undefined : coords.speed);
|
||||
var geometry = ol.geom.Polygon.circular(
|
||||
var geometry = ol.geom.Polygon.createCircularOnSphere(
|
||||
ol.sphere.WGS84, this.position_, coords.accuracy);
|
||||
geometry.applyTransform(this.transform_);
|
||||
this.set(ol.GeolocationProperty.ACCURACY_GEOMETRY, geometry);
|
||||
|
||||
@@ -351,10 +351,12 @@ ol.geom.Polygon.prototype.setFlatCoordinates =
|
||||
/**
|
||||
* Create an approximation of a circle on the surface of a sphere.
|
||||
* @param {ol.Sphere} sphere The sphere.
|
||||
* @param {ol.Coordinate} center Center.
|
||||
* @param {number} radius Radius.
|
||||
* @param {number=} opt_n Optional number of points. Default is `32`.
|
||||
* @return {ol.geom.Polygon} Circle geometry.
|
||||
* @param {ol.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
|
||||
* polygon. Default is `32`.
|
||||
* @return {ol.geom.Polygon} The "circular" polygon.
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.Polygon.createCircularOnSphere =
|
||||
|
||||
Reference in New Issue
Block a user