CircleOptions | Android Developers

Quicknav Quicknav
Links

- Google Play Developer Console
- Android Developers Blog
- About Android

Android Sites

- Android.com
- Android Developers
- Android Open Source Project

Language
close

- - About
  - Wear
  - TV
  - Auto
- - Get Started
  - Devices
  - Style
  - Patterns
  - Building Blocks
  - Downloads
  - Videos
- - Training
  - API Guides
  - Reference
  - Tools
  - Google Services
  - Samples
- - Google Play
  - Essentials
  - Get Users
  - Engage & Retain
  - Monetize
  - Tools & Reference
  - Developer Stories

## Results

Loading...
Summary: Inherited Constants | Fields | Ctors | Methods | Inherited Methods | [Expand All]
public final class

# CircleOptions

extends Object
implements SafeParcelable

java.lang.Object
↳ | com.google.android.gms.maps.model.CircleOptions

## Class Overview

Defines options for a `Circle`.

### Developer Guide

For more information, read the Shapes developer guide.

## Summary

[Expand] Inherited Constants
From interface android.os.Parcelable
int | CONTENTS_FILE_DESCRIPTOR |
int | PARCELABLE_WRITE_RETURN_VALUE |
From interface com.google.android.gms.common.internal.safeparcel.SafeParcelable
String | NULL |

Fields
public static final CircleOptionsCreator | CREATOR |

Public Constructors
| CircleOptions() Creates circle options.

Public Methods
CircleOptions | center(LatLng center) Sets the center using a `LatLng`.
CircleOptions | fillColor(int color) Sets the fill color.
LatLng | getCenter() Returns the center as a `LatLng`.
int | getFillColor() Returns the fill color.
double | getRadius() Returns the circle's radius, in meters.
int | getStrokeColor() Returns the stroke color.
float | getStrokeWidth() Returns the stroke width.
float | getZIndex() Returns the zIndex.
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 | strokeWidth(float width) Sets the stroke width.
CircleOptions | visible(boolean visible) Sets the visibility.
CircleOptions | zIndex(float zIndex) Sets the zIndex.

[Expand] Inherited Methods
From class java.lang.Object
Object | clone()
boolean | equals(Object arg0)
void | finalize()
final Class<?> | getClass()
int | hashCode()
final void | notify()
final void | notifyAll()
String | toString()
final void | wait()
final void | wait(long arg0, int arg1)
final void | wait(long arg0)
From interface android.os.Parcelable
abstract int | describeContents()
abstract void | writeToParcel(Parcel arg0, int arg1)

## Fields

#### public static final CircleOptionsCreator CREATOR

## Public Constructors

#### public CircleOptions ()

Creates circle options.

## Public Methods

#### public CircleOptions center (LatLng center)

Sets the center using a `LatLng`.

The center must not be null.

This method is mandatory because there is no default center.

##### Parameters

center | The geographic center as a `LatLng`.

##### Returns

- this `CircleOptions` object

#### 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 (`0x00000000`).

##### Parameters

color | color in the `Color` format

##### Returns

- this `CircleOptions` object

#### public LatLng getCenter ()

Returns the center as a `LatLng`.

##### Returns

- The geographic center as a `LatLng`.

#### public int getFillColor ()

Returns the fill color.

##### Returns

- The color in the `Color` format.

#### public double getRadius ()

Returns the circle's radius, in meters.

##### Returns

- The radius in meters.

#### public int getStrokeColor ()

Returns the stroke color.

##### Returns

- The color in the `Color` format.

#### public float getStrokeWidth ()

Returns the stroke width.

##### Returns

- The width in screen pixels.

#### public float getZIndex ()

Returns the zIndex.

##### Returns

- The zIndex value.

#### public boolean isVisible ()

Checks whether the circle is visible.

##### Returns

- True if the circle is visible; false if it 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

- this `CircleOptions` object

#### 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 (`0xff000000`).

##### Parameters

color | color in the `Color` format

##### Returns

- this `CircleOptions` object

#### 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

- this `CircleOptions` object

#### 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

- this `CircleOptions` object

#### 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

- this `CircleOptions` object