com.nutiteq.services
Class YourNavigationDirections

java.lang.Object
  extended by com.nutiteq.kml.KmlReader
      extended by com.nutiteq.services.YourNavigationDirections
All Implemented Interfaces:
ResourceDataWaiter, ResourceRequestor, DirectionsService, Service

public class YourNavigationDirections
extends com.nutiteq.kml.KmlReader
implements DirectionsService, ResourceRequestor, ResourceDataWaiter


Field Summary
static java.lang.String MOVE_METHOD_BICYCLE
           
static java.lang.String MOVE_METHOD_CAR
           
static java.lang.String MOVE_METHOD_FOOT
           
static int ROUTE_TYPE_FASTEST
           
static int ROUTE_TYPE_SHORTEST
           
 
Fields inherited from class com.nutiteq.kml.KmlReader
LINE_STRING_TAG
 
Fields inherited from interface com.nutiteq.services.DirectionsService
ERROR_DESTINATION_ADDRESS_NOT_FOUND, ERROR_FROM_ADDRESS_NOT_FOUND, ERROR_FROM_AND_DESTINATION_ADDRESS_SAME, ERROR_ROUTE_NOT_FOUND, IMAGE_ROUTE_END, IMAGE_ROUTE_LEFT, IMAGE_ROUTE_RIGHT, IMAGE_ROUTE_START, IMAGE_ROUTE_STRAIGHT
 
Constructor Summary
YourNavigationDirections(DirectionsWaiter directionsWaiter, WgsPoint from, WgsPoint to, java.lang.String moveType, int routeType)
           
YourNavigationDirections(DirectionsWaiter directionsWaiter, WgsPoint from, WgsPoint to, java.lang.String moveType, int routeType, java.lang.String baseUrl)
          YourNavigation.org API routing implementation
 
Method Summary
 void cancel()
          Cancel service execution
 void dataRetrieved(byte[] data)
          Data for resource retrieved
 void execute()
          Performe service action
 void notifyError()
          Notify implementing object about retrieval error
 java.lang.String resourcePath()
          Get path to resource.
 
Methods inherited from class com.nutiteq.kml.KmlReader
getCachingLevel
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.nutiteq.io.ResourceRequestor
getCachingLevel
 

Field Detail

MOVE_METHOD_CAR

public static final java.lang.String MOVE_METHOD_CAR
See Also:
Constant Field Values

MOVE_METHOD_BICYCLE

public static final java.lang.String MOVE_METHOD_BICYCLE
See Also:
Constant Field Values

MOVE_METHOD_FOOT

public static final java.lang.String MOVE_METHOD_FOOT
See Also:
Constant Field Values

ROUTE_TYPE_FASTEST

public static final int ROUTE_TYPE_FASTEST
See Also:
Constant Field Values

ROUTE_TYPE_SHORTEST

public static final int ROUTE_TYPE_SHORTEST
See Also:
Constant Field Values
Constructor Detail

YourNavigationDirections

public YourNavigationDirections(DirectionsWaiter directionsWaiter,
                                WgsPoint from,
                                WgsPoint to,
                                java.lang.String moveType,
                                int routeType)

YourNavigationDirections

public YourNavigationDirections(DirectionsWaiter directionsWaiter,
                                WgsPoint from,
                                WgsPoint to,
                                java.lang.String moveType,
                                int routeType,
                                java.lang.String baseUrl)
YourNavigation.org API routing implementation

Parameters:
directionsWaiter - - listener for results
from - - start point
to - end point
moveType - See MOVE_METHOD_x const
routeType - See ROUTE_TYPE_x const
baseUrl - Server URL. If not given use www.yournavigation.org
Method Detail

execute

public void execute()
Description copied from interface: Service
Performe service action

Specified by:
execute in interface Service

resourcePath

public java.lang.String resourcePath()
Description copied from interface: ResourceRequestor
Get path to resource. Currently library supports retrieval from network and application jar

Specified by:
resourcePath in interface ResourceRequestor
Overrides:
resourcePath in class com.nutiteq.kml.KmlReader
Returns:
path to resource

notifyError

public void notifyError()
Description copied from interface: ResourceRequestor
Notify implementing object about retrieval error

Specified by:
notifyError in interface ResourceRequestor
Overrides:
notifyError in class com.nutiteq.kml.KmlReader

dataRetrieved

public void dataRetrieved(byte[] data)
Description copied from interface: ResourceDataWaiter
Data for resource retrieved

Specified by:
dataRetrieved in interface ResourceDataWaiter
Overrides:
dataRetrieved in class com.nutiteq.kml.KmlReader
Parameters:
data - retrieved data

cancel

public void cancel()
Description copied from interface: Service
Cancel service execution

Specified by:
cancel in interface Service