HERE Android SDK Developer's Guide

OnTravelDistanceListener

The interface OnTravelDistanceListener is a member of com.here.android.mpa.nlp.Nlp.

Interface Summary

public static abstract interface Nlp.OnTravelDistanceListener

   extends com.here.android.mpa.nlp.Nlp.ListenerBase

The travel distance to specified location event listener interface

[For complete information, see the section Interface Details]

Method Summary

Table 1. Methods in OnTravelDistanceListener
Methods

public abstract void onTravelDistance (Error error, Place from, Place to, int distanceM)

A callback with the travel distance in meters to the specified location.

Interface Details

The travel distance to specified location event listener interface

Method Details

public abstract void onTravelDistance (Error error, Place from, Place to, int distanceM)

A callback with the travel distance in meters to the specified location. e.g. "What is the distance between Vancouver and Seattle".

Parameters:

  • error

    Error information for calculating travel distance. If FAILED, distance of less than 0 will be returned.

  • from

    "From" Place. If null, current position is implied

  • to

    "To" Place.

  • distanceM

    Distance in meters