Miguel Ping
Miguel Ping

Reputation: 18347

How can I draw a road using bing maps api?

Is it possible to draw a road using bing maps js api? Ideally I would supply two georeference points and the trajectory/road would be always on the same road.

Basically, I want to highlight a road.

Upvotes: 1

Views: 2443

Answers (2)

Derek Swingley
Derek Swingley

Reputation: 8752

Take a look at the "Get a multi-point route" sample in the interactive SDK under Get a multi-point route and directions.

This is the relevant function call:

map.GetDirections(["Microsoft", "Everett WA", "Bellingham WA"]);

Upvotes: 1

James Schek
James Schek

Reputation: 17960

Use map.GetDirections(new VELatLong(lat,lon),new VELatLong(lat,lon))

Upvotes: 3

Related Questions