Driving directions – Pitney Bowes MapXtreme User Manual

Page 368

Advertising
background image

Chapter 20: Routing

Advanced Route Options

MapXtreme v7.1

375

Developer Guide

TimeOut - Sets the route calculation algorithm time out value. The time out value is in seconds.
The default time out is 600 seconds. The route algorithm will stop calculating once the time out
value is reached.

TimeUnit - Sets the unit of measure for all routes durations. The default time unit is Minute.

TavelPreferences - Allows you to specify unique routing abilities for modifying road type priority
of travel. To add travel preferences you can specify a road type and a road type preference.
Routing can be performed on priority basis by setting the RoadTypePreference to High, Medium,
Low, or Avoid. The road types with the higher priority will be chosen over those with the lower
priorities when the route is calculated. You can also use the Avoid RoadTypePreference to avoid
a particular road type. One of the more often used travel preference is to set the FERRY
RoadType to Low, which will only use ferry routes if that is the only mean of travel to the
destination.

TravelTime (point-to-point and multi-point) - Sets the start or end travel time for the route
request. Refer to

Time-Based Routing

for more information on how to define the travel time and

other time-based routing options.

Updates - Allows you to include transient updates in your route request that temporarily modify
road or segment speed and road types. Refer to

Transient Updates

for more information on

including updates.

The RoutingPreferences and MatrixRoutingPreferences classes are the starting point when defining
route preferences. Refer to the Developer Reference for syntax and descriptions.

Driving Directions

Driving directions can be returned for a point-to-point or multi-point route. These instructions list the
step-by-step procedure for the route. Each segment of the route will return the step that needs to be
performed (for example, Begin, Turn Right), the name of the street, the direction, the distance, and
the time. There are numerous options for driving directions including focusing the directions to a
particular section of the route, changing the wording and format of the directions, and changing the
language for the directions.

There are two places where this can be configured/requested. The first place is in the server or
service settings. The second place is using the RouteInstructionsRequest class setting the
ReturnDirections property to true.

Modifying Direction Preferences

The following list describes the available preferences used to modify driving directions:

DirectionBreakTurnAngle - Sets the turn angle value that determines when a street is broken
into a new directions string. Sometimes, when following a route a street will make a significant
turn while keeping the same name. By using this value, the user can specify the turn angle at
which a new direction should be started. Valid values are 0 to 180 degrees. The default is 45
degrees.

DirectionsGeneratorName - Specifies a custom, server-side directions generator to be used to
create the route directions. If the server or service is configured with one or more directions
generators, this preference may be used to force directions generation to be handled by a
specific generator. For instance, setting “myGenerator” will force the server or service to use the
generator that has been configured with the name "myGenerator”. Use this preference only if
your server or service has been configured with a custom direction generator. Refer to your
server or service documentation for instructions on how to create and use direction generators.

Advertising