HERE Android SDK Developer's Guide

PositionIndicator

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

Class Summary

public final class PositionIndicator

extends java.lang.Object

Represents a class for rendering a map marker to indicate the current position.

[For complete information, see the section Class Details]

See also:

PositioningManager

Method Summary

Table 1. Methods in PositionIndicator
Methods

public Image getMarker ()

Gets the current marker image.

public int getZIndex ()

Get the Z index of the position indicator.

public boolean isAccuracyIndicatorVisible ()

Gets the current visibility state of the GPS accuracy indicator.

public boolean isVisible ()

Gets the boolean indicating whether the PositionIndicator instance is visible.

public PositionIndicator setAccuracyIndicatorVisible (boolean visible)

Sets a GPS accuracy indicator for the PositionIndicator to be either visible or hidden.

public PositionIndicator setMarker (Image marker)

Sets a marker image, overriding the default marker image.

public PositionIndicator setVisible (boolean visible)

Sets a PositionIndicator to be either visible or hidden.

public PositionIndicator setZIndex (int index)

Set the Z index of the position indicator.

Class Details

Represents a class for rendering a map marker to indicate the current position. The marker is surrounded by a circle, the diameter of which illustrates the accuracy of the marked position.

See also:

PositioningManager

Method Details

public Image getMarker ()

Gets the current marker image.

Returns:

The marker Image used to display the current position on a map

public int getZIndex ()

Get the Z index of the position indicator.

Returns:

int current z index.

public boolean isAccuracyIndicatorVisible ()

Gets the current visibility state of the GPS accuracy indicator.

Returns:

True if the GPS accuracy indicator is visible, false otherwise

public boolean isVisible ()

Gets the boolean indicating whether the PositionIndicator instance is visible.

Returns:

True if the PositionIndicator is visible, false otherwise

public PositionIndicator setAccuracyIndicatorVisible (boolean visible)

Sets a GPS accuracy indicator for the PositionIndicator to be either visible or hidden. Accuracy is represented by a circle surrounding the marked position, with a smaller diameter representing higher accuracy. The default is the GPS accuracy is visible.

Note: if the PositionIndicator is hidden, the GPS accuracy indicator will be hidden as well.

Parameters:

  • visible

    A boolean specifying whether the accuracy indicator should be visible

Returns:

PositionIndicator this object for method chaining.

See also:

setVisible(boolean)

public PositionIndicator setMarker (Image marker)

Sets a marker image, overriding the default marker image.

Parameters:

  • marker

    An Image representing the marker used to display the current position on a map

Returns:

PositionIndicator this object for method chaining.

public PositionIndicator setVisible (boolean visible)

Sets a PositionIndicator to be either visible or hidden. By default, the position indicator is invisible.

Parameters:

  • visible

    A boolean specifying PositionIndicator visibility

Returns:

PositionIndicator this object for method chaining.

public PositionIndicator setZIndex (int index)

Set the Z index of the position indicator. The default Z-Index is currently the max value supported.

Parameters:

  • index

    A new z-index value for the MapObject, a 16-bit int within the range of [0..65535]

Returns:

PositionIndicator this object for method chaining.

See also:

setZIndex(int)