public final class

Circle

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

Class Overview

A circle overlay that can be displayed on the map. Obtain a Circle by creating a CircleOptions object with the initial circle properties and then passing it to addCircle(CircleOptions).

You can change the properties of the Circle using the setter methods after the Circle is created. Note that all getter and setter methods must be called on the main thread or an IllegalStateException is thrown.

Summary

Public Constructors
Circle(ICircleDelegate delegate)
Public constructor.
Public Methods
LatLng getCenter()
Gets the geographic location of the center of this Circle as a LatLng.
int getFillColor()
Gets the fill color of this Circle.
String getId()
Gets the unique ID for this Circle.
double getRadius()
Gets the radius of the Circle in meters.
int getStrokeColor()
Gets the stroke color of this Circle.
float getStrokeWidth()
Gets the stroke width of this Circle in screen pixels.
float getZIndex()
Gets the z-index of this Circle.
boolean isVisible()
A boolean value indicating whether the Circle is visible or hidden.
void remove()
Removes this Circle from the map.
void setCenter(LatLng center)
Sets the geographic point at the center of this Circle.
void setFillColor(int color)
Sets the fill color in ARGB format.
void setRadius(double radius)
Sets the radius of this Circle in meters.
void setStrokeColor(int color)
Sets the stroke color in ARGB format.
void setStrokeWidth(float width)
Sets the stroke width of this Circle's outline in screen pixels.
void setVisible(boolean visible)
Sets the visibility of the Circle.
void setZIndex(float zIndex)
Sets the z-index of the Circle.
String toString()
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public Circle (ICircleDelegate delegate)

Public constructor. Instead of using this constructor, use AmazonMap.addCircle(CircleOptions) to create a Circle.

Public Methods

public LatLng getCenter ()

Gets the geographic location of the center of this Circle as a LatLng.

Returns
  • The LatLng representing the center of this Circle.

public int getFillColor ()

Gets the fill color of this Circle.

Returns
  • This Circle's fill color in ARGB format. See Color for more details.

public String getId ()

Gets the unique ID for this Circle. The ID is unique for all Circle objects currently added to the map.

Returns
  • This Circle's ID as a String.

public double getRadius ()

Gets the radius of the Circle in meters.

Returns
  • This Circle's radius in meters.

public int getStrokeColor ()

Gets the stroke color of this Circle.

Returns
  • This Circle's stroke color in ARGB format. See Color for more details.

public float getStrokeWidth ()

Gets the stroke width of this Circle in screen pixels.

Returns
  • This Circle's stroke width in screen pixels.

public float getZIndex ()

Gets the z-index of this Circle.

Returns
  • This Circle's z-index.

public boolean isVisible ()

A boolean value indicating whether the Circle is visible or hidden.

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

public void remove ()

Removes this Circle from the map. After calling this method, calling other methods on the object has no effect on the appearance of the map.

public void setCenter (LatLng center)

Sets the geographic point at the center of this Circle. This cannot be null.

Parameters
center A LatLng representing the latitude / longitude of the geographic point at the center of the Circle.
Throws
NullPointerException if center is null.

public void setFillColor (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.

public void setRadius (double radius)

Sets the radius of this Circle in meters. The radius must be zero or greater. The default value is zero.

Parameters
radius The radius of the Circle in meters.

public void setStrokeColor (int color)

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

Parameters
color The color in ARGB format. See Color for more details.

public void setStrokeWidth (float width)

Sets the stroke width of this Circle's outline in screen pixels. Must be zero or greater. No outline is drawn if stroke width is set to zero. The default value is 10.

Parameters
width The stroke width in screen pixels.
Throws
IllegalArgumentException if width is less than zero.

public void setVisible (boolean visible)

Sets the visibility of the Circle. If false, the Circle is hidden, but all state is preserved. The default value is true.

Parameters
visible true to make this Circle visible, or false to make it hidden.

public void setZIndex (float zIndex)

Sets the z-index of 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.

public String toString ()