Abstract base class; normally only used for creating subclasses and not instantiated in apps. Base class for vector geometries.
To get notified of changes to the geometry, register a listener for the
generic change
event on your geometry instance.
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 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.
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).
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
unGenerated using TypeDoc
Classdesc
Abstract base class; normally only used for creating subclasses and not instantiated in apps. Base class for vector geometries.
To get notified of changes to the geometry, register a listener for the generic
change
event on your geometry instance.Api
stable