public final class CircleOptions extends OverlayOptions
构造器和说明 |
---|
CircleOptions() |
限定符和类型 | 方法和说明 |
---|---|
CircleOptions |
addHoleOption(HoleOptions holeOption)
设置Circle的镂空形状选项
|
CircleOptions |
addHoleOptions(java.util.List<HoleOptions> holeOptions)
设置Circle的镂空形状列表
|
CircleOptions |
center(LatLng center)
设置圆心坐标
|
CircleOptions |
dottedStroke(boolean dottedStroke)
设置是否绘制虚线圆边框
|
CircleOptions |
dottedStrokeType(CircleDottedStrokeType circleDottedStrokeType)
设置Circle的虚线Stroke类型
|
CircleOptions |
extraInfo(Bundle extraInfo)
设置圆额外信息
|
CircleOptions |
fillColor(int color)
设置圆填充颜色
|
LatLng |
getCenter()
获取圆心坐标
|
int |
getCenterColor()
获取中心颜色
|
float |
getColorWeight()
获取颜色权重
|
Bundle |
getExtraInfo()
获取圆额外信息
|
int |
getFillColor()
获取填充颜色
|
int |
getRadius()
获取圆半径,单位 :米
|
float |
getRadiusWeight()
获取半径权重
|
int |
getSideColor()
获取边缘颜色
|
Stroke |
getStroke()
获取圆边框信息
|
int |
getZIndex()
获取圆 zIndex 信息
|
boolean |
isIsGradientCircle()
获取是否为渐变圆
|
boolean |
isVisible()
获取圆是否可见
|
CircleOptions |
radius(int radius)
设置圆半径
|
CircleOptions |
setCenterColor(int centerColor)
设置中心颜色
|
CircleOptions |
setClickable(boolean isClickable)
设置Circle是否可点击
|
CircleOptions |
setColorWeight(float colorWeight)
设置颜色权重
|
CircleOptions |
setIsGradientCircle(boolean isGradientCircle)
设置是否为渐变圆 true 需要 ,false 不需要
如设置true 渐变规则如下:
(0 ~ radiusWeight * radius) 该部分颜色从 centerColor 渐变至 colorWeight * (sideColor - centerColor);
(radiusWeight * radius ~ radius)该部分间颜色从 colorWeight * (sideColor - centerColor) 渐变至 sideColor;
注意:渐变圆不支持镂空及fillColor
|
CircleOptions |
setRadiusWeight(float radiusWeight)
设置半径权重
|
CircleOptions |
setSideColor(int sideColor)
设置边缘颜色
|
CircleOptions |
stroke(Stroke stroke)
设置圆边框信息
|
CircleOptions |
visible(boolean visible)
设置圆是否可见
|
CircleOptions |
zIndex(int zIndex)
设置圆 zIndex 信息
|
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 CircleOptions center(LatLng center)
center
- 圆心坐标public CircleOptions fillColor(int color)
color
- 圆填充颜色public CircleOptions radius(int radius)
radius
- 圆半径,单位:米public CircleOptions stroke(Stroke stroke)
stroke
- 圆边框信息public CircleOptions dottedStroke(boolean dottedStroke)
dottedStroke
- 是否绘制虚线圆边框public CircleOptions dottedStrokeType(CircleDottedStrokeType circleDottedStrokeType)
circleDottedStrokeType
- Circle的虚线Stroke类型枚举public CircleOptions addHoleOption(HoleOptions holeOption)
holeOption
- 镂空形状选项public CircleOptions addHoleOptions(java.util.List<HoleOptions> holeOptions)
holeOptions
- 镂空形状列表public CircleOptions setIsGradientCircle(boolean isGradientCircle)
isGradientCircle
- 是否是渐变圆 默认 false 不渐变public CircleOptions setCenterColor(int centerColor)
centerColor
- 中心颜色public CircleOptions setSideColor(int sideColor)
sideColor
- 边缘颜色public CircleOptions setRadiusWeight(float radiusWeight)
radiusWeight
- 取值范围(0.0, 1.0),默认 0.5public CircleOptions setColorWeight(float colorWeight)
colorWeight
- 取值范围(0.0, 1.0),默认 0.2public CircleOptions setClickable(boolean isClickable)
isClickable
- Circle是否可点击public CircleOptions visible(boolean visible)
visible
- 圆是否可见public boolean isVisible()
public CircleOptions zIndex(int zIndex)
zIndex
- 圆 zIndex 信息public int getZIndex()
public CircleOptions extraInfo(Bundle extraInfo)
extraInfo
- 圆额外信息public Bundle getExtraInfo()