Calculate a point on a map given one point and a distance












0















I'm working with google maps on an angular project. I've got a center point of a circle and the length of the radius in meters. I'm trying to find a coordinate of any point on the circumference of a circle - I just need one. How do I calculate this given what I have?



Example data :



Center = {
Latitude : 53.388922117675236
Longitude : -6.280994415283203
}
Radius = 527









share|improve this question




















  • 1





    mathsisfun.com/algebra/circle-equations.html

    – HoangHieu
    Nov 15 '18 at 11:02











  • @NickParsons Sorry, I should have clarified, I just need one point

    – abyrne85
    Nov 15 '18 at 11:03











  • Ok, a point on the circumference should be let x = Center.Latitude+Radius and let y = Center.Longitude If I understand your question correctly :P

    – Nick Parsons
    Nov 15 '18 at 11:06













  • That would mean that the x coordinate is 53.388 + 527 = 605.392. Radius is in meters so I can't add that to a coordinate

    – abyrne85
    Nov 15 '18 at 11:16











  • @abyrne85 a distance and a point will give you the infinite points of a circle. If you want only a point, you should provide another constraint.

    – David Lemon
    Nov 16 '18 at 13:02
















0















I'm working with google maps on an angular project. I've got a center point of a circle and the length of the radius in meters. I'm trying to find a coordinate of any point on the circumference of a circle - I just need one. How do I calculate this given what I have?



Example data :



Center = {
Latitude : 53.388922117675236
Longitude : -6.280994415283203
}
Radius = 527









share|improve this question




















  • 1





    mathsisfun.com/algebra/circle-equations.html

    – HoangHieu
    Nov 15 '18 at 11:02











  • @NickParsons Sorry, I should have clarified, I just need one point

    – abyrne85
    Nov 15 '18 at 11:03











  • Ok, a point on the circumference should be let x = Center.Latitude+Radius and let y = Center.Longitude If I understand your question correctly :P

    – Nick Parsons
    Nov 15 '18 at 11:06













  • That would mean that the x coordinate is 53.388 + 527 = 605.392. Radius is in meters so I can't add that to a coordinate

    – abyrne85
    Nov 15 '18 at 11:16











  • @abyrne85 a distance and a point will give you the infinite points of a circle. If you want only a point, you should provide another constraint.

    – David Lemon
    Nov 16 '18 at 13:02














0












0








0








I'm working with google maps on an angular project. I've got a center point of a circle and the length of the radius in meters. I'm trying to find a coordinate of any point on the circumference of a circle - I just need one. How do I calculate this given what I have?



Example data :



Center = {
Latitude : 53.388922117675236
Longitude : -6.280994415283203
}
Radius = 527









share|improve this question
















I'm working with google maps on an angular project. I've got a center point of a circle and the length of the radius in meters. I'm trying to find a coordinate of any point on the circumference of a circle - I just need one. How do I calculate this given what I have?



Example data :



Center = {
Latitude : 53.388922117675236
Longitude : -6.280994415283203
}
Radius = 527






javascript google-maps math






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 15 '18 at 11:04







abyrne85

















asked Nov 15 '18 at 10:58









abyrne85abyrne85

658520




658520








  • 1





    mathsisfun.com/algebra/circle-equations.html

    – HoangHieu
    Nov 15 '18 at 11:02











  • @NickParsons Sorry, I should have clarified, I just need one point

    – abyrne85
    Nov 15 '18 at 11:03











  • Ok, a point on the circumference should be let x = Center.Latitude+Radius and let y = Center.Longitude If I understand your question correctly :P

    – Nick Parsons
    Nov 15 '18 at 11:06













  • That would mean that the x coordinate is 53.388 + 527 = 605.392. Radius is in meters so I can't add that to a coordinate

    – abyrne85
    Nov 15 '18 at 11:16











  • @abyrne85 a distance and a point will give you the infinite points of a circle. If you want only a point, you should provide another constraint.

    – David Lemon
    Nov 16 '18 at 13:02














  • 1





    mathsisfun.com/algebra/circle-equations.html

    – HoangHieu
    Nov 15 '18 at 11:02











  • @NickParsons Sorry, I should have clarified, I just need one point

    – abyrne85
    Nov 15 '18 at 11:03











  • Ok, a point on the circumference should be let x = Center.Latitude+Radius and let y = Center.Longitude If I understand your question correctly :P

    – Nick Parsons
    Nov 15 '18 at 11:06













  • That would mean that the x coordinate is 53.388 + 527 = 605.392. Radius is in meters so I can't add that to a coordinate

    – abyrne85
    Nov 15 '18 at 11:16











  • @abyrne85 a distance and a point will give you the infinite points of a circle. If you want only a point, you should provide another constraint.

    – David Lemon
    Nov 16 '18 at 13:02








1




1





mathsisfun.com/algebra/circle-equations.html

– HoangHieu
Nov 15 '18 at 11:02





mathsisfun.com/algebra/circle-equations.html

– HoangHieu
Nov 15 '18 at 11:02













@NickParsons Sorry, I should have clarified, I just need one point

– abyrne85
Nov 15 '18 at 11:03





@NickParsons Sorry, I should have clarified, I just need one point

– abyrne85
Nov 15 '18 at 11:03













Ok, a point on the circumference should be let x = Center.Latitude+Radius and let y = Center.Longitude If I understand your question correctly :P

– Nick Parsons
Nov 15 '18 at 11:06







Ok, a point on the circumference should be let x = Center.Latitude+Radius and let y = Center.Longitude If I understand your question correctly :P

– Nick Parsons
Nov 15 '18 at 11:06















That would mean that the x coordinate is 53.388 + 527 = 605.392. Radius is in meters so I can't add that to a coordinate

– abyrne85
Nov 15 '18 at 11:16





That would mean that the x coordinate is 53.388 + 527 = 605.392. Radius is in meters so I can't add that to a coordinate

– abyrne85
Nov 15 '18 at 11:16













@abyrne85 a distance and a point will give you the infinite points of a circle. If you want only a point, you should provide another constraint.

– David Lemon
Nov 16 '18 at 13:02





@abyrne85 a distance and a point will give you the infinite points of a circle. If you want only a point, you should provide another constraint.

– David Lemon
Nov 16 '18 at 13:02












2 Answers
2






active

oldest

votes


















1














The Maps API has a geometry library that you can use to calculate distances, heading, etc.



So if you need to find 1 point at a given distance from another point, whatever heading, you can use the computeOffset method.



What the following code does, it adds a marker at position 0,0 (var myLatLng) then adds another marker, 5000 meters from that point, at a heading of 0 (North). You can change the heading of course if you need to.






function initialize() {

var myLatLng = new google.maps.LatLng(0,0);
var mapOptions = {
zoom: 10,
center: myLatLng,
mapTypeId: google.maps.MapTypeId.ROADMAP
};

var point = google.maps.geometry.spherical.computeOffset(myLatLng, 5000, 0);

var map = new google.maps.Map(document.getElementById("map-canvas"), mapOptions);

new google.maps.Marker({
position: myLatLng,
map: map,
title: 'Origin marker'
});

new google.maps.Marker({
position: point,
map: map,
title: 'Offset marker'
});
}

initialize();

#map-canvas {
height: 200px;
}

<div id="map-canvas"></div>

<script src="https://maps.googleapis.com/maps/api/js?libraries=geometry"></script>






Note how the API is loaded, with including the geometry library.







share|improve this answer



















  • 1





    I'm already using the geometry library so this is perfect. Thanks

    – abyrne85
    Nov 15 '18 at 11:54



















2














If you need arbitrary point at given distance, the simplest way is to choose meridional direction



NewLong = Long
NewLat = Lat +- Radius / 111111.111 (meters per degree)


Or parallel direction:



NewLat = Lat
NewLong = Long +- Radius / 111111.111 / Cos(Lat)


For random direction generate random bearing and use formula from this page



Formula:
φ2 = asin( sin φ1 ⋅ cos δ + cos φ1 ⋅ sin δ ⋅ cos θ )
λ2 = λ1 + atan2( sin θ ⋅ sin δ ⋅ cos φ1, cos δ − sin φ1 ⋅ sin φ2 )
where φ is latitude, λ is longitude,
θ is the bearing (clockwise from north),
δ is the angular distance d/R;
d being the distance travelled, R the earth’s radius

JavaScript:(all angles in radians)
var φ2 = Math.asin( Math.sin(φ1)*Math.cos(d/R) +
Math.cos(φ1)*Math.sin(d/R)*Math.cos(brng) );
var λ2 = λ1 + Math.atan2(Math.sin(brng)*Math.sin(d/R)*Math.cos(φ1),
Math.cos(d/R)-Math.sin(φ1)*Math.sin(φ2));





share|improve this answer


























  • This is certainly the right maths. But 1) you didn't provide a Javascript version and 2) you don't need to compute that manually as the API has a method for that (see my answer).

    – MrUpsidown
    Nov 15 '18 at 11:45






  • 1





    @MrUpsidown I did not believe that JS guys cannot write given formulas in JS ;)

    – MBo
    Nov 15 '18 at 11:48













  • Easy ;) But when the question mentions JS, I try to provide JS. Obviously not a big deal! Thanks for updating!

    – MrUpsidown
    Nov 15 '18 at 11:52











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53317927%2fcalculate-a-point-on-a-map-given-one-point-and-a-distance%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














The Maps API has a geometry library that you can use to calculate distances, heading, etc.



So if you need to find 1 point at a given distance from another point, whatever heading, you can use the computeOffset method.



What the following code does, it adds a marker at position 0,0 (var myLatLng) then adds another marker, 5000 meters from that point, at a heading of 0 (North). You can change the heading of course if you need to.






function initialize() {

var myLatLng = new google.maps.LatLng(0,0);
var mapOptions = {
zoom: 10,
center: myLatLng,
mapTypeId: google.maps.MapTypeId.ROADMAP
};

var point = google.maps.geometry.spherical.computeOffset(myLatLng, 5000, 0);

var map = new google.maps.Map(document.getElementById("map-canvas"), mapOptions);

new google.maps.Marker({
position: myLatLng,
map: map,
title: 'Origin marker'
});

new google.maps.Marker({
position: point,
map: map,
title: 'Offset marker'
});
}

initialize();

#map-canvas {
height: 200px;
}

<div id="map-canvas"></div>

<script src="https://maps.googleapis.com/maps/api/js?libraries=geometry"></script>






Note how the API is loaded, with including the geometry library.







share|improve this answer



















  • 1





    I'm already using the geometry library so this is perfect. Thanks

    – abyrne85
    Nov 15 '18 at 11:54
















1














The Maps API has a geometry library that you can use to calculate distances, heading, etc.



So if you need to find 1 point at a given distance from another point, whatever heading, you can use the computeOffset method.



What the following code does, it adds a marker at position 0,0 (var myLatLng) then adds another marker, 5000 meters from that point, at a heading of 0 (North). You can change the heading of course if you need to.






function initialize() {

var myLatLng = new google.maps.LatLng(0,0);
var mapOptions = {
zoom: 10,
center: myLatLng,
mapTypeId: google.maps.MapTypeId.ROADMAP
};

var point = google.maps.geometry.spherical.computeOffset(myLatLng, 5000, 0);

var map = new google.maps.Map(document.getElementById("map-canvas"), mapOptions);

new google.maps.Marker({
position: myLatLng,
map: map,
title: 'Origin marker'
});

new google.maps.Marker({
position: point,
map: map,
title: 'Offset marker'
});
}

initialize();

#map-canvas {
height: 200px;
}

<div id="map-canvas"></div>

<script src="https://maps.googleapis.com/maps/api/js?libraries=geometry"></script>






Note how the API is loaded, with including the geometry library.







share|improve this answer



















  • 1





    I'm already using the geometry library so this is perfect. Thanks

    – abyrne85
    Nov 15 '18 at 11:54














1












1








1







The Maps API has a geometry library that you can use to calculate distances, heading, etc.



So if you need to find 1 point at a given distance from another point, whatever heading, you can use the computeOffset method.



What the following code does, it adds a marker at position 0,0 (var myLatLng) then adds another marker, 5000 meters from that point, at a heading of 0 (North). You can change the heading of course if you need to.






function initialize() {

var myLatLng = new google.maps.LatLng(0,0);
var mapOptions = {
zoom: 10,
center: myLatLng,
mapTypeId: google.maps.MapTypeId.ROADMAP
};

var point = google.maps.geometry.spherical.computeOffset(myLatLng, 5000, 0);

var map = new google.maps.Map(document.getElementById("map-canvas"), mapOptions);

new google.maps.Marker({
position: myLatLng,
map: map,
title: 'Origin marker'
});

new google.maps.Marker({
position: point,
map: map,
title: 'Offset marker'
});
}

initialize();

#map-canvas {
height: 200px;
}

<div id="map-canvas"></div>

<script src="https://maps.googleapis.com/maps/api/js?libraries=geometry"></script>






Note how the API is loaded, with including the geometry library.







share|improve this answer













The Maps API has a geometry library that you can use to calculate distances, heading, etc.



So if you need to find 1 point at a given distance from another point, whatever heading, you can use the computeOffset method.



What the following code does, it adds a marker at position 0,0 (var myLatLng) then adds another marker, 5000 meters from that point, at a heading of 0 (North). You can change the heading of course if you need to.






function initialize() {

var myLatLng = new google.maps.LatLng(0,0);
var mapOptions = {
zoom: 10,
center: myLatLng,
mapTypeId: google.maps.MapTypeId.ROADMAP
};

var point = google.maps.geometry.spherical.computeOffset(myLatLng, 5000, 0);

var map = new google.maps.Map(document.getElementById("map-canvas"), mapOptions);

new google.maps.Marker({
position: myLatLng,
map: map,
title: 'Origin marker'
});

new google.maps.Marker({
position: point,
map: map,
title: 'Offset marker'
});
}

initialize();

#map-canvas {
height: 200px;
}

<div id="map-canvas"></div>

<script src="https://maps.googleapis.com/maps/api/js?libraries=geometry"></script>






Note how the API is loaded, with including the geometry library.







function initialize() {

var myLatLng = new google.maps.LatLng(0,0);
var mapOptions = {
zoom: 10,
center: myLatLng,
mapTypeId: google.maps.MapTypeId.ROADMAP
};

var point = google.maps.geometry.spherical.computeOffset(myLatLng, 5000, 0);

var map = new google.maps.Map(document.getElementById("map-canvas"), mapOptions);

new google.maps.Marker({
position: myLatLng,
map: map,
title: 'Origin marker'
});

new google.maps.Marker({
position: point,
map: map,
title: 'Offset marker'
});
}

initialize();

#map-canvas {
height: 200px;
}

<div id="map-canvas"></div>

<script src="https://maps.googleapis.com/maps/api/js?libraries=geometry"></script>





function initialize() {

var myLatLng = new google.maps.LatLng(0,0);
var mapOptions = {
zoom: 10,
center: myLatLng,
mapTypeId: google.maps.MapTypeId.ROADMAP
};

var point = google.maps.geometry.spherical.computeOffset(myLatLng, 5000, 0);

var map = new google.maps.Map(document.getElementById("map-canvas"), mapOptions);

new google.maps.Marker({
position: myLatLng,
map: map,
title: 'Origin marker'
});

new google.maps.Marker({
position: point,
map: map,
title: 'Offset marker'
});
}

initialize();

#map-canvas {
height: 200px;
}

<div id="map-canvas"></div>

<script src="https://maps.googleapis.com/maps/api/js?libraries=geometry"></script>






share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 15 '18 at 11:30









MrUpsidownMrUpsidown

15.2k84995




15.2k84995








  • 1





    I'm already using the geometry library so this is perfect. Thanks

    – abyrne85
    Nov 15 '18 at 11:54














  • 1





    I'm already using the geometry library so this is perfect. Thanks

    – abyrne85
    Nov 15 '18 at 11:54








1




1





I'm already using the geometry library so this is perfect. Thanks

– abyrne85
Nov 15 '18 at 11:54





I'm already using the geometry library so this is perfect. Thanks

– abyrne85
Nov 15 '18 at 11:54













2














If you need arbitrary point at given distance, the simplest way is to choose meridional direction



NewLong = Long
NewLat = Lat +- Radius / 111111.111 (meters per degree)


Or parallel direction:



NewLat = Lat
NewLong = Long +- Radius / 111111.111 / Cos(Lat)


For random direction generate random bearing and use formula from this page



Formula:
φ2 = asin( sin φ1 ⋅ cos δ + cos φ1 ⋅ sin δ ⋅ cos θ )
λ2 = λ1 + atan2( sin θ ⋅ sin δ ⋅ cos φ1, cos δ − sin φ1 ⋅ sin φ2 )
where φ is latitude, λ is longitude,
θ is the bearing (clockwise from north),
δ is the angular distance d/R;
d being the distance travelled, R the earth’s radius

JavaScript:(all angles in radians)
var φ2 = Math.asin( Math.sin(φ1)*Math.cos(d/R) +
Math.cos(φ1)*Math.sin(d/R)*Math.cos(brng) );
var λ2 = λ1 + Math.atan2(Math.sin(brng)*Math.sin(d/R)*Math.cos(φ1),
Math.cos(d/R)-Math.sin(φ1)*Math.sin(φ2));





share|improve this answer


























  • This is certainly the right maths. But 1) you didn't provide a Javascript version and 2) you don't need to compute that manually as the API has a method for that (see my answer).

    – MrUpsidown
    Nov 15 '18 at 11:45






  • 1





    @MrUpsidown I did not believe that JS guys cannot write given formulas in JS ;)

    – MBo
    Nov 15 '18 at 11:48













  • Easy ;) But when the question mentions JS, I try to provide JS. Obviously not a big deal! Thanks for updating!

    – MrUpsidown
    Nov 15 '18 at 11:52
















2














If you need arbitrary point at given distance, the simplest way is to choose meridional direction



NewLong = Long
NewLat = Lat +- Radius / 111111.111 (meters per degree)


Or parallel direction:



NewLat = Lat
NewLong = Long +- Radius / 111111.111 / Cos(Lat)


For random direction generate random bearing and use formula from this page



Formula:
φ2 = asin( sin φ1 ⋅ cos δ + cos φ1 ⋅ sin δ ⋅ cos θ )
λ2 = λ1 + atan2( sin θ ⋅ sin δ ⋅ cos φ1, cos δ − sin φ1 ⋅ sin φ2 )
where φ is latitude, λ is longitude,
θ is the bearing (clockwise from north),
δ is the angular distance d/R;
d being the distance travelled, R the earth’s radius

JavaScript:(all angles in radians)
var φ2 = Math.asin( Math.sin(φ1)*Math.cos(d/R) +
Math.cos(φ1)*Math.sin(d/R)*Math.cos(brng) );
var λ2 = λ1 + Math.atan2(Math.sin(brng)*Math.sin(d/R)*Math.cos(φ1),
Math.cos(d/R)-Math.sin(φ1)*Math.sin(φ2));





share|improve this answer


























  • This is certainly the right maths. But 1) you didn't provide a Javascript version and 2) you don't need to compute that manually as the API has a method for that (see my answer).

    – MrUpsidown
    Nov 15 '18 at 11:45






  • 1





    @MrUpsidown I did not believe that JS guys cannot write given formulas in JS ;)

    – MBo
    Nov 15 '18 at 11:48













  • Easy ;) But when the question mentions JS, I try to provide JS. Obviously not a big deal! Thanks for updating!

    – MrUpsidown
    Nov 15 '18 at 11:52














2












2








2







If you need arbitrary point at given distance, the simplest way is to choose meridional direction



NewLong = Long
NewLat = Lat +- Radius / 111111.111 (meters per degree)


Or parallel direction:



NewLat = Lat
NewLong = Long +- Radius / 111111.111 / Cos(Lat)


For random direction generate random bearing and use formula from this page



Formula:
φ2 = asin( sin φ1 ⋅ cos δ + cos φ1 ⋅ sin δ ⋅ cos θ )
λ2 = λ1 + atan2( sin θ ⋅ sin δ ⋅ cos φ1, cos δ − sin φ1 ⋅ sin φ2 )
where φ is latitude, λ is longitude,
θ is the bearing (clockwise from north),
δ is the angular distance d/R;
d being the distance travelled, R the earth’s radius

JavaScript:(all angles in radians)
var φ2 = Math.asin( Math.sin(φ1)*Math.cos(d/R) +
Math.cos(φ1)*Math.sin(d/R)*Math.cos(brng) );
var λ2 = λ1 + Math.atan2(Math.sin(brng)*Math.sin(d/R)*Math.cos(φ1),
Math.cos(d/R)-Math.sin(φ1)*Math.sin(φ2));





share|improve this answer















If you need arbitrary point at given distance, the simplest way is to choose meridional direction



NewLong = Long
NewLat = Lat +- Radius / 111111.111 (meters per degree)


Or parallel direction:



NewLat = Lat
NewLong = Long +- Radius / 111111.111 / Cos(Lat)


For random direction generate random bearing and use formula from this page



Formula:
φ2 = asin( sin φ1 ⋅ cos δ + cos φ1 ⋅ sin δ ⋅ cos θ )
λ2 = λ1 + atan2( sin θ ⋅ sin δ ⋅ cos φ1, cos δ − sin φ1 ⋅ sin φ2 )
where φ is latitude, λ is longitude,
θ is the bearing (clockwise from north),
δ is the angular distance d/R;
d being the distance travelled, R the earth’s radius

JavaScript:(all angles in radians)
var φ2 = Math.asin( Math.sin(φ1)*Math.cos(d/R) +
Math.cos(φ1)*Math.sin(d/R)*Math.cos(brng) );
var λ2 = λ1 + Math.atan2(Math.sin(brng)*Math.sin(d/R)*Math.cos(φ1),
Math.cos(d/R)-Math.sin(φ1)*Math.sin(φ2));






share|improve this answer














share|improve this answer



share|improve this answer








edited Nov 15 '18 at 11:46

























answered Nov 15 '18 at 11:17









MBoMBo

49.2k23051




49.2k23051













  • This is certainly the right maths. But 1) you didn't provide a Javascript version and 2) you don't need to compute that manually as the API has a method for that (see my answer).

    – MrUpsidown
    Nov 15 '18 at 11:45






  • 1





    @MrUpsidown I did not believe that JS guys cannot write given formulas in JS ;)

    – MBo
    Nov 15 '18 at 11:48













  • Easy ;) But when the question mentions JS, I try to provide JS. Obviously not a big deal! Thanks for updating!

    – MrUpsidown
    Nov 15 '18 at 11:52



















  • This is certainly the right maths. But 1) you didn't provide a Javascript version and 2) you don't need to compute that manually as the API has a method for that (see my answer).

    – MrUpsidown
    Nov 15 '18 at 11:45






  • 1





    @MrUpsidown I did not believe that JS guys cannot write given formulas in JS ;)

    – MBo
    Nov 15 '18 at 11:48













  • Easy ;) But when the question mentions JS, I try to provide JS. Obviously not a big deal! Thanks for updating!

    – MrUpsidown
    Nov 15 '18 at 11:52

















This is certainly the right maths. But 1) you didn't provide a Javascript version and 2) you don't need to compute that manually as the API has a method for that (see my answer).

– MrUpsidown
Nov 15 '18 at 11:45





This is certainly the right maths. But 1) you didn't provide a Javascript version and 2) you don't need to compute that manually as the API has a method for that (see my answer).

– MrUpsidown
Nov 15 '18 at 11:45




1




1





@MrUpsidown I did not believe that JS guys cannot write given formulas in JS ;)

– MBo
Nov 15 '18 at 11:48







@MrUpsidown I did not believe that JS guys cannot write given formulas in JS ;)

– MBo
Nov 15 '18 at 11:48















Easy ;) But when the question mentions JS, I try to provide JS. Obviously not a big deal! Thanks for updating!

– MrUpsidown
Nov 15 '18 at 11:52





Easy ;) But when the question mentions JS, I try to provide JS. Obviously not a big deal! Thanks for updating!

– MrUpsidown
Nov 15 '18 at 11:52


















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53317927%2fcalculate-a-point-on-a-map-given-one-point-and-a-distance%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Florida Star v. B. J. F.

Error while running script in elastic search , gateway timeout

Adding quotations to stringified JSON object values