Chapter 7. MapPoint Web Service Route APIs

Like Find Service, Route Service is one of the four core components of the MapPoint Web Service, allowing you to calculate routes, driving directions, and itineraries between places or addresses. In this chapter, we’ll take an in-depth look at the MapPoint Web Service Route APIs.

Understanding Route APIs

The Route Service end point is located at RouteService.asmx, and the APIs available for Route service are exposed via the RouteServiceSoap class in the Web Service proxy (Reference.cs or Reference.vb).

RouteServiceSoap class contains methods related to route functionality, namely CalculateRoute and CalculateSimpleRoute. Either of these two methods can be used to calculate routes between places, addresses, or latitude/longitude coordinates; however, there are some differences that you need to be aware of when using these methods, which we will get to later in this chapter. Table 7-1 shows the methods offered by the RouteServiceSoap class.

Table 7-1. Methods available on the RouteServiceSoap class

Method

Notes

CalculateRoute

Calculates and returns a route (Route object) based on identified route segments and specifications

CalculateSimpleRoute

Calculates and returns a route (Route object) based on an array of latitude and longitude coordinates

Before I get into the details of using the route-related methods, let’s look at how a route is represented in MapPoint Web Service APIs.

Anatomy of a Route

In MapPoint Web Service, a route is made ...

Get Programming MapPoint in .NET now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.