<?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: LocateButton on locate event in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/locatebutton-on-locate-event/m-p/751875#M69519</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Sorry Tom, I think that I got it now.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Take a look at this &lt;/SPAN&gt;&lt;A href="http://jsfiddle.net/rpepato/bw3CC/"&gt;fiddle&lt;/A&gt;&lt;SPAN&gt; with the implementation that I think you're looking for.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;See some prints of this in action below:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]30855[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]30856[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The second screenshot will be displayed when you click on a point that could not be reverse-geocoded, like for example, a click on the ocean or between streets outside of the range you specified.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Let me know if it helps.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Roberto Pepato.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 25 Jan 2014 14:25:38 GMT</pubDate>
    <dc:creator>RobertoPepato</dc:creator>
    <dc:date>2014-01-25T14:25:38Z</dc:date>
    <item>
      <title>LocateButton on locate event</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/locatebutton-on-locate-event/m-p/751872#M69516</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Greetings!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am working with the LocateButton and trying to get some information about the point when the on 'locate' event fires.&amp;nbsp; It looks like it is supposed provide graphic, position and scale information, but I guess I am not sure what the proper syntax is to return this information.&amp;nbsp; This is my code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;var geoLocate = new LocateButton({
&amp;nbsp;&amp;nbsp; map: map,
&amp;nbsp;&amp;nbsp; setScale: false,
&amp;nbsp;&amp;nbsp; centerAt: false
}, "LocateButton");
geoLocate.startup();
geoLocate.on('locate',gpsUpdate);
&amp;nbsp; 
function gpsUpdate(gps) {
&amp;nbsp;&amp;nbsp; // do fun things with GPS info
}
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for any help!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jan 2014 22:28:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/locatebutton-on-locate-event/m-p/751872#M69516</guid>
      <dc:creator>TomSellsted</dc:creator>
      <dc:date>2014-01-23T22:28:27Z</dc:date>
    </item>
    <item>
      <title>Re: LocateButton on locate event</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/locatebutton-on-locate-event/m-p/751873#M69517</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Greetings!&lt;BR /&gt;&lt;BR /&gt;I am working with the LocateButton and trying to get some information about the point when the on 'locate' event fires.&amp;nbsp; It looks like it is supposed provide graphic, position and scale information, but I guess I am not sure what the proper syntax is to return this information.&amp;nbsp; This is my code:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;var geoLocate = new LocateButton({
&amp;nbsp;&amp;nbsp; map: map,
&amp;nbsp;&amp;nbsp; setScale: false,
&amp;nbsp;&amp;nbsp; centerAt: false
}, "LocateButton");
geoLocate.startup();
geoLocate.on('locate',gpsUpdate);
&amp;nbsp; 
function gpsUpdate(gps) {
&amp;nbsp;&amp;nbsp; // do fun things with GPS info
}
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks for any help!&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The information you are looking for is provided through the function parameter. As you are naming the parameter 'gps' you can access the info this way:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;gps.graphic&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;gps.position&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;gps.scale&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 07:55:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/locatebutton-on-locate-event/m-p/751873#M69517</guid>
      <dc:creator>RobertoPepato</dc:creator>
      <dc:date>2021-12-12T07:55:35Z</dc:date>
    </item>
    <item>
      <title>Re: LocateButton on locate event</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/locatebutton-on-locate-event/m-p/751874#M69518</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;My apologies Roberto, I should have been more clear with my request.&amp;nbsp; Those are exactly the objects I am expecting to be returned when the locate event is fired.&amp;nbsp; I am not receiving that object.&amp;nbsp; The event appears to be fired when the request is made, not when the position is returned.&amp;nbsp; How do I get the result of the position being found?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks very much!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 25 Jan 2014 13:50:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/locatebutton-on-locate-event/m-p/751874#M69518</guid>
      <dc:creator>TomSellsted</dc:creator>
      <dc:date>2014-01-25T13:50:44Z</dc:date>
    </item>
    <item>
      <title>Re: LocateButton on locate event</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/locatebutton-on-locate-event/m-p/751875#M69519</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Sorry Tom, I think that I got it now.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Take a look at this &lt;/SPAN&gt;&lt;A href="http://jsfiddle.net/rpepato/bw3CC/"&gt;fiddle&lt;/A&gt;&lt;SPAN&gt; with the implementation that I think you're looking for.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;See some prints of this in action below:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]30855[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]30856[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The second screenshot will be displayed when you click on a point that could not be reverse-geocoded, like for example, a click on the ocean or between streets outside of the range you specified.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Let me know if it helps.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Roberto Pepato.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 25 Jan 2014 14:25:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/locatebutton-on-locate-event/m-p/751875#M69519</guid>
      <dc:creator>RobertoPepato</dc:creator>
      <dc:date>2014-01-25T14:25:38Z</dc:date>
    </item>
  </channel>
</rss>

