<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Math for converting coordinates in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/math-for-converting-coordinates/m-p/361668#M33466</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;is washington south transverse mercator or lambert?&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It's Lambert Conformal Conic&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 04 Feb 2013 17:15:46 GMT</pubDate>
    <dc:creator>DuncanNisbett</dc:creator>
    <dc:date>2013-02-04T17:15:46Z</dc:date>
    <item>
      <title>Math for converting coordinates</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/math-for-converting-coordinates/m-p/361665#M33463</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I know that I can use the geometryService to convert between 2 different coordinate systems, but I'd like to reduce the number of calls made to the server to update coordinates. I'm trying to convert from wkid 32149 (NAD_1983_StatePlane_Washington_South_FIPS_4602) to Latitude/Longitude 4326. Does anyone know where I can find the math so I can create my own function to convert the coordinates? I've tried my Google Kung Fu, but come up dry.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Feb 2013 16:42:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/math-for-converting-coordinates/m-p/361665#M33463</guid>
      <dc:creator>DuncanNisbett</dc:creator>
      <dc:date>2013-02-04T16:42:18Z</dc:date>
    </item>
    <item>
      <title>Re: Math for converting coordinates</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/math-for-converting-coordinates/m-p/361666#M33464</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I know that I can use the geometryService to convert between 2 different coordinate systems, but I'd like to reduce the number of calls made to the server to update coordinates. I'm trying to convert from wkid 32149 (NAD_1983_StatePlane_Washington_South_FIPS_4602) to Latitude/Longitude 4326. Does anyone know where I can find the math so I can create my own function to convert the coordinates? I've tried my Google Kung Fu, but come up dry.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;is washington south transverse mercator or lambert?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

dojo.provide("org.mymanatee.common.latlong");

dojo.require("dojo.string");

org.mymanatee.common.latlong.convertSPtoLL_LLC = function (uX,uY) {
var a = 20925604.48;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //major radius of ellipsoid, map units (NAD 83)
var ec = 0.08181905782;&amp;nbsp;&amp;nbsp;&amp;nbsp; //eccentricity of ellipsoid (NAD 83)
var angRad = 0.01745329252;&amp;nbsp;&amp;nbsp; //number of radians in a degree
var pi4 = Math.PI / 4;&amp;nbsp;&amp;nbsp; //Pi / 4
var p0 = 24.333333 * angRad;&amp;nbsp;&amp;nbsp;&amp;nbsp; //latitude of origin
var p1 = 24.333333 * angRad;&amp;nbsp;&amp;nbsp;&amp;nbsp; //latitude of first standard parallel
var p2 = 31.5 * angRad;&amp;nbsp;&amp;nbsp; //latitude of second standard parallel
var m0 = -82.000000 * angRad;&amp;nbsp;&amp;nbsp; //central meridian
var x0 = 656166.666667;&amp;nbsp;&amp;nbsp; //False easting of central meridian, map units

// Calculate the coordinate system constants.
with (Math) {
var m1 = cos(p1) / sqrt(1 - (pow(ec,2)) * pow(sin(p1),2));
var m2 = cos(p2) / sqrt(1 - (pow(ec,2)) * pow(sin(p2),2));
var t0 = tan(pi4 - (p0 / 2));
var t1 = tan(pi4 - (p1 / 2));
var t2 = tan(pi4 - (p2 / 2));
t0 = t0 / pow(((1 - (ec * (sin(p0)))) / (1 + (ec * (sin(p0))))),ec/2);
t1 = t1 / pow(((1 - (ec * (sin(p1)))) / (1 + (ec * (sin(p1))))),ec/2);
t2 = t2 / pow(((1 - (ec * (sin(p2)))) / (1 + (ec * (sin(p2))))),ec/2);
var n = log(m1 / m2) / log(t1 / t2);
var f = m1 / (n * pow(t1,n));
var rho0 = a * f * pow(t0,n);

// Convert the coordinate to Latitude/Longitude.

// Calculate the Longitude.
var uX = uX - x0;
var pi2 = pi4 * 2;

var rho = sqrt(pow(uX,2) + pow((rho0 - uY),2));
var theta = atan(uX / (rho0 - uY));
var txy = pow((rho / (a * f)),(1 / n));
var lon = (theta / n) + m0;
var uX = uX + x0;

// Estimate the Latitude
var lat0 = pi2 - (2 * atan(txy));

// Substitute the estimate into the iterative calculation that
// converges on the correct Latitude value.
var part1 = (1 - (ec * sin(lat0))) / (1 + (ec * sin(lat0)));
var lat1 = pi2 - (2 * atan(txy * pow(part1,(ec/2))));

while ((abs(lat1 - lat0)) &amp;gt; 0.000000002) {
&amp;nbsp; lat0 = lat1;
&amp;nbsp; part1 = (1 - (ec * sin(lat0))) / (1 + (ec * sin(lat0)));
&amp;nbsp; lat1 = pi2 - (2 * atan(txy * pow(part1,(ec/2))));
&amp;nbsp; }

// Convert from radians to degrees.
var Lat = lat1 / angRad;
var Lon = lon / angRad;

//alert(Lat);
//alert(Lon);

//Round the latitude and longitude
//lat = (CLng(lat * 100000)) / 100000;
//lon = (CLng(lon * 100000)) / 100000;

Lat = Lat.toPrecision(7);
Lon = Lon.toPrecision(8);

return [Lat,Lon];

}
};
//End of Code for converting map units to decimal degrees.


//COnversion to LL from State Plane for Florida West (Transverse mercator, not Lamberic
org.mymanatee.common.latlong.convertSPtoLL_TM = function (uX,uY) {

&amp;nbsp;&amp;nbsp;&amp;nbsp; //code completely borrowed from Dr Bill Hazelton's HP-33S calculator
&amp;nbsp;&amp;nbsp;&amp;nbsp; // http://homepage.mac.com/nwjh/HP-33S/ 10-Feb-10
 var&amp;nbsp;&amp;nbsp;&amp;nbsp; metconv = 1200/3937; //exact survey feet to meters
 var&amp;nbsp;&amp;nbsp;&amp;nbsp; uXm = uX*metconv;
 var&amp;nbsp;&amp;nbsp;&amp;nbsp; uYm = uY*metconv;

&amp;nbsp; var&amp;nbsp;&amp;nbsp; a = 6378137.000000000000000000; // semimajor axis from ESRI
 var&amp;nbsp;&amp;nbsp;&amp;nbsp; b =&amp;nbsp; 6356752.314140356100000000; // semiminor axis from ESRI
 var&amp;nbsp;&amp;nbsp;&amp;nbsp; e2 = ((a*a)-(b*b))/(a*a);//ellipsoid
 var&amp;nbsp;&amp;nbsp;&amp;nbsp; p0 = 24.333333;&amp;nbsp;&amp;nbsp;&amp;nbsp; //latitude of origin
 var&amp;nbsp;&amp;nbsp;&amp;nbsp; m0 = -82.000000;&amp;nbsp;&amp;nbsp; //central meridian in degrees
 var&amp;nbsp;&amp;nbsp;&amp;nbsp; x0 = 656166.666667;&amp;nbsp; //False easting of central meridian, map units
 var&amp;nbsp;&amp;nbsp;&amp;nbsp; y0 = 0; //False Northing
 var&amp;nbsp;&amp;nbsp;&amp;nbsp; k0 = 0.999941;&amp;nbsp;&amp;nbsp;&amp;nbsp; //central scale factor k0
 var&amp;nbsp;&amp;nbsp;&amp;nbsp; x0m = x0*metconv;
 var&amp;nbsp;&amp;nbsp;&amp;nbsp; y0m = y0*metconv;

 var&amp;nbsp;&amp;nbsp;&amp;nbsp; p0rad = p0*Math.PI/180;
 var&amp;nbsp;&amp;nbsp;&amp;nbsp; m0rad = m0*Math.PI/180;
 var&amp;nbsp;&amp;nbsp;&amp;nbsp; e = Math.sqrt(e2);


 var&amp;nbsp;&amp;nbsp;&amp;nbsp; b = a * Math.sqrt(1-e2);
 var&amp;nbsp;&amp;nbsp;&amp;nbsp; n = (a - b)/(a + b);
 var&amp;nbsp;&amp;nbsp;&amp;nbsp; G = a*(1-n)*(1-(n*n))*(1+2.25*(n*n)+225/64*(n*n*n*n))*Math.PI/180;
 var&amp;nbsp;&amp;nbsp;&amp;nbsp; A0 = 1-e2/4-3*(e2*e2)/64-5*(e2*e2*e2)/256;
 var&amp;nbsp;&amp;nbsp;&amp;nbsp; A2 = 3/8*(e2+(e2*e2)/4+15*(e2*e2*e2)/128);
var&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A4 = 15/256*((e2*e2)+0.75*(e2*e2*e2));
var&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A6 = 35*(e2*e2*e2)/3072;
var&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lat0 = p0rad;
 var&amp;nbsp;&amp;nbsp;&amp;nbsp; m0atlat0 = a*(A0*lat0-A2*Math.sin(2*lat0)+A4*Math.sin(4*lat0)-A6*Math.sin(6*lat0))
 var&amp;nbsp;&amp;nbsp;&amp;nbsp; NminusNo = uYm - y0m;

var&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; m = m0atlat0+NminusNo/k0;
var&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; s = (m/G)*Math.PI/180;
 var&amp;nbsp;&amp;nbsp;&amp;nbsp; fpl1 = (1.5*n-27*(n*n*n)/32)*Math.sin(2*s);
&amp;nbsp; var&amp;nbsp;&amp;nbsp; fpl2 = (21*(n*n)/16-55*(n*n*n*n)/32)*Math.sin(4*s);
 var&amp;nbsp;&amp;nbsp;&amp;nbsp; fpl3 = 151*(n*n*n)/96*Math.sin(6*s);
 var&amp;nbsp;&amp;nbsp;&amp;nbsp; fpl4 = 1097*(n*n*n*n)/512*Math.sin(8*s);
&amp;nbsp; var&amp;nbsp;&amp;nbsp; footptlat = (s+fpl1+fpl2+fpl3+fpl4);
&amp;nbsp; var&amp;nbsp;&amp;nbsp; rho = a*(1-e2)/Math.pow((1-e2*Math.sin(footptlat)*Math.sin(footptlat)),1.5);
 var&amp;nbsp;&amp;nbsp;&amp;nbsp; nu = a/(Math.sqrt(1-e2*Math.sin(footptlat)*Math.sin(footptlat)));
 var&amp;nbsp;&amp;nbsp;&amp;nbsp; psi = nu/rho;
&amp;nbsp; var&amp;nbsp;&amp;nbsp; t = Math.tan(footptlat);
 var&amp;nbsp;&amp;nbsp;&amp;nbsp; E = uXm-x0m;
 var&amp;nbsp;&amp;nbsp;&amp;nbsp; x = E/k0/nu;

 var&amp;nbsp;&amp;nbsp;&amp;nbsp; lat1 = x*E/2;
 var&amp;nbsp;&amp;nbsp;&amp;nbsp; lat2 = (x*x*x)*E/24*(-4*psi*psi+9*psi*(1-t*t)+12*t*t);
&amp;nbsp; var&amp;nbsp;&amp;nbsp; lat3 = (x*x*x*x*x)*E/720*(8*(psi*psi*psi*psi)*(11-24*(t*t))-12*(psi*psi*psi)*(21-71*(t*t))+15*(psi*psi)*(15-98*(t*t)+15*(t*t*t*t))+180*psi*(5*(t*t)-3*(t*t*t*t))+360*(t*t*t*t));
 var&amp;nbsp;&amp;nbsp;&amp;nbsp; lat4 = (x*x*x*x*x*x*x)*E/40320*(1385+3633*(t*t)+4095*(t*t*t*t)+1575*(t*t*t*t*t*t));
 var&amp;nbsp;&amp;nbsp;&amp;nbsp; lat = footptlat-(t/k0/rho)*(lat1-lat2+lat3-lat4);
 var&amp;nbsp;&amp;nbsp;&amp;nbsp; latdd = lat*180/Math.PI;

 var&amp;nbsp;&amp;nbsp;&amp;nbsp; w1 = x/Math.cos(footptlat);
 var&amp;nbsp;&amp;nbsp;&amp;nbsp; w2 = Math.pow(-1*x,3)/6*(psi+2*t*t)/Math.cos(footptlat);
 var&amp;nbsp;&amp;nbsp;&amp;nbsp; w3 = Math.pow(x,5)/120/Math.cos(footptlat)*(-4*(psi*psi*psi)*(1-6*(t*t))+(psi*psi)*(9-68*(t*t))+72*(psi)*(t*t)+24*(t*t*t*t));
 var&amp;nbsp;&amp;nbsp;&amp;nbsp; w4 = Math.pow(-1*x,7)/5040/Math.cos(footptlat)*(61+662*(t*t)+1320*(t*t*t*t)+720*(t*t*t*t*t*t));
 var&amp;nbsp;&amp;nbsp;&amp;nbsp; w = w1+w2+w3+w4;
 var&amp;nbsp;&amp;nbsp;&amp;nbsp; lon = (-1*m0)*Math.PI/180-w;
 var&amp;nbsp;&amp;nbsp;&amp;nbsp; londd = (-1*lon)*180/Math.PI;


//&amp;nbsp;&amp;nbsp;&amp;nbsp; alert(londd);

&amp;nbsp;&amp;nbsp;&amp;nbsp; return [latdd,londd];
&amp;nbsp;&amp;nbsp;&amp;nbsp; };

org.mymanatee.common.latlong.convertLLtoSP_TM = function (lat,lon) {
&amp;nbsp;&amp;nbsp; var metconv = 1200/3937; //exact survey feet to meters

&amp;nbsp;&amp;nbsp; var a = 6378137.000000000000000000; // semimajor axis from ESRI
&amp;nbsp;&amp;nbsp; var b =&amp;nbsp; 6356752.314140356100000000; // semiminor axis from ESRI
&amp;nbsp;&amp;nbsp; var e2 = ((a*a)-(b*b))/(a*a);//ellipsoid
&amp;nbsp;&amp;nbsp; var p0 = 24.333333;&amp;nbsp;&amp;nbsp;&amp;nbsp; //latitude of origin
&amp;nbsp;&amp;nbsp; var m0 = -82.000000;&amp;nbsp;&amp;nbsp; //central meridian in degrees
&amp;nbsp;&amp;nbsp; var x0 = 656166.666667;&amp;nbsp; //False easting of central meridian, map units
&amp;nbsp;&amp;nbsp; var y0 = 0; //False Northing
&amp;nbsp;&amp;nbsp; var k0 = 0.999941;&amp;nbsp;&amp;nbsp;&amp;nbsp; //central scale factor k0
&amp;nbsp;&amp;nbsp; var e = Math.sqrt(e2);
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; var lat0rad_lat0=p0*Math.PI/180;
&amp;nbsp;&amp;nbsp; var latrad_lat=lat*Math.PI/180;
&amp;nbsp;&amp;nbsp; var rho_lat=a*(1-e2)/Math.pow((1-e2*Math.sin(latrad_lat)*Math.sin(latrad_lat)),1.5);
 //&amp;nbsp;&amp;nbsp; rho_lat0=a*(1-e2)/Math.pow((1-e2*Math.sin(lat0rad_lat0)*Math.sin(lat0rad_lat0)),1.5); not used
 var&amp;nbsp;&amp;nbsp; nu_lat=a/(Math.sqrt(1-e2*Math.sin(latrad_lat)*Math.sin(latrad_lat)));
 //&amp;nbsp;&amp;nbsp; nu_lat0=a/(Math.sqrt(1-e2*Math.sin(lat0rad_lat0)*Math.sin(lat0rad_lat0))); not used
&amp;nbsp; var&amp;nbsp; omega_lat=((lon)*Math.PI/180)-((m0)*Math.PI/180); //provide negative lon so no negative multiplier
 //&amp;nbsp;&amp;nbsp; omega_lat0=""; not used
 var&amp;nbsp;&amp;nbsp; psi_lat=nu_lat/rho_lat;
 //&amp;nbsp;&amp;nbsp; psi_lat0=""; not used
&amp;nbsp; var&amp;nbsp; t_lat=Math.tan(latrad_lat);
&amp;nbsp; //&amp;nbsp; t_lat0=""; not used
&amp;nbsp; var&amp;nbsp; a0_lat=1-e2/4-3*e2*e2/64-5*e2*e2*e2/256;
&amp;nbsp; var&amp;nbsp; a2_lat=3/8*(e2+e2*e2/4+15*e2*e2*e2/128);
&amp;nbsp; var&amp;nbsp; a4_lat=15/256*(e2*e2+0.75*e2*e2*e2);
&amp;nbsp; var&amp;nbsp; a6_lat=35*e2*e2*e2/3072;
&amp;nbsp; var&amp;nbsp; mlat_lat=a*(a0_lat*latrad_lat-a2_lat*Math.sin(2*latrad_lat)+a4_lat*Math.sin(4*latrad_lat)-a6_lat*Math.sin(6*latrad_lat));
&amp;nbsp; var&amp;nbsp; mlat_lat0=a*(a0_lat*lat0rad_lat0-a2_lat*Math.sin(2*lat0rad_lat0)+a4_lat*Math.sin(4*lat0rad_lat0)-a6_lat*Math.sin(6*lat0rad_lat0));
 var&amp;nbsp;&amp;nbsp; e1_lat=nu_lat*omega_lat*Math.cos(latrad_lat);
 var&amp;nbsp;&amp;nbsp; e2_lat=nu_lat*omega_lat*omega_lat*omega_lat/6*Math.cos(latrad_lat)*Math.cos(latrad_lat)*Math.cos(latrad_lat)*(psi_lat-t_lat*t_lat);
 var&amp;nbsp;&amp;nbsp; e3_lat=nu_lat*Math.pow(omega_lat,5)/120*Math.pow(Math.cos(latrad_lat),5)*(4*psi_lat*psi_lat*psi_lat*(1-6*t_lat*t_lat)+psi_lat*psi_lat*(1+8*t_lat*t_lat)-psi_lat*2*t_lat*t_lat+Math.pow(t_lat,4));
&amp;nbsp; var&amp;nbsp; e4_lat=nu_lat*Math.pow(omega_lat,7)/5040*Math.pow(Math.cos(latrad_lat),7)*(61-479*t_lat*t_lat+179*Math.pow(t_lat,4)-Math.pow(t_lat,6));
 var&amp;nbsp;&amp;nbsp; e_lat=k0*(e1_lat+e2_lat+e3_lat+e4_lat);
 var&amp;nbsp;&amp;nbsp; n1_lat=(omega_lat*omega_lat)/2*Math.cos(latrad_lat);
 var&amp;nbsp;&amp;nbsp; n1_lat0=n1_lat*nu_lat*Math.sin(latrad_lat);
 var&amp;nbsp;&amp;nbsp; n2_lat=(Math.pow(omega_lat,4)/24)*(Math.pow(Math.cos(latrad_lat),3))*(4*psi_lat*psi_lat+psi_lat-t_lat*t_lat);
 var&amp;nbsp;&amp;nbsp; n2_lat0=n2_lat*nu_lat*Math.sin(latrad_lat);
 var&amp;nbsp;&amp;nbsp; n3_lat=(Math.pow(omega_lat,6)/720)*(Math.pow(Math.cos(latrad_lat),5))*(8*Math.pow(psi_lat,4)*(11-24*t_lat*t_lat)-28*Math.pow(psi_lat,3)*(1-6*t_lat*t_lat)+psi_lat*psi_lat*(1-32*t_lat*t_lat)-2*psi_lat*t_lat*t_lat+Math.pow(t_lat,4));
&amp;nbsp; var&amp;nbsp; n3_lat0=n3_lat*nu_lat*Math.sin(latrad_lat);
 var&amp;nbsp;&amp;nbsp; n4_lat=(Math.pow(omega_lat,8)/40320)*(Math.pow(Math.cos(latrad_lat),7))*(1385-3111*t_lat*t_lat+543*Math.pow(t_lat,4)-Math.pow(t_lat,6));
 var&amp;nbsp;&amp;nbsp; n4_lat0=n4_lat*nu_lat*Math.sin(latrad_lat);
 var&amp;nbsp;&amp;nbsp; n_lat=k0*(mlat_lat+nu_lat*Math.sin(latrad_lat)*(n1_lat+n2_lat+n3_lat+n4_lat));
 var&amp;nbsp;&amp;nbsp; n_lat0=k0*mlat_lat0;
 var&amp;nbsp;&amp;nbsp; no=n_lat-n_lat0;
&amp;nbsp; var&amp;nbsp; x=e_lat+x0*metconv;
 var&amp;nbsp;&amp;nbsp; y=(n_lat-n_lat0)+y0*metconv;
//&amp;nbsp;&amp;nbsp;&amp;nbsp; alert(n_lat);
//&amp;nbsp;&amp;nbsp;&amp;nbsp; alert("x="+x+"y="+y);
&amp;nbsp; //&amp;nbsp; alert("a0="+a0_lat+"a2="+a2_lat+"a4="+a4_lat+"a6="+a6_lat);
 var&amp;nbsp;&amp;nbsp; xft=x/metconv;
 var&amp;nbsp;&amp;nbsp; yft=y/metconv;
 //&amp;nbsp;&amp;nbsp; alert("x="+xft+"y="+yft);
&amp;nbsp; return [xft,yft];
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 16:52:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/math-for-converting-coordinates/m-p/361666#M33464</guid>
      <dc:creator>JeffPace</dc:creator>
      <dc:date>2021-12-11T16:52:14Z</dc:date>
    </item>
    <item>
      <title>Re: Math for converting coordinates</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/math-for-converting-coordinates/m-p/361667#M33465</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;also&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; org.mymanatee.common.latlong.convertWebMercAuxtoLL = function (uX,uY) {
&amp;nbsp; //code completely borrowed from http://www.frosties.com/index.php?option=com_mojo&amp;amp;Itemid=45&amp;amp;p=7
&amp;nbsp;&amp;nbsp; // lat and long backwards on link for some reason
&amp;nbsp;&amp;nbsp; //alert("IN CONVERSION");
&amp;nbsp; var x = uX;
&amp;nbsp;&amp;nbsp; // alert("IN CONVERSION2");
&amp;nbsp; var&amp;nbsp; y = uY;
&amp;nbsp;&amp;nbsp; 
 var num3 = x / 6378137.0;
 var num4 = num3 * 57.295779513082323;
 //alert("IN CONVERSION3");
 var num5 = Math.floor(((num4 + 180.0) / 360.0));
 var num6 = num4 - (num5 * 360.0);
 //alert("IN CONVERSION4");
var&amp;nbsp; num7 = 1.5707963267948966 - (2.0 * Math.atan(Math.exp((-1.0 * y) / 6378137.0)));
var lon&amp;nbsp; = num6;
var lat = num7*57.295779513082323;



&amp;nbsp;&amp;nbsp; // alert([lat,lon]);


&amp;nbsp;&amp;nbsp;&amp;nbsp; return [lat,lon];
&amp;nbsp;&amp;nbsp;&amp;nbsp; };
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; org.mymanatee.common.latlong.convertLLtoWebMercAux = function (lat,lon) {
&amp;nbsp; //code completely borrowed from Dr Bill Hazelton's HP-33S calculator
&amp;nbsp;&amp;nbsp;&amp;nbsp; // http://homepage.mac.com/nwjh/HP-33S/ 10-Feb-10

&amp;nbsp;&amp;nbsp;&amp;nbsp; //code completely borrowed from Dr Bill Hazelton's HP-33S calculator
&amp;nbsp;&amp;nbsp;&amp;nbsp; // http://homepage.mac.com/nwjh/HP-33S/ 10-Feb-10
var num = lon * 0.017453292519943295;
var x = 6378137.0 * num;
var a = lat * 0.017453292519943295;

var mercatorX = x;
var mercatorY = 3189068.5*Math.log((1.0 + Math.sin(a))/(1.0 - Math.sin(a)));

//&amp;nbsp;&amp;nbsp;&amp;nbsp; alert(londd);

&amp;nbsp;&amp;nbsp;&amp;nbsp; return [mercatorX,mercatorY];
&amp;nbsp;&amp;nbsp;&amp;nbsp; };&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 16:52:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/math-for-converting-coordinates/m-p/361667#M33465</guid>
      <dc:creator>JeffPace</dc:creator>
      <dc:date>2021-12-11T16:52:16Z</dc:date>
    </item>
    <item>
      <title>Re: Math for converting coordinates</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/math-for-converting-coordinates/m-p/361668#M33466</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;is washington south transverse mercator or lambert?&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It's Lambert Conformal Conic&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Feb 2013 17:15:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/math-for-converting-coordinates/m-p/361668#M33466</guid>
      <dc:creator>DuncanNisbett</dc:creator>
      <dc:date>2013-02-04T17:15:46Z</dc:date>
    </item>
    <item>
      <title>Re: Math for converting coordinates</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/math-for-converting-coordinates/m-p/361669#M33467</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;One of the original sources is &lt;/SPAN&gt;&lt;A href="http://pubs.usgs.gov/pp/1395/report.pdf"&gt;John Snyder's Map Projections: A Working Manual&lt;/A&gt;&lt;SPAN&gt;. It also contains the state plane parameter values (NAD83 changes from NAD27 are listed in an appendix). &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you use Jeff Pace's code as a template, please note that the "map units" of the first section are in US survey feet, not meters.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Melita&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Feb 2013 18:20:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/math-for-converting-coordinates/m-p/361669#M33467</guid>
      <dc:creator>MelitaKennedy</dc:creator>
      <dc:date>2013-02-04T18:20:08Z</dc:date>
    </item>
    <item>
      <title>Re: Math for converting coordinates</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/math-for-converting-coordinates/m-p/361670#M33468</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;that is correct&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Feb 2013 18:46:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/math-for-converting-coordinates/m-p/361670#M33468</guid>
      <dc:creator>JeffPace</dc:creator>
      <dc:date>2013-02-04T18:46:00Z</dc:date>
    </item>
    <item>
      <title>Re: Math for converting coordinates</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/math-for-converting-coordinates/m-p/361671#M33469</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;One of the original sources is &lt;A href="http://pubs.usgs.gov/pp/1395/report.pdf"&gt;John Snyder's Map Projections: A Working Manual&lt;/A&gt;. It also contains the state plane parameter values (NAD83 changes from NAD27 are listed in an appendix). &lt;BR /&gt;&lt;BR /&gt;If you use Jeff Pace's code as a template, please note that the "map units" of the first section are in US survey feet, not meters.&lt;BR /&gt;&lt;BR /&gt;Melita&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I admit to feeling a bit overwhelmed, this doesn't appear to be as straightforward a process as I had hoped. The PDF has a lot of information and am unable to process until I can really sit down and read it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I took a look at the 5 functions that Jeff Pace included and no single function performs an accurate or even close conversion. Do I need to use a combination of these functions? If so, what combination should I be using?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Feb 2013 18:51:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/math-for-converting-coordinates/m-p/361671#M33469</guid>
      <dc:creator>DuncanNisbett</dc:creator>
      <dc:date>2013-02-04T18:51:39Z</dc:date>
    </item>
    <item>
      <title>Re: Math for converting coordinates</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/math-for-converting-coordinates/m-p/361672#M33470</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I stumbled upon this old post while working on a similar project and was able to get&amp;nbsp;Jeff's code to work&amp;nbsp;for the first function(&lt;SPAN style="color: #000000; background-color: #f6f6f6;"&gt;convertSPtoLL_LLC)&lt;/SPAN&gt; by adding in the false northing variable and Y coordinate correction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;New lines are in red.&lt;/P&gt;&lt;OL class="" start="1" style="color: #5c5c5c; background-color: #ffffff; border: none; font-size: 12px; margin: 0px 0px 1px 45px !important;"&gt;&lt;LI class="" style="color: #5c5c5c; background-color: #f6f6f6; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;org.mymanatee.common.latlong.convertSPtoLL_LLC&amp;nbsp;=&amp;nbsp;function&amp;nbsp;(uX,uY)&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: inherit; background-color: #ffffff; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;var&amp;nbsp;a&amp;nbsp;=&amp;nbsp;20925604.48;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//major&amp;nbsp;radius&amp;nbsp;of&amp;nbsp;ellipsoid,&amp;nbsp;map&amp;nbsp;units&amp;nbsp;(NAD&amp;nbsp;83)&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: #5c5c5c; background-color: #f6f6f6; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;var&amp;nbsp;ec&amp;nbsp;=&amp;nbsp;0.08181905782;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//eccentricity&amp;nbsp;of&amp;nbsp;ellipsoid&amp;nbsp;(NAD&amp;nbsp;83)&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: inherit; background-color: #ffffff; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;var&amp;nbsp;angRad&amp;nbsp;=&amp;nbsp;0.01745329252;&amp;nbsp;&amp;nbsp;&amp;nbsp;//number&amp;nbsp;of&amp;nbsp;radians&amp;nbsp;in&amp;nbsp;a&amp;nbsp;degree&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: #5c5c5c; background-color: #f6f6f6; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;var&amp;nbsp;pi4&amp;nbsp;=&amp;nbsp;Math.PI&amp;nbsp;/&amp;nbsp;4;&amp;nbsp;&amp;nbsp;&amp;nbsp;//Pi&amp;nbsp;/&amp;nbsp;4&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: inherit; background-color: #ffffff; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;var&amp;nbsp;p0&amp;nbsp;=&amp;nbsp;24.333333&amp;nbsp;*&amp;nbsp;angRad;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//latitude&amp;nbsp;of&amp;nbsp;origin&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: #5c5c5c; background-color: #f6f6f6; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;var&amp;nbsp;p1&amp;nbsp;=&amp;nbsp;24.333333&amp;nbsp;*&amp;nbsp;angRad;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//latitude&amp;nbsp;of&amp;nbsp;first&amp;nbsp;standard&amp;nbsp;parallel&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: inherit; background-color: #ffffff; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;var&amp;nbsp;p2&amp;nbsp;=&amp;nbsp;31.5&amp;nbsp;*&amp;nbsp;angRad;&amp;nbsp;&amp;nbsp;&amp;nbsp;//latitude&amp;nbsp;of&amp;nbsp;second&amp;nbsp;standard&amp;nbsp;parallel&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: #5c5c5c; background-color: #f6f6f6; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;var&amp;nbsp;m0&amp;nbsp;=&amp;nbsp;-82.000000&amp;nbsp;*&amp;nbsp;angRad;&amp;nbsp;&amp;nbsp;&amp;nbsp;//central&amp;nbsp;meridian&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: inherit; background-color: #ffffff; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;var&amp;nbsp;x0&amp;nbsp;=&amp;nbsp;656166.666667;&amp;nbsp;&amp;nbsp;&amp;nbsp;//False&amp;nbsp;easting&amp;nbsp;of&amp;nbsp;central&amp;nbsp;meridian,&amp;nbsp;map&amp;nbsp;units&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: #5c5c5c; background-color: #f6f6f6; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;&lt;SPAN style="color: #ff0000;"&gt;var y0 = value;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//False northing of central meridian, map units&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: inherit; background-color: #ffffff; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;//&amp;nbsp;Calculate&amp;nbsp;the&amp;nbsp;coordinate&amp;nbsp;system&amp;nbsp;constants.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: #5c5c5c; background-color: #f6f6f6; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;with&amp;nbsp;(Math)&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: inherit; background-color: #ffffff; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;var&amp;nbsp;m1&amp;nbsp;=&amp;nbsp;cos(p1)&amp;nbsp;/&amp;nbsp;sqrt(1&amp;nbsp;-&amp;nbsp;(pow(ec,2))&amp;nbsp;*&amp;nbsp;pow(sin(p1),2));&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: #5c5c5c; background-color: #f6f6f6; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;var&amp;nbsp;m2&amp;nbsp;=&amp;nbsp;cos(p2)&amp;nbsp;/&amp;nbsp;sqrt(1&amp;nbsp;-&amp;nbsp;(pow(ec,2))&amp;nbsp;*&amp;nbsp;pow(sin(p2),2));&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: inherit; background-color: #ffffff; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;var&amp;nbsp;t0&amp;nbsp;=&amp;nbsp;tan(pi4&amp;nbsp;-&amp;nbsp;(p0&amp;nbsp;/&amp;nbsp;2));&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: #5c5c5c; background-color: #f6f6f6; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;var&amp;nbsp;t1&amp;nbsp;=&amp;nbsp;tan(pi4&amp;nbsp;-&amp;nbsp;(p1&amp;nbsp;/&amp;nbsp;2));&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: inherit; background-color: #ffffff; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;var&amp;nbsp;t2&amp;nbsp;=&amp;nbsp;tan(pi4&amp;nbsp;-&amp;nbsp;(p2&amp;nbsp;/&amp;nbsp;2));&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: #5c5c5c; background-color: #f6f6f6; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;t0&amp;nbsp;=&amp;nbsp;t0&amp;nbsp;/&amp;nbsp;pow(((1&amp;nbsp;-&amp;nbsp;(ec&amp;nbsp;*&amp;nbsp;(sin(p0))))&amp;nbsp;/&amp;nbsp;(1&amp;nbsp;+&amp;nbsp;(ec&amp;nbsp;*&amp;nbsp;(sin(p0))))),ec/2);&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: inherit; background-color: #ffffff; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;t1&amp;nbsp;=&amp;nbsp;t1&amp;nbsp;/&amp;nbsp;pow(((1&amp;nbsp;-&amp;nbsp;(ec&amp;nbsp;*&amp;nbsp;(sin(p1))))&amp;nbsp;/&amp;nbsp;(1&amp;nbsp;+&amp;nbsp;(ec&amp;nbsp;*&amp;nbsp;(sin(p1))))),ec/2);&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: #5c5c5c; background-color: #f6f6f6; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;t2&amp;nbsp;=&amp;nbsp;t2&amp;nbsp;/&amp;nbsp;pow(((1&amp;nbsp;-&amp;nbsp;(ec&amp;nbsp;*&amp;nbsp;(sin(p2))))&amp;nbsp;/&amp;nbsp;(1&amp;nbsp;+&amp;nbsp;(ec&amp;nbsp;*&amp;nbsp;(sin(p2))))),ec/2);&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: inherit; background-color: #ffffff; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;var&amp;nbsp;n&amp;nbsp;=&amp;nbsp;log(m1&amp;nbsp;/&amp;nbsp;m2)&amp;nbsp;/&amp;nbsp;log(t1&amp;nbsp;/&amp;nbsp;t2);&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: #5c5c5c; background-color: #f6f6f6; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;var&amp;nbsp;f&amp;nbsp;=&amp;nbsp;m1&amp;nbsp;/&amp;nbsp;(n&amp;nbsp;*&amp;nbsp;pow(t1,n));&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: inherit; background-color: #ffffff; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;var&amp;nbsp;rho0&amp;nbsp;=&amp;nbsp;a&amp;nbsp;*&amp;nbsp;f&amp;nbsp;*&amp;nbsp;pow(t0,n);&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: #5c5c5c; background-color: #f6f6f6; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: inherit; background-color: #ffffff; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;//&amp;nbsp;Convert&amp;nbsp;the&amp;nbsp;coordinate&amp;nbsp;to&amp;nbsp;Latitude/Longitude.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: #5c5c5c; background-color: #f6f6f6; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: inherit; background-color: #ffffff; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;//&amp;nbsp;Calculate&amp;nbsp;the&amp;nbsp;Longitude.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: #5c5c5c; background-color: #f6f6f6; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;var&amp;nbsp;uX&amp;nbsp;=&amp;nbsp;uX&amp;nbsp;-&amp;nbsp;x0;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: #5c5c5c; background-color: #f6f6f6; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: #ff0000; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;var uY = uY - y0;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: inherit; background-color: #ffffff; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;var&amp;nbsp;pi2&amp;nbsp;=&amp;nbsp;pi4&amp;nbsp;*&amp;nbsp;2;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: #5c5c5c; background-color: #f6f6f6; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: inherit; background-color: #ffffff; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;var&amp;nbsp;rho&amp;nbsp;=&amp;nbsp;sqrt(pow(uX,2)&amp;nbsp;+&amp;nbsp;pow((rho0&amp;nbsp;-&amp;nbsp;uY),2));&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: #5c5c5c; background-color: #f6f6f6; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;var&amp;nbsp;theta&amp;nbsp;=&amp;nbsp;atan(uX&amp;nbsp;/&amp;nbsp;(rho0&amp;nbsp;-&amp;nbsp;uY));&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: inherit; background-color: #ffffff; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;var&amp;nbsp;txy&amp;nbsp;=&amp;nbsp;pow((rho&amp;nbsp;/&amp;nbsp;(a&amp;nbsp;*&amp;nbsp;f)),(1&amp;nbsp;/&amp;nbsp;n));&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: #5c5c5c; background-color: #f6f6f6; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;var&amp;nbsp;lon&amp;nbsp;=&amp;nbsp;(theta&amp;nbsp;/&amp;nbsp;n)&amp;nbsp;+&amp;nbsp;m0;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: inherit; background-color: #ffffff; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;var&amp;nbsp;uX&amp;nbsp;=&amp;nbsp;uX&amp;nbsp;+&amp;nbsp;x0;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: #5c5c5c; background-color: #f6f6f6; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: inherit; background-color: #ffffff; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;//&amp;nbsp;Estimate&amp;nbsp;the&amp;nbsp;Latitude&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: #5c5c5c; background-color: #f6f6f6; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;var&amp;nbsp;lat0&amp;nbsp;=&amp;nbsp;pi2&amp;nbsp;-&amp;nbsp;(2&amp;nbsp;*&amp;nbsp;atan(txy));&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: inherit; background-color: #ffffff; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: #5c5c5c; background-color: #f6f6f6; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;//&amp;nbsp;Substitute&amp;nbsp;the&amp;nbsp;estimate&amp;nbsp;into&amp;nbsp;the&amp;nbsp;iterative&amp;nbsp;calculation&amp;nbsp;that&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: inherit; background-color: #ffffff; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;//&amp;nbsp;converges&amp;nbsp;on&amp;nbsp;the&amp;nbsp;correct&amp;nbsp;Latitude&amp;nbsp;value.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: #5c5c5c; background-color: #f6f6f6; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;var&amp;nbsp;part1&amp;nbsp;=&amp;nbsp;(1&amp;nbsp;-&amp;nbsp;(ec&amp;nbsp;*&amp;nbsp;sin(lat0)))&amp;nbsp;/&amp;nbsp;(1&amp;nbsp;+&amp;nbsp;(ec&amp;nbsp;*&amp;nbsp;sin(lat0)));&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: inherit; background-color: #ffffff; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;var&amp;nbsp;lat1&amp;nbsp;=&amp;nbsp;pi2&amp;nbsp;-&amp;nbsp;(2&amp;nbsp;*&amp;nbsp;atan(txy&amp;nbsp;*&amp;nbsp;pow(part1,(ec/2))));&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: #5c5c5c; background-color: #f6f6f6; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: inherit; background-color: #ffffff; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;while&amp;nbsp;((abs(lat1&amp;nbsp;-&amp;nbsp;lat0))&amp;nbsp;&amp;gt;&amp;nbsp;0.000000002)&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: #5c5c5c; background-color: #f6f6f6; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;&amp;nbsp;&amp;nbsp;lat0&amp;nbsp;=&amp;nbsp;lat1;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: inherit; background-color: #ffffff; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;&amp;nbsp;&amp;nbsp;part1&amp;nbsp;=&amp;nbsp;(1&amp;nbsp;-&amp;nbsp;(ec&amp;nbsp;*&amp;nbsp;sin(lat0)))&amp;nbsp;/&amp;nbsp;(1&amp;nbsp;+&amp;nbsp;(ec&amp;nbsp;*&amp;nbsp;sin(lat0)));&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: #5c5c5c; background-color: #f6f6f6; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;&amp;nbsp;&amp;nbsp;lat1&amp;nbsp;=&amp;nbsp;pi2&amp;nbsp;-&amp;nbsp;(2&amp;nbsp;*&amp;nbsp;atan(txy&amp;nbsp;*&amp;nbsp;pow(part1,(ec/2))));&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: inherit; background-color: #ffffff; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: #5c5c5c; background-color: #f6f6f6; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: inherit; background-color: #ffffff; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;//&amp;nbsp;Convert&amp;nbsp;from&amp;nbsp;radians&amp;nbsp;to&amp;nbsp;degrees.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: #5c5c5c; background-color: #f6f6f6; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;var&amp;nbsp;Lat&amp;nbsp;=&amp;nbsp;lat1&amp;nbsp;/&amp;nbsp;angRad;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: inherit; background-color: #ffffff; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;var&amp;nbsp;Lon&amp;nbsp;=&amp;nbsp;lon&amp;nbsp;/&amp;nbsp;angRad;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: #5c5c5c; background-color: #f6f6f6; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: inherit; background-color: #ffffff; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;//alert(Lat);&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: #5c5c5c; background-color: #f6f6f6; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;//alert(Lon);&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: inherit; background-color: #ffffff; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: #5c5c5c; background-color: #f6f6f6; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;//Round&amp;nbsp;the&amp;nbsp;latitude&amp;nbsp;and&amp;nbsp;longitude&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: inherit; background-color: #ffffff; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;//lat&amp;nbsp;=&amp;nbsp;(CLng(lat&amp;nbsp;*&amp;nbsp;100000))&amp;nbsp;/&amp;nbsp;100000;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: #5c5c5c; background-color: #f6f6f6; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;//lon&amp;nbsp;=&amp;nbsp;(CLng(lon&amp;nbsp;*&amp;nbsp;100000))&amp;nbsp;/&amp;nbsp;100000;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: inherit; background-color: #ffffff; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: #5c5c5c; background-color: #f6f6f6; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;Lat&amp;nbsp;=&amp;nbsp;Lat.toPrecision(7);&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: inherit; background-color: #ffffff; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;Lon&amp;nbsp;=&amp;nbsp;Lon.toPrecision(8);&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: #5c5c5c; background-color: #f6f6f6; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: inherit; background-color: #ffffff; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;return&amp;nbsp;[Lat,Lon];&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: #5c5c5c; background-color: #f6f6f6; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: inherit; background-color: #ffffff; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;}&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: #5c5c5c; background-color: #f6f6f6; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;};&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="" style="color: inherit; background-color: #ffffff; border-top: none; border-bottom: none; border-left: 3px solid #6ce26c; border-right: none; font-weight: inherit; font-size: 12px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"&gt;&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;//End&amp;nbsp;of&amp;nbsp;Code&amp;nbsp;for&amp;nbsp;converting&amp;nbsp;map&amp;nbsp;units&amp;nbsp;to&amp;nbsp;decimal&amp;nbsp;degrees.&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Jun 2019 22:14:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/math-for-converting-coordinates/m-p/361672#M33470</guid>
      <dc:creator>DavidKitten</dc:creator>
      <dc:date>2019-06-14T22:14:15Z</dc:date>
    </item>
  </channel>
</rss>

