Routing and Directions
A route consists of a number of route stops. Each route must contain at least two stops: a start and an end. There may be any number of stops in between. Routing is the process of determining the optimum order in which to visit stops, and the path between them. The optimum route is usually either the shortest or fastest - although you can define your own criteria.
In Verizon Connect GeoBase Map Explorer, when a route is created, a list of driving directions is also created. These directions are detailed in the directions table, in a natural language format, just below the main map.
For this tutorial, we will create a route using four RouteStops: a starting point, a destination point, and two intermediate stops in between.
To add a start position on the map, right-click on the map at the appropriate location (see note below), and select Route | Add as Start from the context menu. A green marker will be placed on the map at this location to mark the starting point.
Map Explorer reverse geocodes the position of your mouse on the map to a physical street address (displayed in the status bar below the map). Use this information to accurately locate your stops when creating your route, or alternatively, copy and paste the addresses from the table below into the address text box in the upper left corner of Map Explorer.
To add a destination stop, right-click on the map and select Route | Add as End from the context menu. A red marker will be placed on the map to mark the end point.
To add the intermediate stops, right-click on the map and select Route | Add as Stop. A yellow marker will be placed on the map to mark each intermediate stop.
Be careful with the order that you place route stops, as this will be the order that they are routed. The order can be modified later but only by either deleting a route stop, or optimizing the stops (see later).
The following points were used for this tutorial:
85 Enterprise, Aliso Viejo, Orange, California, 92656
22631 Glenwood Dr, Aliso Viejo, Orange, California, 92656, USA
22814 Aliso Creek Rd, Aliso Viejo, Orange, California, 92656, USA
3090 Via Buena Vista, Laguna Woods, Orange, California, 92637, USA
After placing the route stops outlined in the table above, the map should look similar to the image below.
Save the route that you created (we will use this file in other tutorials) by selecting Route | Save Route... and name the file route.rte.
To display the route, right-click on the map and select Route | Get Directions. This will draw the route on the map and also display the directions (in natural language format) in a table below the map. Alternatively, right-click on the map, and select Route | Get Quick Directions which will display the route, and a cut-down version of the directions: just the time and distance of the route.
If you selected Route | Get Directions, you can click on any row in the directions table, and the map will center on that particular part of the route. As an example, the image below shows the second instruction:
The displayed route and directions can be optimized depending on your chosen strategy. Map Explorer offers three optimization strategies: Fastest, Shortest, and Pedestrian. More options are available for your own applications in the GeoBase API by modifying the RoutingStrategy.
To choose an optimization strategy, click on Route from the main menu, and select Fastest, Shortest, Both or Pedestrian from the drop down menu.
Select Fastest for Map Explorer to display a route with the fastest journey between start and finish (red route in image below).
Select Shortest for Map Explorer to display a route with the shortest distance between start and finish (pink route in image below).
Select Pedestrian for Map Explorer to display a route suitable for pedestrian travel by foot (blue route in image below).
To compare the differences between fastest and shortest, select Both. With this option, both routes are displayed on the map at the same time, and the directions table includes both sets of directions and timings.
Notice the time and distance values for each strategy displayed at the bottom of the directions list:
As mentioned earlier, we can also optimize the stops in the route. When this option is selected, Map Explorer will re-arrange the order in which the stops are routed depending on the routing strategy: fastest, or shortest. To demonstrate, we will add a third intermediate stop to our route.
Place a stop at 19 Eaglepoint, Aliso Viejo, Orange, California, 92656, USA (LatLon: 33.59142,-117.73433). Notice that this point becomes point 4 when placed on the map, which means that the path of the route (points ->->->->) might not necessarily be the optimum route.
Next, right-click on the map and select Route | Get Directions. Notice that the time (10m 48s) and distance (5.5 miles) in the directions table has increased due to the inclusion of the third intermediate stop. Now we will optimize the stops along the route by selecting Route | Optimize Stops. Notice now how the points 3 and 4 change position, and both the route's time (10m 10s) and distance (5.2 miles) has reduced.
The position and heading of each route stop along a route can be altered manually.
To change the position of a route stop, hold the mouse over the route stop to be moved, and while simultaneously pressing the 'Ctrl' key on your keyboard, move the route stop to a new position on the map.
To add a heading to a route stop, right-click on the route stop, and select Set Stop Heading from the context menu.
To delete a heading from a route stop, right-click on the route stop and select Clear Stop Heading from the context menu.
To change the position of the heading on a route stop, hover the mouse over the stop, and a handle will become visible (see figure below). Move the mouse over the handle, and while simultaneously pressing your keyboard's 'Ctrl' key, rotate the stop's heading to a suitable position. Release the 'Ctrl' key to set the heading.
Waypoint objects are similar to RouteStops, except that waypoints do not get listed in the directions as arrival or departure points. For this reason, you can use a waypoint to influence how a route is calculated: a route will go through all the Waypoints and RouteStops, but the only arrival and departure points that will be seen in the directions are those of the RouteStop objects.
As an example, consider the simple route and directions in the image below. As you can see, there are three stops, and the directions show the arrival (blue text in directions) and departure (black text in directions) for stops 2 and 3.
Now, let's say that we want to ensure that the route passes along a certain street. To do this, we can add a waypoint to the route. (To add a waypoint to the map in Map Explorer, right-click on the map, and select Route | Add as Waypoint; a waypoint is rendered as a circle, with a numerical value indicating its position in the route.) As can be seen in the next image, although the route passes through the waypoint, arrival and departure notes for the waypoint are not listed in the directions.
It should be noted that waypoints cannot be used in a RouteMatrix, with route highlighting, or when optimizing stops.