public final class Circle

  1. Object
  2. MapObject
  3. Circle
A geodesic circle drawn on a map, described by a center and a radius in meters. Add one through MapSurface.addCircle(Circle).

Constructors

public Circle(LatLng center, double radiusMeters)Creates a circle.

Methods

public LatLng getCenter()The circle center.
public Circle setCenter(LatLng center)Moves the circle center.
public double getRadiusMeters()The radius in meters.
public Circle setRadiusMeters(double radiusMeters)Sets the radius in meters.
public int getFillColor()The fill color as 0xAARRGGBB (alpha in the high byte).
public Circle setFillColor(int fillColor)Sets the fill color as 0xAARRGGBB (alpha in the high byte).
public int getStrokeColor()The stroke color as 0xRRGGBB.
public Circle setStrokeColor(int strokeColor)Sets the stroke color as 0xRRGGBB.
public int getStrokeWidth()The stroke width in pixels (0 hides the outline).
public Circle setStrokeWidth(int strokeWidth)Sets the stroke width in pixels (0 hides the outline).
public boolean isVisible()Whether the circle is rendered.
public Circle setVisible(boolean visible)Shows or hides the circle.

Inherited methods

Constructor details

Circle

public Circle(LatLng center, double radiusMeters)
Creates a circle.

Parameters

center LatLng
the geographic center
radiusMeters double
the radius in meters

Method details

getCenter

public LatLng getCenter()
The circle center.

setCenter

public Circle setCenter(LatLng center)
Moves the circle center.

getRadiusMeters

public double getRadiusMeters()
The radius in meters.

setRadiusMeters

public Circle setRadiusMeters(double radiusMeters)
Sets the radius in meters.

getFillColor

public int getFillColor()
The fill color as 0xAARRGGBB (alpha in the high byte).

setFillColor

public Circle setFillColor(int fillColor)
Sets the fill color as 0xAARRGGBB (alpha in the high byte).

getStrokeColor

public int getStrokeColor()
The stroke color as 0xRRGGBB.

setStrokeColor

public Circle setStrokeColor(int strokeColor)
Sets the stroke color as 0xRRGGBB.

getStrokeWidth

public int getStrokeWidth()
The stroke width in pixels (0 hides the outline).

setStrokeWidth

public Circle setStrokeWidth(int strokeWidth)
Sets the stroke width in pixels (0 hides the outline).

isVisible

public boolean isVisible()
Whether the circle is rendered.

setVisible

public Circle setVisible(boolean visible)
Shows or hides the circle.