Skip to content

Instantly share code, notes, and snippets.

//Algorithm from http://jkwiens.com/2009/01/23/miller-projection/
function getMYLat(lat) {
return 1.25 * Math.log(Math.tan(0.25 * Math.PI + 0.4 * lat));
}
function convertLatLngToXYMillerProjection(lat, lng, leftLongDegree, rightLongDegree, topLatDegree, bottomLatDegree, imageWidth, imageHeight) {
//Convert degree to radian
var leftLong = leftLongDegree * Math.PI / 180,
rightLong = rightLongDegree * Math.PI / 180,