<?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: Reprojecting a Point in ArcGIS API for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/reprojecting-a-point/m-p/228999#M5409</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Aaron,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; You need to specify the Spatial Reference of the GPSPoint before you send it to the geometry service for projection (i.e. 4326 if it is WGS 1984).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 21 Oct 2011 13:31:56 GMT</pubDate>
    <dc:creator>RobertScheitlin__GISP</dc:creator>
    <dc:date>2011-10-21T13:31:56Z</dc:date>
    <item>
      <title>Reprojecting a Point</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/reprojecting-a-point/m-p/228998#M5408</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have been struggling with this code for a few days now and have not come to a resolution. What I am trying to do is reproject a geolocation event to display on a base map in a state plane projection. I would prefer to do the calculation on the client side but since I do not know the formula to go from WGS84 to CT State plane NAD83, I am stuck sending the request to my geometry service. I have tried almost everything I can think of (thats why I am posting), in debugging mode I can see the values (Lat and Long) being passed to the geometry service with the output spatial reference, but there are no values being returned. I have tried the ESRI geometry service and my own (which is server 9.3.1), but return no results. &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;nbsp;&amp;nbsp; private function onTravel(event:GeolocationEvent):void 
&amp;nbsp;&amp;nbsp; { 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var long:String = event.longitude.toString();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var lat:String = event.latitude.toString();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var longnew:Number = Number(long);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var latnew:Number = Number(lat);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var GPSPoint:MapPoint = new MapPoint(longnew, latnew);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; geoLat.text = event.latitude.toString();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; geoLong.text = event.longitude.toString(); 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var graphic:Graphic = new Graphic(GPSPoint, GPSicon);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myGraphicsLayer.clear(); 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myGraphicsLayer.add(graphic);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var outSR:SpatialReference = new SpatialReference(2234);&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; geometryService.project([GPSPoint as Geometry], outSR); 

&amp;nbsp;&amp;nbsp; }&amp;nbsp; &lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;nbsp;&amp;nbsp; private function projectCompleteHandler(event:GeometryServiceEvent):void
&amp;nbsp;&amp;nbsp; { 
&amp;nbsp;&amp;nbsp;&amp;nbsp; try
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp; 
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; var pt:MapPoint = (event.result as Array)[0]as MapPoint;
&amp;nbsp;&amp;nbsp;&amp;nbsp; reprojectLat.text = pt.x.toString();
&amp;nbsp;&amp;nbsp;&amp;nbsp; reprojectLong.text = pt.y.toString();
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp; catch (error:Error)
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Alert.show(error.toString());
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp; }&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the code I am using, instead of reprojecting the data to display on the map. I created a box on the map that would show the current X and Y and the reprojected X and Y, the map service I am using is in WGS 1984 and the GPS mappoint is displayed correctly on the map. I just cannot figure out why the geometry service is not returning any values...HELP&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Aaron&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Oct 2011 13:00:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/reprojecting-a-point/m-p/228998#M5408</guid>
      <dc:creator>AaronNash</dc:creator>
      <dc:date>2011-10-21T13:00:11Z</dc:date>
    </item>
    <item>
      <title>Re: Reprojecting a Point</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/reprojecting-a-point/m-p/228999#M5409</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Aaron,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; You need to specify the Spatial Reference of the GPSPoint before you send it to the geometry service for projection (i.e. 4326 if it is WGS 1984).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Oct 2011 13:31:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/reprojecting-a-point/m-p/228999#M5409</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2011-10-21T13:31:56Z</dc:date>
    </item>
    <item>
      <title>Re: Reprojecting a Point</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/reprojecting-a-point/m-p/229000#M5410</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;that was it, like always thanks so so much for your help. I am now finally returning values&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Oct 2011 13:48:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/reprojecting-a-point/m-p/229000#M5410</guid>
      <dc:creator>AaronNash</dc:creator>
      <dc:date>2011-10-21T13:48:29Z</dc:date>
    </item>
  </channel>
</rss>

