Solved! Go to Solution.
Hello everyone,
First of all, sorry for my english.
I am looking for how to build a point from another point according to a distance(meters) and a angle(degree).
Olivier
Hi,
Thank you for your answer.
I am worry that this method will not be precise enough as the earth is a sphere. But I could still have a try.
I keep you in touch.
Olivier
Hello Dlimos,
I tried what you advised me to do and this is perfectly working !! Thank you a lot !
To any people that might face this problem, this is the js function I used :
function buildPoint(point,angle, nav_long){
var coord = esri.geometry.lngLatToXY(point.getLongitude(),point.getLatitude(),true);
var ox = coord[0]+ Math.cos(angle/180*Math.PI)*nav_long;
var oy = coord[1] + Math.sin(angle/180*Math.PI)*nav_long;
var newPoint = new esri.geometry.Point(esri.geometry.xyToLngLat(ox,oy),new esri.SpatialReference({
wkid:4326
}));
return newPoint;
}
OlivierL