new Ellipse(center, width, height, optionsopt) [source]
var ellipse = new Ellipse([100, 0], 1000, 500, {
id : 'ellipse0'
});
Parameter | Type | Default | Description |
---|---|---|---|
center
|
Coordinate | center of the ellipse | |
width
|
Number | width of the ellipse, in meter | |
height
|
Number | height of the ellipse, in meter | |
options
opt
|
Object | null | construct options defined in Ellipse |
Extends:
Mixes From:
Members
(constant) options
Properties:
Name | Type | Default | Description | ||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options
opt
|
Object | null |
Properties
|
- Source:
Methods
getWidth() [source]
Get ellipse's width
Returns:
Number:setWidth(width) [source]
Set new width to ellipse
Parameter | Type | Description |
---|---|---|
width
|
Number | new width |
Fires:
Returns:
Ellipse: thisgetHeight() [source]
Get ellipse's height
Returns:
Number:setHeight(height) [source]
Set new height to ellipse
Parameter | Type | Description |
---|---|---|
height
|
Number | new height |
Fires:
Returns:
Ellipse: thisgetShell() [source]
Gets the shell of the ellipse as a polygon, number of the shell points is decided by options.numberOfShellPoints
Returns:
Array.<Coordinate>: - shell coordinatesgetHoles() [source]
Ellipse 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.