# How do I plot a specific position along a line between two coordinates in VB

HI,

I have a straight line drawn between two sets of Lat/Lon coordinates. Let's say they are 100 miles apart, and  I want to plot additional positions along that line, say one at 20 miles, one at 30 and another at 65 miles, and provide the Lat/Lon for those positions, would anyone know of a routine to achieve this? Preferable in VB6 but VB.Net would suffice.
Mike Tomlinson

Do you have absolute coordinates (x, y) that you are using for the two endpoints?  Is it being drawn on a 2D map?  Can you show your code now that draws the line?
Dave March

Hi,

Thanks for replying. No they're not absolute coords, just the lat/lon of locations A and B, specifying start and end of journey. I'm not actually drawing anything, I can easily determine the distance between the two but don't know how to grab the lat/lon of, for instance, the halfway mark. Because the marked point still needs to be 'in line', so as to move from A to B, via this halfway mark without changing course.... if that makes sense?
Okay, so you're using some kind of mapping software that draws the lines for you?

Again I'm not actually drawing any lines and don't need to. This is for simulated navigation, so we maybe going from A to Z via B, C and D, going in a straight line between each point. By that I mean from A to B would be straight and then we may have to turn 90 degrees to get to C (again in a straight line). So if I wanted to insert an additional point between any two of the existing one it would be in line and a course deviation between the two existing points would not be necessary.

I guess the answer's no then?
Sorry, never worked with lat / long before.

No problem. Thanks for letting me know.