com.bbn.openmap.tools.roads
Interface RoadServices

All Known Implementing Classes:
MultiRoadLayer, RoadFinder, VPFRoadLayer

public interface RoadServices

getPathOnRoad interface - any layer that implements this interface can return a route between two points


Method Summary
 java.util.List displayPathOnRoad(java.awt.Point start, java.awt.Point end, Route route, java.util.List segments)
          Displays a Route between two points on the map.
 Route getPathOnRoad(LatLonPoint start, LatLonPoint end)
          Returns the best Route between a start point and end point.
 java.util.List getPathOnRoad(java.awt.Point start, java.awt.Point end, java.util.List segments)
          Returns the best Route between a start point and end point.
 

Method Detail

getPathOnRoad

java.util.List getPathOnRoad(java.awt.Point start,
                             java.awt.Point end,
                             java.util.List segments)
Returns the best Route between a start point and end point.

This method works by finding the closest intersection to start and end points, and then finding a path from start intersection to end intersection. The method works on screen coordinates.

Parameters:
start - - Start point on the map in screen coordinates.
end - - End point on the map in screen coordinates.
segments - is populated by road segments, each segment is a list of points in screen coordinates.
Returns:
a list of points between start and end points in screen coordinates.

getPathOnRoad

Route getPathOnRoad(LatLonPoint start,
                    LatLonPoint end)
Returns the best Route between a start point and end point.

This method works by finding the closest intersection to start and end points, and then finding a path from start intersection to end intersection. The method works in latitude/longitude coordinates.

Parameters:
start - - Start point in latitude/longitude coordinates.
end - - End point in latitude/longitude coordinates.
Returns:
the best route to travel by Road from start to end

displayPathOnRoad

java.util.List displayPathOnRoad(java.awt.Point start,
                                 java.awt.Point end,
                                 Route route,
                                 java.util.List segments)
Displays a Route between two points on the map.

Parameters:
start - start from start point on map
end - to end point on map
route - the Route to travel from start to end
segments - as side effect, populated with PathSegments between returned WayPoints
Returns:
List of WayPoints


Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details