Oracle Application Server Wireless Java API Reference
B14043-01


oracle.panama.spatial.router
Class RoutingResult

java.lang.Object
  extended byoracle.panama.spatial.router.RoutingResult

All Implemented Interfaces:
java.io.Serializable

public class RoutingResult
extends java.lang.Object
implements java.io.Serializable

This class defines the result of a routing service. Such a result contains a list of single maneuvers that are part of the complete route. This class defines immutable objects and is thread-safe.

See Also:
Serialized Form

Field Summary
static int HOUR
Constant used to indicate the hour time unit
static int KILOMETERS
Constant used to indicate the kilometer distance unit
static int METERS
Constant used to indicate the meter distance unit
static int MILES
Constant used to indicate the mile distance unit
static int MINUTE
Constant used to indicate the minute time unit
static int SECOND
Constant used to indicate the second time unit

Constructor Summary
RoutingResult(double time, int timeUnit, double distance, int distUnit, Point[] geometry, Maneuver[] maneuvers, java.awt.Image[] overviewMaps, java.net.URL[] overviewMapURLs)
Constructor

Method Summary
double getDistance()
Get the total driving distance in meters
double getDistanceInMeters()
Get the total driving distance in meters
int getDistanceUnit()
Get the distance unit.
java.lang.String getDistanceUnitString()
Get the distance unit in string format.
Maneuver[] getManeuvers()
Get the Maneuver array of the result.
Point[] getOverviewGeometry()
Get the geometry, i.e., shape points along the route.
java.awt.Image[] getOverviewMap()
Get the overview maps in Java Image.
java.net.URL[] getOverviewMapURL()
Get the URL of overview maps.
ProviderCredit getRoutingProvider()
Returns the routing provider credit
double getTime()
Get the total driving time in minutes
double getTimeInMinutes()
Get the total driving time in minutes
int getTimeUnit()
Get the time unit.
java.lang.String getTimeUnitString()
Get the time unit in string format.
void setRoutingProvider(ProviderCredit credit)
Sets the routing provider credit
java.lang.String toString()
Returns the toString representation of this object
java.lang.String toString(boolean reqMapURL, boolean reqGeometry)
Returns the toString representation of this object

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

HOUR

public static final int HOUR
Constant used to indicate the hour time unit
See Also:
Constant Field Values

KILOMETERS

public static final int KILOMETERS
Constant used to indicate the kilometer distance unit
See Also:
Constant Field Values

METERS

public static final int METERS
Constant used to indicate the meter distance unit
See Also:
Constant Field Values

MILES

public static final int MILES
Constant used to indicate the mile distance unit
See Also:
Constant Field Values

MINUTE

public static final int MINUTE
Constant used to indicate the minute time unit
See Also:
Constant Field Values

SECOND

public static final int SECOND
Constant used to indicate the second time unit
See Also:
Constant Field Values

Constructor Detail

RoutingResult

public RoutingResult(double time,
                     int timeUnit,
                     double distance,
                     int distUnit,
                     Point[] geometry,
                     Maneuver[] maneuvers,
                     java.awt.Image[] overviewMaps,
                     java.net.URL[] overviewMapURLs)
Constructor

Method Detail

getDistance

public double getDistance()
Get the total driving distance in meters
Returns:
the total driving distance in meters

getDistanceInMeters

public double getDistanceInMeters()
Get the total driving distance in meters
Returns:
the total driving distance in meters

getDistanceUnit

public int getDistanceUnit()
Get the distance unit. Currently supported distance units are: KILOMETERS -- Kilometer MILES -- Miles

getDistanceUnitString

public java.lang.String getDistanceUnitString()
Get the distance unit in string format.

getManeuvers

public Maneuver[] getManeuvers()
Get the Maneuver array of the result.

getOverviewGeometry

public Point[] getOverviewGeometry()
Get the geometry, i.e., shape points along the route.

getOverviewMap

public java.awt.Image[] getOverviewMap()
Get the overview maps in Java Image. This is currently not supported.

getOverviewMapURL

public java.net.URL[] getOverviewMapURL()
Get the URL of overview maps. Note that a route can have multiple overview maps because of possible via points.

getRoutingProvider

public ProviderCredit getRoutingProvider()
Returns the routing provider credit
Returns:
the routing provider credit

getTime

public double getTime()
Get the total driving time in minutes
Returns:
the total driving time in minutes

getTimeInMinutes

public double getTimeInMinutes()
Get the total driving time in minutes
Returns:
the total driving time in minutes

getTimeUnit

public int getTimeUnit()
Get the time unit. Currently supported time units are: SECOND -- second MINUTE -- minute HOUR -- hour

getTimeUnitString

public java.lang.String getTimeUnitString()
Get the time unit in string format.

setRoutingProvider

public void setRoutingProvider(ProviderCredit credit)
Sets the routing provider credit
Parameters:
credit - the routing provider credit

toString

public java.lang.String toString()
Returns the toString representation of this object
Returns:
the toString representation of this object

toString

public java.lang.String toString(boolean reqMapURL,
                                 boolean reqGeometry)
Returns the toString representation of this object
Parameters:
reqMapURL - indicates if the map URLs should be included
reqGeometry - indicates if the geometry information should be included
Returns:
the toString representation of this object

Oracle Application Server Wireless Java API Reference
B14043-01


Copyright © 2004 Oracle Corporation. All Rights Reserved.