c# - bing maps straight line between two locations -


I am using Bing maps for now it draws the line between the two places but it uses the roads is. I want it to be a view of the airplane so that it can draw a straight line between the points and I can tell the distance between them. Now I am using:

  var startwaypoint = new Microsoft.maps.Directions.Waypoint ({location: new Microsoft.Maps.Location (lat1, lon1)}); BingDirections.addWaypoint (startwaypoint); // End var Endpoint = New Microsoft.maps direction. Yipoint ({Location: New Microsoft Maps. Location (Light 2, Lawn 2)}); BingDirections.addWaypoint (endwaypoint);  

Where I kept the coordinates as Layouts 1 and Lawn 1. Our partner Alistair has written an article to attract the geodesic line (great circle) on Bing Maps V7. I'm pretty sure that you can get important things from your article and customize the JavaScript code so that it can work on your C # control.

See the article:

Here the JavaScript code should be able to accommodate you in C #:

  //, each row has several By dividing into the segment, the GODC approximates the lines drawn between the digits / //. Function togidicic (number, n) {if (! N) {n = 32}; // var local = number of line segments to use new array (); For (var i = 0; i & lt; points.length - 1; i ++) {with (monastery) {// coordinate = radian var = coordinates = 1 point [i] .latitude * (PI / 180); Var lon1 = number [i] .longitude * (pi / 180); Var lat2 = number [i + 1] .latitude * (pi / 180); Var lon2 = points [i + 1]. Lame * (pi / 180); // path var d = 2 * asin (sqrt (pau (((lat1 - lat2) / 2), 2) + cos (lat1) * cos (lat2) * pow ((sin (total sin) Calculation of ((Lon1 - lon2) / 2)), 2))); // Calculate the positions at a fixed interval with the route (var k = 0; k  

Comments