/*
LamToLonLatTest
© System
http://qdl.scs-inc.us/?top=6187
*/
function LamToLonLatTest() {
// commonly-used lambert params for
// us maps, converted to radians
var primeLat = 39.0 / (180 / Math.PI);
var primeLon = -96.0 / (180 / Math.PI);
var lowerLat = 33.0 / (180 / Math.PI);
var upperLat = 45.0 / (180 / Math.PI);
// 'New York City' -73.98, 40.77
var x = 0.78333940013831;
var y = 6.7166259178733;
var lonLat = LamToLonLat(x, y, primeLon, primeLat, lowerLat, upperLat);
var lon = lonLat[0] * (180 / pi);
var lat = lonLat[1] * (180 / pi);
alert('lon: ' + lon);
alert('lat: ' + lat);
}
|