CircleOptions

public final classCircleOptionsextendsObject
implementsParcelable

Defines options for aCircle.

Developer Guide

For more information, read theShapesdeveloper guide.

Inherited Constant Summary

Public Constructor Summary

CircleOptions()
Creates circle options.

Public Method Summary

CircleOptions
center(LatLng center)
Sets the center using aLatLng.
CircleOptions
clickable(boolean clickable)
Specifies whether this circle is clickable.
CircleOptions
fillColor(int color)
Sets the fill color.
LatLng
getCenter()
Returns the center as aLatLng.
int
getFillColor()
Returns the fill color.
double
getRadius()
Returns the circle's radius, in meters.
int
getStrokeColor()
Returns the stroke color.
List<PatternItem>
getStrokePattern()
Returns the stroke pattern set in thisCircleOptions object for the circle's outline.
float
getStrokeWidth()
Returns the stroke width.
float
getZIndex()
Returns the zIndex.
boolean
isClickable()
Gets the clickability setting for the circle.
boolean
isVisible()
Checks whether the circle is visible.
CircleOptions
radius(double radius)
Sets the radius in meters.
CircleOptions
strokeColor(int color)
Sets the stroke color.
CircleOptions
strokePattern(List<PatternItem> pattern)
Sets a stroke pattern for the circle's outline.
CircleOptions
strokeWidth(float width)
Sets the stroke width.
CircleOptions
visible(boolean visible)
Sets the visibility.
CircleOptions
zIndex(float zIndex)
Sets the zIndex.

Inherited Method Summary

Public Constructors

publicCircleOptions()

Creates circle options.

Public Methods

publicCircleOptions center(LatLng center)

Sets the center using aLatLng.

The center must not benull.

This method is mandatory because there is no default center.

Parameters
center The geographic center as aLatLng.
Returns

publicCircleOptions clickable(boolean clickable)

Specifies whether this circle is clickable. The default setting is false.

Returns

publicCircleOptions fillColor(int color)

Sets the fill color.

The fill color is the color inside the circle, in the integer format specified by Color.If TRANSPARENT is used then no fill is drawn.

By default the fill color is transparent (0x00000000).

Parameters
color color in theColor format
Returns

publicLatLng getCenter()

Returns the center as aLatLng.

Returns
  • The geographic center as aLatLng, ornullif not set yet.

public intgetFillColor()

Returns the fill color.

Returns
  • The color in theColor format.

public doublegetRadius()

Returns the circle's radius, in meters.

Returns
  • The radius in meters.

public intgetStrokeColor()

Returns the stroke color.

Returns
  • The color in theColor format.

publicList<PatternItem> getStrokePattern()

Returns the stroke pattern set in thisCircleOptions object for the circle's outline.

Returns
  • the stroke pattern of the circle's outline.

public floatgetStrokeWidth()

Returns the stroke width.

Returns
  • The width in screen pixels.

public floatgetZIndex()

Returns the zIndex.

Returns
  • The zIndex value.

public booleanisClickable()

Gets the clickability setting for the circle.

Returns
  • trueif the circle is clickable;falseif it is not.

public booleanisVisible()

Checks whether the circle is visible.

Returns
  • trueif the circle is visible;falseif it is invisible.

publicCircleOptions radius(double radius)

Sets the radius in meters.

The radius must be zero or greater. The default radius is zero.

Parameters
radius radius in meters
Returns

publicCircleOptions strokeColor(int color)

Sets the stroke color.

The stroke color is the color of this circle's outline, in the integer format specified byColor.If TRANSPARENT is used then no outline is drawn.

By default the stroke color is black (0xff000000).

Parameters
color color in theColor format
Returns

publicCircleOptions strokePattern(List<PatternItem> pattern)

Sets a stroke pattern for the circle's outline. The default stroke pattern is solid, represented bynull.

Returns

publicCircleOptions strokeWidth(float width)

Sets the stroke width.

The stroke width is the width (in screen pixels) of the circle's outline. It must be zero or greater. If it is zero then no outline is drawn.

The default width is 10 pixels.

Parameters
width width in screen pixels
Returns

publicCircleOptions visible(boolean visible)

Sets the visibility.

If this circle is not visible then it is not drawn, but all other state is preserved.

Parameters
visible falseto make this circle invisible
Returns

publicCircleOptions zIndex(float zIndex)

Sets the zIndex.

Overlays (such as circles) with higher zIndices are drawn above those with lower indices.

By default the zIndex is 0.0.

Parameters
zIndex zIndex value
Returns