<?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 Reverse Geocode by latitude and longitude in ArcGIS API for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/reverse-geocode-by-latitude-and-longitude/m-p/246754#M5844</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello all, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm a newbie to ArcGIS&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I been searching around the forum and got most of my questions answer without having to post one of my own until now.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have the&amp;nbsp; latitude and longitude&amp;nbsp; and I need Reverse Geocode to find the state. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't need the MAP so I'm not sure if there is way to pass a function the latitude and longitude and get the candidate.address object?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;any help would be great thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 20 Sep 2012 14:36:49 GMT</pubDate>
    <dc:creator>MIkeColonna</dc:creator>
    <dc:date>2012-09-20T14:36:49Z</dc:date>
    <item>
      <title>Reverse Geocode by latitude and longitude</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/reverse-geocode-by-latitude-and-longitude/m-p/246754#M5844</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello all, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm a newbie to ArcGIS&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I been searching around the forum and got most of my questions answer without having to post one of my own until now.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have the&amp;nbsp; latitude and longitude&amp;nbsp; and I need Reverse Geocode to find the state. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't need the MAP so I'm not sure if there is way to pass a function the latitude and longitude and get the candidate.address object?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;any help would be great thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Sep 2012 14:36:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/reverse-geocode-by-latitude-and-longitude/m-p/246754#M5844</guid>
      <dc:creator>MIkeColonna</dc:creator>
      <dc:date>2012-09-20T14:36:49Z</dc:date>
    </item>
    <item>
      <title>Re: Reverse Geocode by latitude and longitude</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/reverse-geocode-by-latitude-and-longitude/m-p/246755#M5845</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Found the answer:&amp;nbsp; had the&amp;nbsp; lat-lon Reverse and the wrong SpatialReference below is the simple app if anyone else new runs into this problem...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;
&amp;lt;s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:s="library://ns.adobe.com/flex/spark" 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:mx="library://ns.adobe.com/flex/mx"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:esri="http://www.esri.com/2008/ags"&amp;gt;
 
 
 
 
 &amp;lt;fx:Script&amp;gt;
&amp;nbsp; &amp;lt;![CDATA[
&amp;nbsp;&amp;nbsp; import com.esri.ags.Graphic;
&amp;nbsp;&amp;nbsp; import com.esri.ags.SpatialReference;
&amp;nbsp;&amp;nbsp; import com.esri.ags.events.GraphicEvent;
&amp;nbsp;&amp;nbsp; import com.esri.ags.events.LocatorEvent;
&amp;nbsp;&amp;nbsp; import com.esri.ags.events.MapMouseEvent;
&amp;nbsp;&amp;nbsp; import com.esri.ags.geometry.Extent;
&amp;nbsp;&amp;nbsp; import com.esri.ags.geometry.MapPoint;
&amp;nbsp;&amp;nbsp; import com.esri.ags.tasks.Locator;
&amp;nbsp;&amp;nbsp; import com.esri.ags.tasks.supportClasses.AddressCandidate;
&amp;nbsp;&amp;nbsp; import com.esri.ags.utils.WebMercatorUtil;
&amp;nbsp;&amp;nbsp; import com.esri.ags.tasks.supportClasses.AddressCandidate;
&amp;nbsp;&amp;nbsp; import mx.rpc.events.FaultEvent;
&amp;nbsp; 
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; private function onLocationToAddressComplete(event:LocatorEvent):void
&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; var candidate:AddressCandidate = event.addressCandidate;
&amp;nbsp;&amp;nbsp;&amp;nbsp; state.text=candidate.address.State;
&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; protected function button1_clickHandler(event:MouseEvent):void
&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; locateTask.locationToAddress(myPoint,100);
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; private function onFault(event:FaultEvent):void
&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; trace(event.fault.faultString);
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; state.text= " error:" + event.fault.faultDetail;
&amp;nbsp;&amp;nbsp;&amp;nbsp; //url="http://tasks.arcgisonline.com/ArcGIS/rest/services/Locators/TA_Address_NA/GeocodeServer" 
&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp; 
&amp;nbsp; ]]&amp;gt;
 &amp;lt;/fx:Script&amp;gt;

 &amp;lt;fx:Declarations&amp;gt;
&amp;nbsp; &amp;lt;esri:Graphic&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;lt;esri:MapPoint id="myPoint" x="-121.645"&amp;nbsp; y="46.339" spatialReference="{new SpatialReference(4152)}"/&amp;gt;
&amp;nbsp; &amp;lt;/esri:Graphic&amp;gt;
&amp;nbsp; 
&amp;nbsp; &amp;lt;esri:Locator id="locateTask" 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; url="http://tasks.arcgisonline.com/ArcGIS/rest/services/Locators/TA_Address_NA_10/GeocodeServer" 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; concurrency="last"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; locationToAddressComplete="onLocationToAddressComplete(event)" 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fault="onFault(event)"/&amp;gt;

 &amp;lt;/fx:Declarations&amp;gt;
 
 
 &amp;lt;s:Button x="10" y="10" label="Button" click="button1_clickHandler(event)"/&amp;gt;
 &amp;lt;s:Label id="state" x="92" y="10" width="567" height="589" text="Label"/&amp;gt;
 
&amp;lt;/s:WindowedApplication&amp;gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 12:16:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/reverse-geocode-by-latitude-and-longitude/m-p/246755#M5845</guid>
      <dc:creator>MIkeColonna</dc:creator>
      <dc:date>2021-12-11T12:16:53Z</dc:date>
    </item>
  </channel>
</rss>

