title: Get latitude and longitude points along a line between two points, by percentage
body: <p>In the image below, you can see that there 3 lines drawn from one point (the black circle) to its 3 related points ().</p>
  
  <p><strong>IMAGE</strong></p>
  
  <p><a href="https://i.stack.imgur.com/EqnLx.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EqnLx.jpg" alt="enter image description here"></a> </p>
  
  <p><strong>QUESTION</strong></p>
  
  <p>How to calculate latitude and longitude point between points along each line, using a percentage of the distance between the two points?</p>
  
  <p>For example, if I wanted to get the position to be able to draw additional circles along each line with a 20% difference?</p>
  
  <p><strong>WHAT CODE I HAVE NOW</strong></p>
  
  <pre><code>var data = [
    { "coords" : [ 53.409045, -2.985406 ]},
    { "coords" : [ 53.408747, -2.982862 ]},
    { "coords" : [ 53.407630, -2.984136 ]},
    { "coords" : [ 53.407142, -2.986931 ]}
  ];
  
  
  var pointA = new L.LatLng(53.409045, -2.985406);
  var pointB; 
  
  data.forEach(function(d) {
    pointB = new L.LatLng(d.coords[0], d.coords[1]);
    L.polyline([pointA, pointB]).addTo(map);
    L.circle([d.coords[0], d.coords[1]], 10).addTo(map);
  });
  </code></pre>
  
  <p>The only things the code above is doing is drawing a circle for each point and a line from the main circle (pointA) to the other circles (pointB)</p>
  
  <p>I pretty much need to know how to calculate multiple coordinates, by percentage of distance, between the pointA and and its related points.</p>
  
  <p>I need to make sure all green circle are the same distance from the center circle</p>
  
  <p><strong>CODEPEN TO TEST WITH</strong></p>
  
  <p><a href="http://codepen.io/anon/pen/BNqOOX" rel="nofollow noreferrer">Codepen Link</a></p>
  
  <p><strong>EDIT - IMAGES OF WHAT i HAVE SO FAR USING THE CORRECT ANSWER BELOW</strong></p>
  
  <p><a href="https://i.stack.imgur.com/DQbIc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DQbIc.png" alt="enter image description here"></a>
  <a href="https://i.stack.imgur.com/2Z4EB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2Z4EB.png" alt="enter image description here"></a></p>