Classes
Functions
-
import {circular} from 'ol/geom/Polygon';Create an approximation of a circle on the surface of a sphere.
Name Type Description centerCoordinate Center (
[lon, lat]in degrees).radiusnumber The great-circle distance from the center to the polygon vertices in meters.
nnumber | undefined Optional number of vertices for the resulting polygon. Default is
32.sphereRadiusnumber | undefined Optional radius for the sphere (defaults to the Earth's mean radius using the WGS84 ellipsoid).
Returns:
The "circular" polygon.
-
import {fromCircle} from 'ol/geom/Polygon';Create a regular polygon from a circle.
Name Type Description circleCircle Circle geometry.
sidesnumber | undefined Number of sides of the polygon. Default is 32.
anglenumber | undefined Start angle for the first vertex of the polygon in counter-clockwise radians. 0 means East. Default is 0.
Returns:
Polygon geometry.
-
import {fromExtent} from 'ol/geom/Polygon';Create a polygon from an extent. The layout used is
XY.Name Type Description extentExtent The extent.
Returns:
The polygon.