Bing maps graph matching
I'm currently working with Bing maps and I am wondering if there's some bui开发者_运维知识库lt 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
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
精彩评论