public final class

CircleOptions

extends Object
implements Parcelable
java.lang.Object
   ↳ com.google.android.gms.maps.model.CircleOptions

Class Overview

Options for a Circle.

Summary

Constants
String NULL
[Expand]
Inherited Constants
From interface android.os.Parcelable
Fields
public static final CircleOptionsCreator CREATOR
Public Constructors
CircleOptions()
Creates circle options.
Public Methods
CircleOptions center(LatLng point)
Sets the center using a LatLng.
int describeContents()
CircleOptions fillColor(int color)
Sets the fill color.
LatLng getCenter()
Gets the center as a LatLng.
int getFillColor()
Gets the fill color.
double getRadius()
Gets the radius in meters.
int getStrokeColor()
Gets the stroke color.
float getStrokeWidth()
Gets the stroke width.
float getZIndex()
Gets the zIndex.
boolean isVisible()
Gets the visibility of this circle.
CircleOptions radius(double radius)
Sets the radius in meters.
CircleOptions strokeColor(int color)
Sets the stroke color.
CircleOptions strokeWidth(float width)
Sets the stroke width.
CircleOptions visible(boolean visible)
Sets the visibility.
void writeToParcel(Parcel out, int flags)
CircleOptions zIndex(float zIndex)
Sets the zIndex.
[Expand]
Inherited Methods
From class java.lang.Object
From interface android.os.Parcelable

Constants

public static final String NULL

Constant Value: "SAFE_PARCELABLE_NULL_STRING"

Fields

public static final CircleOptionsCreator CREATOR

Public Constructors

public CircleOptions ()

Creates circle options.

Public Methods

public CircleOptions center (LatLng point)

Sets the center using a LatLng.

The center must not be null.

This method is mandatory because there is no default center.

Returns

public int describeContents ()

public CircleOptions 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.

Parameters
color color in the Color format
Returns

public LatLng getCenter ()

Gets the center as a LatLng.

Returns
  • geographic center as a LatLng

public int getFillColor ()

Gets the fill color.

Returns
  • color in the Color format

public double getRadius ()

Gets the radius in meters.

Returns
  • radius in meters

public int getStrokeColor ()

Gets the stroke color.

Returns
  • color in the Color format

public float getStrokeWidth ()

Gets the stroke width.

Returns
  • width in screen pixels

public float getZIndex ()

Gets the zIndex.

Returns
  • zIndex value

public boolean isVisible ()

Gets the visibility of this circle.

Returns
  • false if the circle is invisible

public CircleOptions 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

public CircleOptions strokeColor (int color)

Sets the stroke color.

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

By default the stroke color is BLACK.

Parameters
color color in the Color format
Returns

public CircleOptions 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

public CircleOptions 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 false to make this circle invisible
Returns

public void writeToParcel (Parcel out, int flags)

public CircleOptions 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