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

- - Get Started
  - Style
  - Patterns
  - Building Blocks
  - Downloads
  - Videos
- - Training
  - API Guides
  - Reference
  - Tools
    - Get the SDK
  - Google Services
- - Google Play
  - Publishing
  - Promoting
  - App Quality
  - Spotlight
  - Open Distribution

## Results

Loading...
Summary: Constants | Inherited Constants | Fields | Ctors | Methods | Inherited Methods | [Expand All]
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
int | CONTENTS_FILE_DESCRIPTOR |
int | PARCELABLE_WRITE_RETURN_VALUE |

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

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

- this `CircleOptions` object

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

- this `CircleOptions` object

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

- 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`.

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

- this `CircleOptions` object