HERE Android SDK Developer's Guide

MapCircle

The class MapCircle is a member of com.here.android.mpa.mapping .

Class Summary

public final class MapCircle

extends com.here.android.mpa.mapping.MapObject, com.here.android.mpa.common.ViewObject, java.lang.Object

Represents a MapObject in the shape of a circle.

[For complete information, see the section Class Details]

Constructor Summary

Table 1. Constructors in MapCircle
Constructors

MapCircle (double radius, GeoCoordinate center)

Constructs a MapCircle , which is a MapObject in the shape of a circle.

Method Summary

Table 2. Methods in MapCircle
Methods

public GeoCoordinate getCenter ()

Returns the GeoCoordinate representing the current center of the MapCircle .

public int getFillColor ()

Returns the current fill color for this MapCircle , returning an ARGB (Alpha/Red/Green/Blue) integer color value.

public int getLineColor ()

Returns the current border line color for this MapCircle , as an ARGB (Alpha/Red/Green/Blue) integer color value.

public int getLineWidth ()

Returns the current border line width for this MapCircle , in pixels.

public double getRadius ()

Returns the current radius of the MapCircle , in meters.

public Type getType ()

public MapCircle setCenter (GeoCoordinate center)

Sets the center for this MapCircle to a specified GeoCoordinate.

public MapCircle setFillColor (int argbColor)

Sets a fill color for this MapCircle using an ARGB (Alpha/Red/Green/Blue) integer color value.

public MapCircle setLineColor (int argbColor)

Sets a border line color for this MapCircle , using an ARGB (Alpha/Red/Green/Blue) integer color value.

public MapCircle setLineWidth (int width)

Sets a border line width, in pixels, for this MapCircle , an int value within the [0..100] range.

public MapCircle setRadius (double radius)

Sets a radius for this MapCircle , in meters.

public MapObject setVisible (boolean isVisible)

Sets whether this MapObject is visible.

Class Details

Represents a MapObject in the shape of a circle.

Constructor Details

MapCircle (double radius, GeoCoordinate center)

Constructs a MapCircle , which is a MapObject in the shape of a circle.

Parameters:

  • radius

    Desired radius of the MapCircle, in meters

  • center

    A GeoCoordinate representing the center of the MapCircle.

Throws:

  • IllegalArgumentException

    If center is invalid.

Method Details

public GeoCoordinate getCenter ()

Returns the GeoCoordinate representing the current center of the MapCircle .

Returns:

The current MapCircle center

public int getFillColor ()

Returns the current fill color for this MapCircle , returning an ARGB (Alpha/Red/Green/Blue) integer color value. Default fill color is solid blue or in ARGB color, 0xFF0000FF.

Returns:

The current ARGB integer color value. The packed integer is made up of 4 bytes: alpha, red, green, blue. Each color component has a value range from [0..255] with 0 meaning no contribution for that component, and 255 meaning 100% contribution

See also:

android.graphics.Color

public int getLineColor ()

Returns the current border line color for this MapCircle , as an ARGB (Alpha/Red/Green/Blue) integer color value. Default line color is solid blue, or in ARGB color, 0xFF0000FF.

Returns:

The current ARGB integer color value. The packed integer is made up of 4 bytes: alpha, red, green, blue. Each color component has a value range from [0..255] with 0 meaning no contribution for that component, and 255 meaning 100% contribution

See also:

android.graphics.Color

public int getLineWidth ()

Returns the current border line width for this MapCircle , in pixels. The default width is 0 pixels.

Returns:

The current width of the line defining the border of the MapCircle.

public double getRadius ()

Returns the current radius of the MapCircle , in meters. The default radius of a MapCircle instance is 1.

Returns:

The current radius of this MapCircle.

public Type getType ()

public MapCircle setCenter (GeoCoordinate center)

Sets the center for this MapCircle to a specified GeoCoordinate.

Parameters:

  • center

    Desired GeoCoordinate for this MapCircle center.

Returns:

The updated MapCircle itself.

Throws:

  • IllegalArgumentException

    If center is invalid.

public MapCircle setFillColor (int argbColor)

Sets a fill color for this MapCircle using an ARGB (Alpha/Red/Green/Blue) integer color value.

Parameters:

  • argbColor

    Desired ARGB integer color value. The packed integer is made up of 4 bytes: alpha, red, green, blue. Each color component has a value range from [0..255] with 0 meaning no contribution for that component, and 255 meaning 100% contribution

Returns:

The updated MapCircle itself.

See also:

android.graphics.Color

public MapCircle setLineColor (int argbColor)

Sets a border line color for this MapCircle , using an ARGB (Alpha/Red/Green/Blue) integer color value.

Parameters:

  • argbColor

    Desired ARGB integer color value. The packed integer is made up of 4 bytes: alpha, red, green, blue. Each color component has a value range from [0..255] with 0 meaning no contribution for that component, and 255 meaning 100% contribution

Returns:

The updated MapCircle itself.

See also:

android.graphics.Color

public MapCircle setLineWidth (int width)

Sets a border line width, in pixels, for this MapCircle , an int value within the [0..100] range.

Parameters:

  • width

    Desired width of the line defining the border of the MapCircle

Returns:

The updated MapCircle itself.

public MapCircle setRadius (double radius)

Sets a radius for this MapCircle , in meters.

Parameters:

  • radius

    Desired radius of the MapCircle.

Returns:

The updated MapCircle itself.

Throws:

  • IllegalArgumentException

    If the supplied radius is less than or equal to zero.

public MapObject setVisible (boolean isVisible)

Sets whether this MapObject is visible.

Parameters:

  • isVisible

    A boolean variable specifying whether this MapObject is visible

Returns:

The updated MapObject itself.

See also:

setVisible(boolean)