public final class Circle extends Overlay
listener, mcLocation, mDrawItem, type
限定符和类型 | 方法和说明 |
---|---|
LatLng |
getCenter()
获取圆心坐标
|
int |
getCenterColor()
获取中心颜色
|
float |
getColorWeight()
获取颜色权重
|
int |
getDottedStrokeType()
获取Circle的虚线Stroke类型
|
int |
getFillColor()
获取填充颜色
|
int |
getHoleClickedIndex()
获取镂空的点击索引
|
HoleOptions |
getHoleOption()
获取Circle的镂空形状选项
|
java.util.List<HoleOptions> |
getHoleOptions()
获取Circle的镂空形状列表
|
int |
getRadius()
获取圆的半径,单位:米
|
float |
getRadiusWeight()
获取半径权重
|
int |
getSideColor()
获取边缘颜色
|
Stroke |
getStroke()
获取圆的边框信息
|
boolean |
isClickable()
获取是否可点击
|
boolean |
isDottedStroke()
判断圆的边框是否设置为虚线
|
boolean |
isIsGradientCircle()
获取是否为渐变圆
|
void |
setCenter(LatLng center)
设置圆心坐标
|
void |
setCenterColor(int centerColor)
设置中心颜色
|
void |
setClickable(boolean isClickable)
设置Circle是否可点击
|
void |
setColorWeight(float colorWeight)
设置颜色权重
|
void |
setDottedStroke(boolean dotStroke)
设置是否绘制虚线圆边框
|
void |
setDottedStrokeType(CircleDottedStrokeType circleDottedStrokeType)
设置Circle的虚线Stroke类型
|
void |
setFillColor(int color)
设置圆填充颜色
|
void |
setHoleClickable(boolean isClickable)
设置PolygonHole是否可点击
|
void |
setHoleOption(HoleOptions holeOption)
设置Circle的镂空形状选项
|
void |
setHoleOptions(java.util.List<HoleOptions> holeOptions)
设置Circle的镂空形状列表
|
void |
setIsGradientCircle(boolean isGradientCircle)
设置是否为渐变圆 true 需要 ,false 不需要
如设置true 渐变规则如下:
(0 ~ radiusWeight * radius) 该部分颜色从 centerColor 渐变至 colorWeight * (sideColor - centerColor);
(radiusWeight * radius ~ radius)该部分间颜色从 colorWeight * (sideColor - centerColor) 渐变至 sideColor;
注意:渐变圆不支持镂空及fillColor
|
void |
setRadius(int radius)
设置圆的半径
|
void |
setRadiusWeight(float radiusWeight)
设置半径权重
|
void |
setSideColor(int sideColor)
设置边缘颜色
|
void |
setStroke(Stroke stroke)
设置圆的边框信息
|
BmDrawItem |
toDrawItem() |
circleHoleInfo2BmGeo, getBmLayer, getDrawItem, getExtraInfo, getName, getOverlayLatLngBounds, getZIndex, holeInfo2BmGeo, isRemoved, isVisible, polygonHoleInfo2BmGeo, remove, setBmLayer, setDottedBitmapResource, setDrawItem, setExtraInfo, setVisible, setZIndex
public boolean isIsGradientCircle()
public int getCenterColor()
public int getSideColor()
public float getRadiusWeight()
public float getColorWeight()
public LatLng getCenter()
public int getFillColor()
public int getRadius()
public Stroke getStroke()
public void setIsGradientCircle(boolean isGradientCircle)
isGradientCircle
- 是否是渐变圆 默认 false 不渐变public void setCenterColor(int centerColor)
centerColor
- 中心颜色public void setSideColor(int sideColor)
sideColor
- 边缘颜色public void setRadiusWeight(float radiusWeight)
radiusWeight
- 取值范围(0.0, 1.0),默认 0.5public void setColorWeight(float colorWeight)
colorWeight
- 取值范围(0.0, 1.0),默认 0.2public void setCenter(LatLng center)
center
- 圆心坐标public void setFillColor(int color)
color
- 圆填充颜色public void setRadius(int radius)
radius
- 圆的半径public void setStroke(Stroke stroke)
stroke
- 圆的边框信息public void setDottedStroke(boolean dotStroke)
dotStroke
- 是否绘制虚线圆边框public boolean isDottedStroke()
public void setDottedStrokeType(CircleDottedStrokeType circleDottedStrokeType)
circleDottedStrokeType
- Circle的虚线Stroke类型public int getDottedStrokeType()
public void setHoleOption(HoleOptions holeOption)
holeOption
- 镂空形状选项public HoleOptions getHoleOption()
public void setHoleOptions(java.util.List<HoleOptions> holeOptions)
holeOptions
- 镂空形状列表public void setClickable(boolean isClickable)
isClickable
- Circle是否可点击public boolean isClickable()
public java.util.List<HoleOptions> getHoleOptions()
public void setHoleClickable(boolean isClickable)
isClickable
- PolygonHole是否可点击public BmDrawItem toDrawItem()
public int getHoleClickedIndex()