Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

VEMap.GetRoute Method

You are not viewing the latest version of the AJAX control. Bing Maps AJAX V7 is the recommended JavaScript control for Bing Maps. If you need this documentation, it is available in as a CHM or PDF download.

Deprecated. Use the VEMap.GetDirections Method instead.

Draws a route on the map and sends details about the route to a callback function.

VEMap.GetRoute(start, end, units, route_type, callback);


Parameter Description


The start location. This can be a string value of an address, a place name, or a VELatLong Class object that specifies the start location


The ending location. This can be a string value of an address, a place name, or a VELatLong object that specifies the end location


A VEDistanceUnit Enumeration value that specifies either miles or kilometers. Optional. Default is VEDistanceUnit.Miles


A VERouteType Enumeration value specifying either the shortest route or the quickest route. Optional. Default is VERouteType.Shortest


Specifies the function called after the route is drawn on the map. The callback function is passed a VERouteDeprecated Class object containing information about the route.

This method has been deprecated. Use the VEMap.GetDirections Method instead. Note that the routes returned by the two methods may vary.

This method ignores specified cultures. Use the VEMap.GetDirections Method if you want to return localized directions.

© 2015 Microsoft