public final class

CircleOptions

extends Object
java.lang.Object
   ↳ com.amazon.geo.mapsv2.model.CircleOptions

Class Overview

An object for defining the initial options for a Circle object. Use this to define all the properties of a Circle before calling the addCircle(CircleOptions) method to add the Circle to the map.

Modifying CircleOptions after the Circle has been added to the map has no effect on the appearance of the Circle.

Note that CircleOptions methods do not need to be called on the main thread.

Summary

Public Constructors
CircleOptions()
Creates a new CircleOptions object with default values.
Public Methods
CircleOptions center(LatLng center)
Sets the geographic point to use for the center of the new Circle.
int describeContents()
boolean equals(Object obj)
CircleOptions fillColor(int color)
Sets the fill color in ARGB format.
LatLng getCenter()
Gets the geographic location to use as the center of the new Circle as a LatLng.
int getFillColor()
Gets the fill color to use for the new Circle.
double getRadius()
Gets the radius to use for the Circle in meters.
int getStrokeColor()
Gets the stroke color to use for the new Circle.
float getStrokeWidth()
Gets the stroke width to use for the new Circle.
float getZIndex()
Gets the z-index to use for the new Circle.
int hashCode()
boolean isVisible()
Returns a boolean indicating whether the new Circle is visible or hidden.
CircleOptions radius(double radius)
Sets the radius to use for the new Circle in meters.
CircleOptions strokeColor(int color)
Sets the stroke color to use for the new Circle in ARGB format.
CircleOptions strokeWidth(float width)
Sets the stroke width to use for the new Circle's outline in screen pixels.
CircleOptions visible(boolean visible)
Sets the visibility to use for the new Circle.
void writeToParcel(Parcel out, int flags)
CircleOptions zIndex(float zIndex)
Sets the z-index to use for the new the Circle.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public CircleOptions ()

Creates a new CircleOptions object with default values.

Public Methods

public CircleOptions center (LatLng center)

Sets the geographic point to use for the center of the new Circle. This cannot be null. There is no default value for this property.

Parameters
center A non-null LatLng representing the latitude / longitude of the geographic point at the center of the Circle.
Returns
  • This CircleOptions object.

public int describeContents ()

public boolean equals (Object obj)

public CircleOptions fillColor (int color)

Sets the fill color in ARGB format. Fill color is the color drawn inside the Circle. To draw a circle with no fill, use TRANSPARENT. The default value is TRANSPARENT.

Parameters
color The color in ARGB format. See Color for more details.
Returns
  • This CircleOptions object.

public LatLng getCenter ()

Gets the geographic location to use as the center of the new Circle as a LatLng.

Returns
  • The LatLng representing the center of the new Circle.

public int getFillColor ()

Gets the fill color to use for the new Circle.

Returns
  • The fill color of the new Circle in ARGB format. See Color for more details.

public double getRadius ()

Gets the radius to use for the Circle in meters.

Returns
  • The radius of the new Circle in meters.

public int getStrokeColor ()

Gets the stroke color to use for the new Circle.

Returns
  • The stroke color of the new Circle in ARGB format. See Color for more details.

public float getStrokeWidth ()

Gets the stroke width to use for the new Circle.

Returns
  • The stroke width of the new Circle in screen pixels.

public float getZIndex ()

Gets the z-index to use for the new Circle.

Returns
  • The z-index for the new Circle.

public int hashCode ()

public boolean isVisible ()

Returns a boolean indicating whether the new Circle is visible or hidden.

Returns
  • true if the new Circle is visible, or false if it is hidden.

public CircleOptions radius (double radius)

Sets the radius to use for the new Circle in meters. The radius must be zero or greater. Setting a negative radius causes addCircle(CircleOptions) to throw an IllegalArgumentException. The default value is zero.

Parameters
radius The radius of the new Circle in meters.
Returns
  • This CircleOptions object.

public CircleOptions strokeColor (int color)

Sets the stroke color to use for the new Circle in ARGB format. Stroke color is the color of the circle's outline. To draw no outline, use TRANSPARENT. The default value is BLACK.

Parameters
color The stroke color of the new Circle in ARGB format. See Color for more details.
Returns
  • This CircleOptions object.

public CircleOptions strokeWidth (float width)

Sets the stroke width to use for the new Circle's outline in screen pixels. Must be zero or greater. Setting a negative stroke width causes addCircle(CircleOptions) to throw an IllegalArgumentException. No outline is drawn if the stroke width is set to zero. The default value is 10.

Parameters
width The stroke width of the new Circle in screen pixels.
Returns
  • This CircleOptions object.

public CircleOptions visible (boolean visible)

Sets the visibility to use for the new Circle. The default value is true.

Parameters
visible true to make the circle visible, or false to make it invisible.
Returns
  • This CircleOptions object.

public void writeToParcel (Parcel out, int flags)

public CircleOptions zIndex (float zIndex)

Sets the z-index to use for the new the Circle. Z-index determines the order in which overlays are drawn. Overlays with higher indices are drawn over overlays with lower indices. Overlays with the same z-index are drawn in an arbitrary order.

Overlays that are affected by z-index include GroundOverlay, TileOverlay, Circle, Polyline, and Polygon.

Marker overlays are not affected by the z-index of other overlays.

The default value is zero.

Parameters
zIndex The z-index for the new Circle.
Returns
  • This CircleOptions object.