I have the following function
function millerProjection(lat, lng, elem) {
// Create sec() function
function sec(value) {
return 1/[login to view URL](value);
}
// Create fucntion to change degree to radians
function toRadian(value) {
return value * [login to view URL] / 180;
}
lng = toRadian(lng);
lat = toRadian(lat);
// Miller Projection
var x = lng;
var y = -1.25*[login to view URL]([login to view URL](Math.PI/4+0.4*(lat)));
var width = [login to view URL]();
var scale = width/[login to view URL];
x *= scale;
y *= scale;
x += width/2;
y += width/2*0.7331989845
return [x,y];
}
This converts lat, lng coordinates into pixel position on a miller projection map
However we also need the reverse of that - convert pixel x,y to lat lng coordinates
Greetings! I am an expert programmer with sound problem solving skills and I can easily reverse the function you have mentioned within an hour. Hoping to start right away!