Illustrator Scripting: transfer real life longitude & latitude on Illustrator Map - help needed(!)
Hi community,
this one is a really hard one!
Going back and forth for a couple of days now my brain got completely stucked... so please give me some input or maybe someone can work out a functional script in this case:
A bunch of coordinates (longitude & latitude values) must be transfered onto an Illustrator map to set a dot for each location... I'm stuggeling with creating the right formular to set them right... I'm pretty sure it's just a mathematical logical issue thing...
// the locations in latitude & longitude as vars:
var lat1 = 48.7491239657; //city_1
var lon1 = 9.17012929916; //city_1
var lat2 = 47.6264900005; //city_2
var lon2 = 7.65646999127; //city_2
var lat3 = 49.4682342; //city_3
var lon3 = 8.5611973; //city_3
// the locations manually set on the Illustrator-Map as vars:
var my_x1 = mm(116.60); //city_1
var my_y1 = mm(82.97); //city_1
var my_x2 = mm(39.83); //city_2
var my_y2 = mm(168.54); //city_2
var my_x3 = mm(83.67); //city_3
var my_y3 = mm(29.33); //city_3
//mm to point converter
function mm(n) {
return n * 2.83464567;
}
PS. and as always – only scripting solutions appreceated! 😉

