new Sector(center, radius, startAngle, endAngle, optionsopt) [source]
var sector = new Sector([100, 0], 1000, 30, 120, {
id : 'sector0'
});
Parameter | Type | Default | Description |
---|---|---|---|
center
|
Coordinate | center of the sector | |
radius
|
Number | radius of the sector, in meter | |
startAngle
|
Number | start angle of the sector, in degree | |
endAngle
|
Number | end angle of the sector, in degree | |
options
opt
|
Object | null | construct options defined in Sector |
Extends:
Members
(constant) options
Properties:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options
|
Object | -
Properties
|
- Overrides:
- Source:
Methods
getStartAngle() [source]
Get the sector's start angle
Returns:
Number:setStartAngle(startAngle) [source]
Set a new start angle to the sector
Parameter | Type | Description |
---|---|---|
startAngle
|
Number |
Fires:
Returns:
Sector: thisgetEndAngle() [source]
Get the sector's end angle
Returns:
Number:setEndAngle(endAngle) [source]
Set a new end angle to the sector
Parameter | Type | Description |
---|---|---|
endAngle
|
Number |
Fires:
Returns:
Sector: thisgetShell() [source]
Gets the shell of the sector as a polygon, number of the shell points is decided by options.numberOfShellPoints
Returns:
Array.<Coordinate>: - shell coordinates(inherited) getRadius() [source]
Get radius of the circle
Inherited From:
Returns:
Number:(inherited) setRadius(radius) [source]
Set a new radius to the circle
Parameter | Type | Description |
---|---|---|
radius
|
Number | new radius |
Inherited From:
Fires:
Returns:
Circle: this(inherited) getHoles() [source]
Circle won't have any holes, always returns null
Inherited From:
Returns:
Array.<Object>: an empty array(inherited) getCoordinates() [source]
Get geometry's center
Mixes From:
Inherited From:
Returns:
Coordinate: - center of the geometry(inherited) setCoordinates(coordinates) [source]
Set a new center to the geometry
Parameter | Type | Description |
---|---|---|
coordinates
|
Coordinate | Array.<Number> | new center |
Mixes From:
Inherited 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.