Coordinates.
Optional
opt_layout: GeometryLayoutLayout.
Polygon geometry.
stable
Append the passed linear ring to this polygon.
Linear ring.
stable
stable
Return the closest point of the geometry to the passed point as coordinate.
Point.
Optional
opt_closestPoint: CoordinateClosest point.
Closest point.
stable
Get the coordinate array for this geometry. This array has the structure of a GeoJSON coordinate array for polygons.
Optional
opt_right: booleanOrient coordinates according to the right-hand
rule (counter-clockwise for exterior and clockwise for interior rings).
If false
, coordinates will be oriented according to the left-hand rule
(clockwise for exterior and counter-clockwise for interior rings).
By default, coordinate orientation will depend on how the geometry was
constructed.
Coordinates.
stable
Return the first coordinate of the geometry.
First coordinate.
stable
Return the last coordinate of the geometry.
Last point.
stable
Return the layout of the geometry.
Layout.
stable
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.
Index.
Linear ring.
stable
Return the linear rings of the polygon.
Linear rings.
stable
Get the type of this geometry.
Geometry type.
Returns true if this geometry includes the specified coordinate. If the coordinate is on the boundary of the geometry, returns false.
Coordinate.
Contains coordinate.
stable
Listen for a certain type of event.
The event type or array of event types.
The listener function.
Optional
opt_this: ObjectThe object to use as this
in listener
.
Unique key for the listener. If called with an array of event types as the first argument, the return will be an array of keys.
stable
Listen once for a certain type of event.
The event type or array of event types.
The listener function.
Optional
opt_this: ObjectThe object to use as this
in listener
.
Unique key for the listener. If called with an array of event types as the first argument, the return will be an array of keys.
stable
Rotate the geometry around a given coordinate. This modifies the geometry coordinates in place.
Rotation angle in radians.
The rotation center.
Scale the geometry (with an optional origin). This modifies the geometry coordinates in place.
The scaling factor in the x-direction.
Optional
opt_sy: numberThe scaling factor in the y-direction (defaults to sx).
Optional
opt_anchor: CoordinateThe scale origin (defaults to the center of the geometry extent).
Set the coordinates of the polygon.
Coordinates.
Optional
opt_layout: GeometryLayoutLayout.
stable
Sets a collection of key-value pairs. Note that this changes any existing properties and adds new ones (it does not remove any existing properties).
Values.
Optional
opt_silent: booleanUpdate without triggering an event.
stable
Create a simplified version of this geometry. For linestrings, this uses the the Douglas Peucker algorithm. For polygons, a quantization-based simplification is used to preserve topology.
The tolerance distance for simplification.
A new, simplified version of the original geometry.
Transform each coordinate of the geometry from one coordinate reference
system to another. The geometry is modified in place.
For example, a line will be transformed to a line and a circle to a circle.
If you do not want the geometry modified in place, first clone()
it and
then use this function on the clone.
The current projection. Can be a string identifier or a ol.proj.Projection object.
The desired projection. Can be a string identifier or a ol.proj.Projection object.
This geometry. Note that original geometry is modified in place.
stable
Removes an event listener using the key returned by on()
or once()
.
Note that using the ol.Observable.unByKey static function is to
be preferred.
stable
Static
circularCreate an approximation of a circle on the surface of a sphere.
The sphere.
Center ([lon, lat]
in degrees).
The great-circle distance from the center to the polygon vertices.
Optional
opt_n: numberOptional number of vertices for the resulting
polygon. Default is 32
.
The "circular" polygon.
stable
Static
fromStatic
fromStatic
unGenerated using TypeDoc
Classdesc
Polygon geometry.
Param: coordinates
Coordinates.
Param: opt_layout
Layout.
Api
stable