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);

Parameters

Parameter Description

start

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

end

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

units

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

route_type

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

callback

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.

Show:
© 2014 Microsoft