HERE Android SDK Developer's Guide

Listener

The interface Listener is a member of com.here.android.mpa.electronic_horizon.ElectronicHorizon.

Interface Summary

public static abstract interface ElectronicHorizon.Listener

Represents an interface for responding to electronic horizon events sent by the ElectronicHorizon.

[For complete information, see the section Interface Details]

Method Summary

Table 1. Methods in Listener
Methods

public abstract void onChildDetached (PathTree parent, PathTree child)

Called every time a path is detached from its parent.

public abstract void onLinkAdded (PathTree path, Link link)

Called every time a new link is added to the tree.

public abstract void onLinkRemoved (PathTree path, Link link)

Called every time a link is removed from the tree.

public abstract void onNewPosition (Position position)

Called when new position on most probable path or offroad position is computed.

public abstract void onPathAdded (PathTree path)

Called every time a new path is added to the tree.

public abstract void onPathRemoved (PathTree path)

Called every time a path is removed from the tree.

public abstract void onTreeReset ()

Called every time when the tree is reset.

Interface Details

Represents an interface for responding to electronic horizon events sent by the ElectronicHorizon.

Method Details

public abstract void onChildDetached (PathTree parent, PathTree child)

Called every time a path is detached from its parent.

Parameters:

  • parent

    The parent path tree element.

  • child

    The child path tree element.

Called every time a new link is added to the tree.

Parameters:

  • path

    The path to which the link was added.

  • link

    The link which was added.

Called every time a link is removed from the tree.

Parameters:

  • path

    The path from which the link will be removed.

  • link

    The link which will be removed.

public abstract void onNewPosition (Position position)

Called when new position on most probable path or offroad position is computed.

Parameters:

  • position

    Updated position which contains the the most probable path which we are currently on and offset from its origin.

public abstract void onPathAdded (PathTree path)

Called every time a new path is added to the tree.

Parameters:

  • path

    The path which was added.

public abstract void onPathRemoved (PathTree path)

Called every time a path is removed from the tree.

Parameters:

  • path

    The path which will be removed. Note: No additional events about removing will be fired for children and links of this path.

public abstract void onTreeReset ()

Called every time when the tree is reset. Note: Tree reset occurs when the new position cannot be matched to the horizon. The tree will be rebuilt based on the new position.