目录

public class CircleOptions

Defines attributes for a Circle object.

Public Fields

None.

Constructor

Construction Method
CircleOptions()

Public Method Summary

Return typeMethod name
CircleOptionscenter(LatLng center)
CircleOptionsclickable(boolean clickable)
CircleOptionsfillColor(int color)
LatLnggetCenter()
intgetFillColor()
doublegetRadius()
intgetStrokeColor()
List<PatternItem>getStrokePattern()
floatgetStrokeWidth()
floatgetZIndex()
booleanisClickable()
booleanisVisible()
CircleOptionsradius(double radius)
CircleOptionsstrokeColor(int color)
CircleOptionsstrokePattern(List<PatternItem> pattern)
CircleOptionsstrokeWidth(float width)
CircleOptionsvisible(boolean visible)
CircleOptionszIndex(float zIndex)

Exception

Exception TypeScenario
NullPointerExceptionThe target is null.
IllegalArgumentExceptionThe input tilt is out of the range from 0 to 90 degrees.

Public Methods

Method
public CircleOptions center(LatLng center)
Sets the center of a circle and obtains a CircleOptions object. This method is mandatory because there is no default center.


Parameters:

Parameter nameParameter desc
centerCenter of a circle, which cannot be null.


Return:

Return typeParameter desc
CircleOptionsCircleOptions object.
Method
public CircleOptions clickable(boolean clickable)
Specifies whether a circle is tappable. By default, a circle is not tappable.


Parameters:

Parameter nameParameter desc
clickableIndicates whether a circle is tappable. The options are true (yes) and false (no).


Return:

Return typeParameter desc
CircleOptionsCircleOptions object.
Method
public CircleOptions fillColor(int color)
Sets the fill color of a circle.


Parameters:

Parameter nameParameter desc
colorFill color of a circle, in ARGB format. By default, the fill color is transparent (0x00000000).


Return:

Return typeParameter desc
CircleOptionsCircleOptions object.
Method
public LatLng getCenter()
Obtains the latitude and longitude of the center of a circle.


Parameters:
None.
Return:

Return typeParameter desc
LatLngLatLng object.
Method
public int getFillColor()
Obtains the fill color of a circle.


Parameters:
None.
Return:

Return typeParameter desc
intFill color of a circle.
Method
public double getRadius()
Obtains the radius of a circle, in meters.


Parameters:
None.
Return:

Return typeParameter desc
doubleRadius of a circle, in meters.
Method
public int getStrokeColor()
Obtains the stroke color of a circle's outline.


Parameters:
None.
Return:

Return typeParameter desc
intStroke color of a circle's outline.
Method
public List<PatternItem> getStrokePattern()
Obtains the stroke pattern of a circle's outline.


Parameters:
None.
Return:

Return typeParameter desc
List<PatternItem>Stroke pattern of a circle's outline.
Method
public float getStrokeWidth()
Obtains the stroke width of a circle's outline.


Parameters:
None.
Return:

Return typeParameter desc
floatStroke width of a circle's outline, in pixels.
Method
public float getZIndex()
Obtains the z-index of a circle.


Parameters:
None.
Return:

Return typeParameter desc
floatZ-index, which indicates the overlapping order of a circle.
Method
public boolean isClickable()
Checks whether a circle is tappable.


Parameters:
None.
Return:

Return typeParameter desc
booleanIf a circle is tappable, true is returned. Otherwise, false is returned.
Method
public boolean isVisible()
Checks whether a circle is visible.


Parameters:
None.
Return:

Return typeParameter desc
booleanIf a circle is visible, true is returned. Otherwise, false is returned.
Method
public CircleOptions radius(double radius)
Sets the radius of a circle by passing a value greater than or equal to 0. By default, the radius is 0.


Parameters:

Parameter nameParameter desc
radiusRadius of a circle.


Return:

Return typeParameter desc
CircleOptionsCircleOptions object.
Method
public CircleOptions strokeColor(int color)
Sets the stroke color of a circle's outline.


Parameters:

Parameter nameParameter desc
colorStroke color of a circle's outline. By default, the stroke color is black (0xff000000).


Return:

Return typeParameter desc
CircleOptionsCircleOptions object.
Method
public CircleOptions strokePattern(List<PatternItem> pattern)
Sets the stroke pattern of a circle's outline.


Parameters:

Parameter nameParameter desc
patternStroke pattern of a circle's outline.


Return:

Return typeParameter desc
CircleOptionsCircleOptions object.
Method
public CircleOptions strokeWidth(float width)
Sets the stroke width of a circle's outline.


Parameters:

Parameter nameParameter desc
widthStroke width of a circle's outline, in pixels. The value must be greater than or equal to 0.


Return:

Return typeParameter desc
CircleOptionsCircleOptions object.
Method
public CircleOptions visible(boolean visible)
Specifies whether a circle is visible. If the circle is invisible, it will not be drawn but all other states will be preserved.


Parameters:

Parameter nameParameter desc
visibleIndicates whether a circle is visible. The options are true (yes) and false (no).


Return:

Return typeParameter desc
CircleOptionsCircleOptions object.
Method
public CircleOptions zIndex(float zIndex)
Sets the z-index of a circle. The z-index indicates the overlapping order of a circle. A circle with a larger z-index overlaps that with a smaller z-index. Circles with the same z-index overlap each other in a random order. By default, the z-index is 0.


Parameters:

Parameter nameParameter desc
zIndexZ-index, which indicates the overlapping order of a circle.


Return:

Return typeParameter desc
CircleOptionsCircleOptions object.