Product: Routing J Server
Version: 1.1
Platform: All Platforms
Category: Issues
Summary:
Route directions from the RoutingJServer contain redundant street addresses.
Question:
When receiving routing directions back from the RoutingJServer, sometimes redundant streets are listed within the route. Why is this happening?
Answer:
A client that makes a request to the RoutingJServer will receive a RouteResult object in response. Using this RouteResult object, a client can then obtain the directions text that constitutes the route between two points in question. The extraction of directions text from a RouteResult object is accomplished by calling certain methods of the RoutingJServer client API. There are two main coding techniques that can be used to do this, such that depending on the one used, redundant streets may or may not be listed.
In the case where the directions are obtained from the RouteResult object via method RouteResult.getDirections(), contiguous streets bearing the same name along a route will be condensed into one(1) single street with a collectively summed distance. Calling this method therefore suppresses the redundant listing of liked named streets by combining them.
In the other case, where clients parse out individual streets along the route via the RouteResult object, thus deriving disjoint directions on a per-street basis, they could receive contiguous streets bearing the same name. If a client blindly accepts these individual street directions and ultimately concatenates them in order to form final route directions, it is possible to have redundant streets listed.
NOTE: there is a sample application program (called RoutingClientMM) that ships with the RoutingJServer1.1, such that it demonstrates how to carryout the latter of the two techniques describes above. More importantly, this sample application describes how to manually combine contiguous streets bearing the
same name along a route.
Last Modified: 07/17/2001 09:31:22 AM
|