Bing maps get Distance between two places RRS feed

  • Question

  • I have referred the sample http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#BingRouting and developed a Bing maps routing tool on my Silverlight GIS website.. now my client wants me to also show the distance between two places whos direction is shown..

    I took a look at the Routing class but failed to find anything to get the distance.. I used the ‘haversine’ formula, but it does not give me the exact distance along the route..


    Can I calculate the length of the geometry/polyline drawn on the map.. Will this result be accurate? Please guide me so that I can get the distance between my start and destination..

    Wednesday, September 12, 2012 11:33 AM


  • You can use the Bing Maps REST routing service to calculate the distance along roads between two locations. Since you are using Silverlight take a look at this blog post for information on how to use the REST services from .NET: http://rbrundritt.wordpress.com/2012/01/06/bing-maps-rest-service-net-libraries/ You can then use the total distance property of the returned result as the distance you are looking for.


    Wednesday, September 12, 2012 6:54 PM