Hi to all i'm developing a map with raphael.js as they do in here : http://raphaeljs.com/world/
the problem is that i'm using a custom svg world map so they function getXY() obviously wont return the correct x,y of a lat,lng.
How can i calculate the x and y of a given lat/lng knowing the map width/height and the rapport froma point and his coordinates (x:1104.73=lng:42.998604)(y:559.25=lat:9.424553).
they use this code:
cx: lon * 2.6938 + 465.4
y: lat * -2.6938 + 227.066
but i cant figure out what is 2.6938 and the other two numbers. I've also used this math here:
int x = (int) ((MAP_WIDTH/360.0) * (180 + lon));
int y = (int) ((MAP_HEIGHT/180.0) * (90 - lat));
But i cant get it works,anibody can help me?