0

I'm currently working with Bing maps and I am wondering if there's some built in graph matching function. What I want to achieve is, to be able to connect two or more points with lines. But these lines shall follow a street graph if possible. Is there anything you've successfully used?

Regards, Martin

Martin Horvath
  • 466
  • 1
  • 6
  • 18

1 Answers1

0

you want to use the MapPolyLine class

in your scenario, it sounds like you would simply need to add the connection points and the MapPolyLine will create the rest of your line

to add points to the MapPolyLine (this may be different for the Ajax control, this is using the Silverlight version):

var line = new MapPolyline();
//where 0 is the index value of Locations to which we're appending a new location
line.Locations.Insert(0, new Location(dev.Latitude, dev.Longitude));

Note that this ss C# but this it exists for JavaScript as well, see http://msdn.microsoft.com/en-us/library/gg427597.aspx

rene
  • 41,474
  • 78
  • 114
  • 152
Jordan
  • 5,085
  • 7
  • 34
  • 50