Microsoft KB Archive/883992

= The differences between a proximity-search distance and a driving distance in MapPoint Web Service =

Article ID: 883992

Article Last Modified on 5/18/2007

-

APPLIES TO


 * Microsoft MapPoint Web Service 3.5

-





INTRODUCTION
Microsoft MapPoint Web Service includes methods that return the distance between a specified starting point and a destination. The FindNearBy method is used for proximity searches. The CalculateRoute method and the CalculateSimpleRoute method are used to obtain driving directions. However, the FindNearBy method can return a different distance than the CalculateRoute method and the CalculateSimpleRoute method, even though the starting point and the destination may be the same. This article describes why these methods return different distances even though the methods use the same locations.



MORE INFORMATION
A call to the FindNearBy method returns a distance that is calculated as a straight line between the starting point and the destination. To understand how a proximity search works, imagine that the search starts at a center point, and then spirals out until the specified search radius is reached. The distance that is returned is the distance between the center point and a point on the spiral that represents a location.

A call to the CalculateRoute method or a call to the CalculateSimpleRoute method returns the driving distance. This distance is calculated by adding the distance of all the driving steps. The driving distance is frequently longer than the proximity-search distance because you cannot reach a destination by driving in a straight line. However, MapPoint Web Service does not account for one-way streets. Therefore, the walking distance between two points may be shorter.

