<?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: Flex - Display latitude and longitue in ArcGIS API for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/flex-display-latitude-and-longitue/m-p/663819#M14877</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;If you can switch your map services to web mercator than that is your best bet.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you for the reply.&amp;nbsp; Since there doesn't seem to be a client-side way to do this, and the best bet of using web mercator is not ideal for us, I decided to try the math approach.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is a function I wrote to do the conversion from UTM to Lat Long.&amp;nbsp; This function is set up for WGS_1984_UTM_Zone_12N but should work for other UTM zones/projections if the information for the six variables in the settings section are changed to be correct for that projection.&amp;nbsp; This function will not work for other coordinate systems such as state plane however, since the math is totally different.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;private function UTMtoLATLON(mapPoint:MapPoint):MapPoint
{
 //The math in this function was based off of methods found on http://www.gpsy.com/gpsinfo/geotoutm/ by Karen Nakamura

 //Set easting and northing from the MapPoint
 var easting:Number = mapPoint.x; //the X coordinate from the service in UTM meters
 var northing:Number = mapPoint.y; //the Y coordinate from the service in UTM meters

 //Settings for WGS_1984_UTM_Zone_12N or WKID 32612
 var avflat:Number = 298.257223563; //the Inverse Flattening that ArcGIS provides in the geographic coordinate description
 var semiMAJaxis:Number = 6378137.0; //the Semimajor Axis that ArcGIS provides in the geographic coordinate description
 var meridORIG:Number = -111.0;&amp;nbsp; //the Central Meridian that ArcGIS provides in the projection description
 var scFACTorig:Number = 0.9996;&amp;nbsp; //the Scale Factor that ArcGIS provides in the projection description
 var falseNOR:Number = 0.0;&amp;nbsp;&amp;nbsp; //the False Northing that ArcGIS provides in the projection description
 var falseEST:Number = 500000.0;&amp;nbsp; //the False Easting that ArcGIS provides in the projection description

 //Calculations
 var flattening:Number = 1.0/avflat; //change Inverse Flattening into flattening
 var eccentricity:Number = (2.0*flattening)-(flattening*flattening); //calculate eccentricity
 var semiMINaxis:Number = semiMAJaxis*(Math.pow((1.0-eccentricity),0.5)); //calculate the Semiminor Axis
 var n:Number = (semiMAJaxis - semiMINaxis)/(semiMAJaxis + semiMINaxis);&amp;nbsp; //calculate n
 var semiMAJecc:Number = semiMAJaxis*(1.0-eccentricity);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //calculate the Semimajor Eccentricity
 var semiMINecc:Number = 1.0/(Math.sin((1.0/3600.0)*Math.PI/180.0));&amp;nbsp;&amp;nbsp; //calculate the Semiminor Eccentricity
 var epsilon:Number = 1097.0*(Math.pow(n,4.0))/512.0;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //calculate epsilon
 var delta:Number = 151.0*(Math.pow(n,3.0))/96.0-(417.0*(Math.pow(n,5.0))/128.0);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //calculate delta
 var gamma:Number = 21.0*(Math.pow(n,2.0))/16.0-(55.0*(Math.pow(n,4.0))/32.0);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //calculate gamma
 var beta:Number = 3.0*n/2.0-(27.0*(Math.pow(n,3.0))/32.0)+(269.0*(Math.pow(n,5.0))/512.0);&amp;nbsp;&amp;nbsp;&amp;nbsp; //calculate beta
 var alpha:Number = (semiMAJaxis + semiMINaxis)/2.0*(1.0+(Math.pow(n,2.0))/4.0+(Math.pow(n,4.0))/64.0); //calculate alpha
 var phiprime:Number = (northing - falseNOR)/(scFACTorig*alpha); //calculate phiprime
 var phiF:Number = phiprime+beta*Math.sin(2.0*phiprime)+gamma*Math.sin(4.0*phiprime)+delta*Math.sin(6.0*phiprime)+epsilon*Math.sin(8.0*phiprime); //calculate phiF
 var v:Number = semiMAJaxis/(Math.pow(1.0-(eccentricity*(Math.pow(Math.sin(phiF),2.0))),0.5)); //calculate v
 var p:Number = semiMAJecc/Math.pow((1.0-(eccentricity*Math.pow(Math.sin(phiF),2.0))),1.5);&amp;nbsp; //calculate p
 var VII:Number = ((Math.tan(phiF)*Math.pow((easting-falseEST),2.0))/(2.0*Math.pow(scFACTorig,2.0)*v*p))*((1.0/(Math.sin((1.0/3600.0)*Math.PI/180.0)))); //calculate VII
 var VIII:Number = ((Math.tan(phiF)*Math.pow((easting-falseEST),4.0))/(24.0*Math.pow(scFACTorig,4.0)*Math.pow(v,3.0)*p))*(5.0+3.0*Math.pow((Math.tan(phiF)),2.0))*(1.0/(Math.sin((1.0/3600.0)*Math.PI/180.0))); //calculate VIII
 var X:Number = ((1.0/Math.cos(phiF))*Math.pow((easting-falseEST),3.0)*semiMINecc)/(6.0*Math.pow(scFACTorig,3.0)*Math.pow(v,3.0))*((v/p)+2.0*Math.pow((Math.tan(phiF)),2.0)); //calculate X
 var IX:Number = ((1.0/Math.cos(phiF))*(easting-falseEST)*semiMINecc)/(scFACTorig*v); //calculate XI
 var E:Number = ((1.0/Math.cos(phiF))*Math.pow((easting-falseEST),5.0)*semiMINecc)/(120.0*Math.pow(scFACTorig,5.0)*Math.pow(v,5.0))*(5.0+28.0*Math.pow((Math.tan(phiF)),2.0)+24.0*Math.pow((Math.tan(phiF)),4.0)); //calculate E
 var phiFdegrees:Number = phiF*180.0/Math.PI;&amp;nbsp;&amp;nbsp;&amp;nbsp; //change phiF from radians to degrees
 var DDegLat:Number = phiFdegrees-VII/3600.0+VIII/3600.0; //calculate degrees latitude
 var DDegLon:Number = meridORIG+(IX-X+E)/3600.0;&amp;nbsp;&amp;nbsp;&amp;nbsp; //calculate degrees longitude
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
 //Set the MapPoint to the new Lat and Lon
 mapPoint.x = DDegLon;
 mapPoint.y = DDegLat;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
 //Return the MapPoint
 return mapPoint;
}&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 04:03:48 GMT</pubDate>
    <dc:creator>JacksonTrappett</dc:creator>
    <dc:date>2021-12-12T04:03:48Z</dc:date>
    <item>
      <title>Flex - Display latitude and longitue</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/flex-display-latitude-and-longitue/m-p/663817#M14875</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello, I can't seem to search the old forums anymore so I figured I'd try asking on these new ones.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My question:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a flex app that is displaying a map in a projected coordinate system (WGS 1984 UTM Zone 12N) which means that my map units are in meters.&amp;nbsp; I am displaying the coordinate position of the mouse using two &amp;lt;mx:text&amp;gt; elements but of course it is displaying meters.&amp;nbsp; What my user's would like to see is a display of the latitude and longitude of the mouse while still keeping the map in the projected coordinate system.&amp;nbsp; Is this possible?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Apr 2010 16:34:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/flex-display-latitude-and-longitue/m-p/663817#M14875</guid>
      <dc:creator>JacksonTrappett</dc:creator>
      <dc:date>2010-04-02T16:34:39Z</dc:date>
    </item>
    <item>
      <title>Re:  Flex - Display latitude and longitue</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/flex-display-latitude-and-longitue/m-p/663818#M14876</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;JTrappett,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; There is no way currently or in the next API version to project coordinates to WGS1984 on the client side unless you are using the web mercator (wkid 102100). And you would not want to make a round trip to the server to use the geometry service to re-project the mouse coordinate either as your app would hardly ever stop talking to the server. If you can switch your map services to web mercator than that is your best bet.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Apr 2010 11:00:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/flex-display-latitude-and-longitue/m-p/663818#M14876</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2010-04-05T11:00:36Z</dc:date>
    </item>
    <item>
      <title>Re: Flex - Display latitude and longitue</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/flex-display-latitude-and-longitue/m-p/663819#M14877</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;If you can switch your map services to web mercator than that is your best bet.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you for the reply.&amp;nbsp; Since there doesn't seem to be a client-side way to do this, and the best bet of using web mercator is not ideal for us, I decided to try the math approach.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is a function I wrote to do the conversion from UTM to Lat Long.&amp;nbsp; This function is set up for WGS_1984_UTM_Zone_12N but should work for other UTM zones/projections if the information for the six variables in the settings section are changed to be correct for that projection.&amp;nbsp; This function will not work for other coordinate systems such as state plane however, since the math is totally different.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;private function UTMtoLATLON(mapPoint:MapPoint):MapPoint
{
 //The math in this function was based off of methods found on http://www.gpsy.com/gpsinfo/geotoutm/ by Karen Nakamura

 //Set easting and northing from the MapPoint
 var easting:Number = mapPoint.x; //the X coordinate from the service in UTM meters
 var northing:Number = mapPoint.y; //the Y coordinate from the service in UTM meters

 //Settings for WGS_1984_UTM_Zone_12N or WKID 32612
 var avflat:Number = 298.257223563; //the Inverse Flattening that ArcGIS provides in the geographic coordinate description
 var semiMAJaxis:Number = 6378137.0; //the Semimajor Axis that ArcGIS provides in the geographic coordinate description
 var meridORIG:Number = -111.0;&amp;nbsp; //the Central Meridian that ArcGIS provides in the projection description
 var scFACTorig:Number = 0.9996;&amp;nbsp; //the Scale Factor that ArcGIS provides in the projection description
 var falseNOR:Number = 0.0;&amp;nbsp;&amp;nbsp; //the False Northing that ArcGIS provides in the projection description
 var falseEST:Number = 500000.0;&amp;nbsp; //the False Easting that ArcGIS provides in the projection description

 //Calculations
 var flattening:Number = 1.0/avflat; //change Inverse Flattening into flattening
 var eccentricity:Number = (2.0*flattening)-(flattening*flattening); //calculate eccentricity
 var semiMINaxis:Number = semiMAJaxis*(Math.pow((1.0-eccentricity),0.5)); //calculate the Semiminor Axis
 var n:Number = (semiMAJaxis - semiMINaxis)/(semiMAJaxis + semiMINaxis);&amp;nbsp; //calculate n
 var semiMAJecc:Number = semiMAJaxis*(1.0-eccentricity);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //calculate the Semimajor Eccentricity
 var semiMINecc:Number = 1.0/(Math.sin((1.0/3600.0)*Math.PI/180.0));&amp;nbsp;&amp;nbsp; //calculate the Semiminor Eccentricity
 var epsilon:Number = 1097.0*(Math.pow(n,4.0))/512.0;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //calculate epsilon
 var delta:Number = 151.0*(Math.pow(n,3.0))/96.0-(417.0*(Math.pow(n,5.0))/128.0);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //calculate delta
 var gamma:Number = 21.0*(Math.pow(n,2.0))/16.0-(55.0*(Math.pow(n,4.0))/32.0);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //calculate gamma
 var beta:Number = 3.0*n/2.0-(27.0*(Math.pow(n,3.0))/32.0)+(269.0*(Math.pow(n,5.0))/512.0);&amp;nbsp;&amp;nbsp;&amp;nbsp; //calculate beta
 var alpha:Number = (semiMAJaxis + semiMINaxis)/2.0*(1.0+(Math.pow(n,2.0))/4.0+(Math.pow(n,4.0))/64.0); //calculate alpha
 var phiprime:Number = (northing - falseNOR)/(scFACTorig*alpha); //calculate phiprime
 var phiF:Number = phiprime+beta*Math.sin(2.0*phiprime)+gamma*Math.sin(4.0*phiprime)+delta*Math.sin(6.0*phiprime)+epsilon*Math.sin(8.0*phiprime); //calculate phiF
 var v:Number = semiMAJaxis/(Math.pow(1.0-(eccentricity*(Math.pow(Math.sin(phiF),2.0))),0.5)); //calculate v
 var p:Number = semiMAJecc/Math.pow((1.0-(eccentricity*Math.pow(Math.sin(phiF),2.0))),1.5);&amp;nbsp; //calculate p
 var VII:Number = ((Math.tan(phiF)*Math.pow((easting-falseEST),2.0))/(2.0*Math.pow(scFACTorig,2.0)*v*p))*((1.0/(Math.sin((1.0/3600.0)*Math.PI/180.0)))); //calculate VII
 var VIII:Number = ((Math.tan(phiF)*Math.pow((easting-falseEST),4.0))/(24.0*Math.pow(scFACTorig,4.0)*Math.pow(v,3.0)*p))*(5.0+3.0*Math.pow((Math.tan(phiF)),2.0))*(1.0/(Math.sin((1.0/3600.0)*Math.PI/180.0))); //calculate VIII
 var X:Number = ((1.0/Math.cos(phiF))*Math.pow((easting-falseEST),3.0)*semiMINecc)/(6.0*Math.pow(scFACTorig,3.0)*Math.pow(v,3.0))*((v/p)+2.0*Math.pow((Math.tan(phiF)),2.0)); //calculate X
 var IX:Number = ((1.0/Math.cos(phiF))*(easting-falseEST)*semiMINecc)/(scFACTorig*v); //calculate XI
 var E:Number = ((1.0/Math.cos(phiF))*Math.pow((easting-falseEST),5.0)*semiMINecc)/(120.0*Math.pow(scFACTorig,5.0)*Math.pow(v,5.0))*(5.0+28.0*Math.pow((Math.tan(phiF)),2.0)+24.0*Math.pow((Math.tan(phiF)),4.0)); //calculate E
 var phiFdegrees:Number = phiF*180.0/Math.PI;&amp;nbsp;&amp;nbsp;&amp;nbsp; //change phiF from radians to degrees
 var DDegLat:Number = phiFdegrees-VII/3600.0+VIII/3600.0; //calculate degrees latitude
 var DDegLon:Number = meridORIG+(IX-X+E)/3600.0;&amp;nbsp;&amp;nbsp;&amp;nbsp; //calculate degrees longitude
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
 //Set the MapPoint to the new Lat and Lon
 mapPoint.x = DDegLon;
 mapPoint.y = DDegLat;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
 //Return the MapPoint
 return mapPoint;
}&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 04:03:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/flex-display-latitude-and-longitue/m-p/663819#M14877</guid>
      <dc:creator>JacksonTrappett</dc:creator>
      <dc:date>2021-12-12T04:03:48Z</dc:date>
    </item>
    <item>
      <title>code location</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/flex-display-latitude-and-longitue/m-p/663820#M14878</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Jackson,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This code is pretty much exactly what I'm looking for.&amp;nbsp; I'll just have to change it for zone 11N.&amp;nbsp; One question though, where in Desktop do I put it?&amp;nbsp; I've never worked with straight code before.&amp;nbsp; I'm using ArcEditor 9.3 with Spatial Analyst extension.&amp;nbsp; Any help would be greatly appreciated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;One other question, will this add the lat. lon. coordinates to the attribute table?&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Paul&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Apr 2010 14:00:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/flex-display-latitude-and-longitue/m-p/663820#M14878</guid>
      <dc:creator>PaulFrame</dc:creator>
      <dc:date>2010-04-21T14:00:43Z</dc:date>
    </item>
    <item>
      <title>Flex - Display latitude and longitue</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/flex-display-latitude-and-longitue/m-p/663821#M14879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi Jackson,&lt;BR /&gt;&lt;BR /&gt;This code is pretty much exactly what I'm looking for.&amp;nbsp; I'll just have to change it for zone 11N.&amp;nbsp; One question though, where in Desktop do I put it?&amp;nbsp; I've never worked with straight code before.&amp;nbsp; I'm using ArcEditor 9.3 with Spatial Analyst extension.&amp;nbsp; Any help would be greatly appreciated.&lt;BR /&gt;&lt;BR /&gt;One other question, will this add the lat. lon. coordinates to the attribute table?&amp;nbsp; &lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Paul&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Paul,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;From what I gather from your message, you are working on translating coordinates in desktop ArcGIS.&amp;nbsp; If this is the case you shouldn't need to use code like this for coordinate conversions.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This code is meant to be used in a web application (flex) where the coordinate conversions that ESRI provides haven't been made available yet.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you are wanting to add lat long coordinates to your attribute table in ArcMap, just add two columns of type double, one for each, then use the calculate geometry tool to calculate the coordinates and choose decimal degrees as the output.&amp;nbsp; If there is another reason you are looking for code like this, post more details and I can probably help you out.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Apr 2010 16:01:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/flex-display-latitude-and-longitue/m-p/663821#M14879</guid>
      <dc:creator>JacksonTrappett</dc:creator>
      <dc:date>2010-04-21T16:01:14Z</dc:date>
    </item>
    <item>
      <title>Thanks</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/flex-display-latitude-and-longitue/m-p/663822#M14880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Jackson.&amp;nbsp; You're right.&amp;nbsp; Your suggesting does what I needed.&amp;nbsp; After you mention it, I remember knowing how to do this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Apr 2010 16:18:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/flex-display-latitude-and-longitue/m-p/663822#M14880</guid>
      <dc:creator>PaulFrame</dc:creator>
      <dc:date>2010-04-21T16:18:19Z</dc:date>
    </item>
    <item>
      <title>Re: Flex - Display latitude and longitue</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/flex-display-latitude-and-longitue/m-p/663823#M14881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Does anyone know how one might go about doing something like this for State Plane?&amp;nbsp; We do this in our ArcIMS site, so the cursor's location would be converted on the fly to Lat Long.&amp;nbsp; The numbers for the conversion can be found &lt;/SPAN&gt;&lt;A href="http://nris.mt.gov/gis/projection/stategeo_asp.txt"&gt;here&lt;/A&gt;&lt;SPAN&gt;.&amp;nbsp; I'm just not sure how to go about it.&amp;nbsp; Any help is appreciated.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Jay&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jul 2010 19:59:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/flex-display-latitude-and-longitue/m-p/663823#M14881</guid>
      <dc:creator>JayGeisen</dc:creator>
      <dc:date>2010-07-07T19:59:22Z</dc:date>
    </item>
    <item>
      <title>Re: Flex - Display latitude and longitue</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/flex-display-latitude-and-longitue/m-p/663824#M14882</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It looks like you could take the code that you linked and make a function just like the one I posted.&amp;nbsp; The code you posted takes an x and y in state plane, does all of the math and you end up with a lat, long.&amp;nbsp; That should fit perfectly into a similar function in flex and then you can use the mouse move event to pass the x, y to your function and then the results of the function to the banner lat, long coordinates.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Are you using the sample viewer, or making a custom application?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jul 2010 18:33:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/flex-display-latitude-and-longitue/m-p/663824#M14882</guid>
      <dc:creator>JacksonTrappett</dc:creator>
      <dc:date>2010-07-08T18:33:24Z</dc:date>
    </item>
    <item>
      <title>Re: Flex - Display latitude and longitue</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/flex-display-latitude-and-longitue/m-p/663825#M14883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Jackson,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm using the Sample Flex Viewer and Robert's Banner widget.&amp;nbsp; I'm trying to figure out where to put the function and how to make it work with Robert's code, found &lt;/SPAN&gt;&lt;A href="http://resources.esri.com/arcgisserver/apis/flex/index.cfm?fa=codeGalleryDetails&amp;amp;scriptID=16355"&gt;here&lt;/A&gt;&lt;SPAN&gt;.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Actually, for that matter, a different widget that returned Lat/Long on a mouseclick (based off the above conversion) and provided a Lat/Long search option would be perhaps more like what I would like to do.&amp;nbsp; Are you using the Sample Viewer and Coordinate Display/Banner widget?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jay&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jul 2010 18:59:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/flex-display-latitude-and-longitue/m-p/663825#M14883</guid>
      <dc:creator>JayGeisen</dc:creator>
      <dc:date>2010-07-08T18:59:21Z</dc:date>
    </item>
    <item>
      <title>Re: Flex - Display latitude and longitue</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/flex-display-latitude-and-longitue/m-p/663826#M14884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Here's how I did it:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Step 1: Add your coordinate translation function.&amp;nbsp; See mine above.&amp;nbsp; I added it to the MapManager.xml.&amp;nbsp; I have it taking and returning a MapPoint which is just an x,y pair.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Step 2: Add a mouse move event listener to the map.&amp;nbsp; In the sample viewer this would be in MapManager.xml.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the config function add:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;map.addEventListener(MouseEvent.MOUSE_MOVE, mapMouseMove);&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then make a mapMouseMove function:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;private function mapMouseMove(event:MouseEvent):void
{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var mapPoint:MapPoint = map.toMapFromStage(event.stageX, event.stageY);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mapPoint = UTMtoLATLON(mapPoint);&amp;nbsp; //translate coordinates
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SiteContainer.dispatchEvent(new AppEvent(AppEvent.SET_XY, false, false, mapPoint));
}&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;I use a MapPoint object because it is provided by the API rather than make my own ordered pair object or send the x and y separately.&amp;nbsp; The AppEvent SET_XY is dispatched to let the banner know to update.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You'll also need to add the SET_XY event to AppEvent.as:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;public static const SET_XY:String = "setxyLoc";&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Step 3: In your banner set an event listener for the SET_XY event and then set the [Bindable] x and y variables for your banner display using the data that was dispatched.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the Banner init:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;SiteContainer.addEventListener(AppEvent.SET_XY, setXY);&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Add a Banner setXY function:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;private function setXY(event:AppEvent):void
{
 if (event.data)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var mapPoint:MapPoint = event.data as MapPoint;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xLoc = mapPoint.x.toFixed(6);
&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;&amp;nbsp;&amp;nbsp; yLoc = mapPoint.y.toFixed(6);
}&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;xLoc and yLoc are my bindable variables that are displayed in the banner for lat/long.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There may be a better way to do this, but this way has been working great for me.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 04:03:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/flex-display-latitude-and-longitue/m-p/663826#M14884</guid>
      <dc:creator>JacksonTrappett</dc:creator>
      <dc:date>2021-12-12T04:03:51Z</dc:date>
    </item>
    <item>
      <title>Re: Flex - Display latitude and longitue</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/flex-display-latitude-and-longitue/m-p/663827#M14885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Jackson.&amp;nbsp; I will give this a try.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jul 2010 17:45:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/flex-display-latitude-and-longitue/m-p/663827#M14885</guid>
      <dc:creator>JayGeisen</dc:creator>
      <dc:date>2010-07-09T17:45:41Z</dc:date>
    </item>
    <item>
      <title>Re: Flex - Display latitude and longitue</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/flex-display-latitude-and-longitue/m-p/663828#M14886</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Jackson,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I've been trying to implement this in my project going to a mapclick event. I have tried following your suggestions but keep getting a -- Access of possibly undefined property SET_XY through a refernce with static type Class-- error. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Am I correct in assuming --public static const SET_XY:String = "setxyLoc"; --this line is supposed to be in the mapmanager? Any ideas on what obvious clue I'm missing?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jul 2010 18:31:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/flex-display-latitude-and-longitue/m-p/663828#M14886</guid>
      <dc:creator>SandraPanicucci</dc:creator>
      <dc:date>2010-07-22T18:31:06Z</dc:date>
    </item>
    <item>
      <title>Re: Flex - Display latitude and longitue</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/flex-display-latitude-and-longitue/m-p/663829#M14887</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I realize this is a bit of an old post, but has anyone come across a function for State Plane projections that are in Transverse Mercator (Like Nevada, Arizona, etc)?&amp;nbsp; It seems like there are many functions out there for SP in the Conformal Conic and UTM zones (like the one above), but I haven't had any luck with the SP in TM.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So, has anyone come across anything like that?&amp;nbsp; I tried using the above function and modifying it a bit and that did not work out for me.&amp;nbsp; I guess the SP in TM requires a little bit different math than UTM zones...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Edit:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I wanted to attach the code I was attempting to use.&amp;nbsp; I changed it up a bit to work in VB.&amp;nbsp; Also, my original XY units are in feet, so I that is why you see the Dim easting As Double = y * 0.3048006096012, to change it to meters&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Function StateTMDD(ByVal x As Double, ByVal y As Double) As PointN&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim MapPoint As New PointN&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'The math in this function was based off of methods found on httpas'www.gpsy.com/gpsinfo/geotoutm/ by Karen Nakamura&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Set easting and northing from the MapPoint&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim easting As Double = y * 0.3048006096012&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'the X coordinate from the service in UTM meters&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim northing As Double = x * 0.3048006096012&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'the Y coordinate from the service in UTM meters&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim avflat As Double = 298.257223563&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'the Inverse Flattening that ArcGIS provides in the geographic coordinate description&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim semiMAJaxis As Double = 6378137.0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'the Semimajor Axis that ArcGIS provides in the geographic coordinate description&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim meridORIG As Double = -118.583333&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'the Central Meridian that ArcGIS provides in the projection description&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim scFACTorig As Double = 0.9999&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'the Scale Factor that ArcGIS provides in the projection description&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim falseNOR As Double = 400000&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; 'the False Northing that ArcGIS provides in the projection description&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim falseEST As Double = 80000&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'the False Easting that ArcGIS provides in the projection description&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim latORG As Double = 34.75&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Latitude of Origin&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Calculations&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim flattening As Double = 1.0 / avflat&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'change Inverse Flattening into flattening&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim eccentricity As Double = 0.08181905782&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'calculate eccentricity&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (2.0 * flattening) - (flattening * flattening)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim semiMINaxis As Double = 6356752.3141403561 'calculate the Semiminor Axis&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; semiMAJaxis * (Math.Pow((1.0 - eccentricity), 0.5))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim n As Double = (semiMAJaxis - semiMINaxis) / (semiMAJaxis + semiMINaxis)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'calculate n&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim semiMAJecc As Double = semiMAJaxis * (1.0 - eccentricity)&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'calculate the Semimajor Eccentricity&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim semiMINecc As Double = 1.0 / (Math.Sin((1.0 / 3600.0) * Math.PI / 180.0))&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'calculate the Semiminor Eccentricity&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim epsilon As Double = 1097.0 * (Math.Pow(n, 4.0)) / 512.0&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'calculate epsilon&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim delta As Double = 151.0 * (Math.Pow(n, 3.0)) / 96.0 - (417.0 * (Math.Pow(n, 5.0)) / 128.0)&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'calculate delta&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim gamma As Double = 21.0 * (Math.Pow(n, 2.0)) / 16.0 - (55.0 * (Math.Pow(n, 4.0)) / 32.0)&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'calculate gamma&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim beta As Double = 3.0 * n / 2.0 - (27.0 * (Math.Pow(n, 3.0)) / 32.0) + (269.0 * (Math.Pow(n, 5.0)) / 512.0)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'calculate beta&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim alpha As Double = (semiMAJaxis + semiMINaxis) / 2.0 * (1.0 + (Math.Pow(n, 2.0)) / 4.0 + (Math.Pow(n, 4.0)) / 64.0)&amp;nbsp; 'calculate alpha&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim phiprime As Double = (northing - falseNOR) / (scFACTorig * alpha)&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;&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;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'calculate phiprime&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim phiF As Double = phiprime + beta * Math.Sin(2.0 * phiprime) + gamma * Math.Sin(4.0 * phiprime) + delta * Math.Sin(6.0 * phiprime) + epsilon * Math.Sin(8.0 * phiprime) 'calculate phiF&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim v As Double = semiMAJaxis / (Math.Pow(1.0 - (eccentricity * (Math.Pow(Math.Sin(phiF), 2.0))), 0.5))&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'calculate v&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim p As Double = semiMAJecc / Math.Pow((1.0 - (eccentricity * Math.Pow(Math.Sin(phiF), 2.0))), 1.5)&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; 'calculate p&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim VII As Double = ((Math.Tan(phiF) * Math.Pow((easting - falseEST), 2.0)) / (2.0 * Math.Pow(scFACTorig, 2.0) * v * p)) * ((1.0 / (Math.Sin((1.0 / 3600.0) * Math.PI / 180.0))))&amp;nbsp;&amp;nbsp; 'calculate VII&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim VIII As Double = ((Math.Tan(phiF) * Math.Pow((easting - falseEST), 4.0)) / (24.0 * Math.Pow(scFACTorig, 4.0) * Math.Pow(v, 3.0) * p)) * (5.0 + 3.0 * Math.Pow((Math.Tan(phiF)), 2.0)) * (1.0 / (Math.Sin((1.0 / 3600.0) * Math.PI / 180.0)))&amp;nbsp; 'calculate VIII&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim Ten As Double = ((1.0 / Math.Cos(phiF)) * Math.Pow((easting - falseEST), 3.0) * semiMINecc) / (6.0 * Math.Pow(scFACTorig, 3.0) * Math.Pow(v, 3.0)) * ((v / p) + 2.0 * Math.Pow((Math.Tan(phiF)), 2.0))&amp;nbsp;&amp;nbsp; 'calculate X&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim IX As Double = ((1.0 / Math.Cos(phiF)) * (easting - falseEST) * semiMINecc) / (scFACTorig * v) 'calculate XI&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim E As Double = ((1.0 / Math.Cos(phiF)) * Math.Pow((easting - falseEST), 5.0) * semiMINecc) / (120.0 * Math.Pow(scFACTorig, 5.0) * Math.Pow(v, 5.0)) * (5.0 + 28.0 * Math.Pow((Math.Tan(phiF)), 2.0) + 24.0 * Math.Pow((Math.Tan(phiF)), 4.0))&amp;nbsp; 'calculate E&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim phiFdegrees As Double = phiF * 180.0 / Math.PI&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'change phiF from radians to degrees&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim DDegLat As Double = (phiFdegrees - VII / 3600.0 + VIII / 3600.0) + latORG&amp;nbsp; 'calculate degrees latitude&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim DDegLon As Double = meridORIG + (IX - Ten + E) / 3600.0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'calculate degrees longitude&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Set the MapPoint to the new Lat and Lon&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MapPoint.X = DDegLon&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MapPoint.Y = DDegLat&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Return the MapPoint&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return MapPoint&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Apr 2011 12:51:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/flex-display-latitude-and-longitue/m-p/663829#M14887</guid>
      <dc:creator>RoyceVerboom</dc:creator>
      <dc:date>2011-04-22T12:51:42Z</dc:date>
    </item>
  </channel>
</rss>

