new Circle(center, radius, optionsopt) [source]
var circle = new Circle([100, 0], 1000, {
id : 'circle0',
properties : {
foo : 'bar'
}
});
Parameter | Type | Default | Description |
---|---|---|---|
center
|
Coordinate | center of the circle | |
radius
|
Number | radius of the circle, in meter | |
options
opt
|
Object | null | construct options defined in Circle |
Extends:
Mixes From:
- Geometry.Center CenterMixin
Members
(constant) options
Properties:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options
|
Object |
Properties
|
- Source:
Methods
getRadius() [source]
Get radius of the circle
Returns:
Number:setRadius(radius) [source]
Set a new radius to the circle
Parameter | Type | Description |
---|---|---|
radius
|
Number | new radius |
Fires:
Returns:
Circle: thisgetShell() [source]
Gets the shell of the circle as a polygon, number of the shell points is decided by options.numberOfShellPoints
Returns:
Array.<Coordinate>: - shell coordinatesgetHoles() [source]
Circle won't have any holes, always returns null
Returns:
Array.<Object>: an empty array(mixin) getCoordinates() [source]
Get geometry's center
Mixes From:
Returns:
Coordinate: - center of the geometry(mixin) setCoordinates(coordinates) [source]
Set a new center to the geometry
Parameter | Type | Description |
---|---|---|
coordinates
|
Coordinate | Array.<Number> | new center |
Mixes From:
Fires:
Returns:
Geometry: this(inherited) getCenterInExtent(extent) [source]
Get center of linestring's intersection with give extent
const extent = map.getExtent();
const center = line.getCenterInExtent(extent);
Parameter | Type | Description |
---|---|---|
extent
|
Extent |
Inherited From:
Returns:
Coordinate: center, null if line doesn't intersect with extent(inherited) hasHoles() [source]
Whether the polygon has any holes inside.