<?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: JS API Search Widget Lat Long in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-api-search-widget-lat-long/m-p/121333#M11324</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, you need some source that can take a lat/long input and find that location. Couple options to consider:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Little hacky, but include Esri World Geocoding Service as a source, but turn suggestions off. It can still search for POIs etc., but will at least not show them as suggestions. Example:&amp;nbsp;&lt;A class="link-titled" href="https://codepen.io/noash/pen/dyogyLq?editors=1000" title="https://codepen.io/noash/pen/dyogyLq?editors=1000"&gt;https://codepen.io/noash/pen/dyogyLq?editors=1000&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Build a separate search box using the Locator task and/or the reverseGeocode endpoint. This means there would be 2 search boxes, one for the Search widget and the layer sources, and one for lat/long input.&lt;/P&gt;&lt;P&gt;Locator task:&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-Locator.html#locationToAddress" title="https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-Locator.html#locationToAddress"&gt;Locator | ArcGIS API for JavaScript 4.14&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;reverseGeocode:&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/rest/geocode/api-reference/geocoding-reverse-geocode.htm" title="https://developers.arcgis.com/rest/geocode/api-reference/geocoding-reverse-geocode.htm"&gt;reverseGeocode—ArcGIS REST API: World Geocoding Service | ArcGIS for Developers&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 23 Mar 2020 21:19:31 GMT</pubDate>
    <dc:creator>Noah-Sager</dc:creator>
    <dc:date>2020-03-23T21:19:31Z</dc:date>
    <item>
      <title>JS API Search Widget Lat Long</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-api-search-widget-lat-long/m-p/121330#M11321</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I get the 4.14 JS API search widget to respond to lat/long searches e.g. &lt;SPAN style="color: #0000ff;"&gt;33.667, -85.83065&lt;/SPAN&gt;&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;witho&lt;/STRONG&gt;&lt;/EM&gt;&lt;SPAN style="color: #000000;"&gt;&lt;EM&gt;&lt;STRONG&gt;ut&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="color: #000000;"&gt;includeDefaultSources: true&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;I don't want the users to be able to search for place names or metadata other than in sources I explicitly specify. Here's the code that responds to lat/long searches but gives the user many possibilities for searching:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; searchWidget &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;Search&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt; 
view&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; view&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; 
allPlaceholder&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Search here"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; 
locationEnabled&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;false&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; 
includeDefaultSources&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;true&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
maxSuggestions&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;200&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; 
sources&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
 layer&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; lyr_PostOffices&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
 searchFields&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Province"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"County"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"District"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Street"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
 suggestionTemplate&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"{Province}, {County}, {District}, {Street}"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
 exactMatch&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;false&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
 outFields&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"*"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
 name&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Search only for Post Offices"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
 placeholder&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Search for a post office"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
 layer&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; lyr_CarParks&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
 searchFields&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Company"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Name"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
 suggestionTemplate&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"{Company}, {Name}"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
 exactMatch&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;false&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
 outFields&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"*"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
 name&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Search only for Car Parks"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
 placeholder&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Search for a car park"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Shane&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:01:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-api-search-widget-lat-long/m-p/121330#M11321</guid>
      <dc:creator>Shane_</dc:creator>
      <dc:date>2021-12-11T07:01:35Z</dc:date>
    </item>
    <item>
      <title>Re: JS API Search Widget Lat Long</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-api-search-widget-lat-long/m-p/121331#M11322</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So you want users to be able to search for place names in the two layers you defined in the search widget constructor, and be able to do reverse geocoding (e.g. user can supply lat/longs)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Esri World Geocoding Service (the default source) allows for reverse geocoding. So if you want the user to be able to do r&lt;SPAN&gt;everse geocoding, then I think you either have to allow default sources, or consume a different LocatorSearchSource (e.g. a&amp;nbsp;service that does not have POI information). You might be able to publish this kind of service from ArcGIS Pro, or configure the properties in an ArcGIS Portal locator.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2020 19:00:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-api-search-widget-lat-long/m-p/121331#M11322</guid>
      <dc:creator>Noah-Sager</dc:creator>
      <dc:date>2020-03-23T19:00:04Z</dc:date>
    </item>
    <item>
      <title>Re: JS API Search Widget Lat Long</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-api-search-widget-lat-long/m-p/121332#M11323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Noah,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually all I want to happen when the user enters a lat/long is for the map to be centered on that point and then zoom in. Would I need a reverse geocoding service for that or just listen for the click(?) event?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Shane&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2020 19:25:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-api-search-widget-lat-long/m-p/121332#M11323</guid>
      <dc:creator>Shane_</dc:creator>
      <dc:date>2020-03-23T19:25:26Z</dc:date>
    </item>
    <item>
      <title>Re: JS API Search Widget Lat Long</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-api-search-widget-lat-long/m-p/121333#M11324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, you need some source that can take a lat/long input and find that location. Couple options to consider:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Little hacky, but include Esri World Geocoding Service as a source, but turn suggestions off. It can still search for POIs etc., but will at least not show them as suggestions. Example:&amp;nbsp;&lt;A class="link-titled" href="https://codepen.io/noash/pen/dyogyLq?editors=1000" title="https://codepen.io/noash/pen/dyogyLq?editors=1000"&gt;https://codepen.io/noash/pen/dyogyLq?editors=1000&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Build a separate search box using the Locator task and/or the reverseGeocode endpoint. This means there would be 2 search boxes, one for the Search widget and the layer sources, and one for lat/long input.&lt;/P&gt;&lt;P&gt;Locator task:&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-Locator.html#locationToAddress" title="https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-Locator.html#locationToAddress"&gt;Locator | ArcGIS API for JavaScript 4.14&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;reverseGeocode:&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/rest/geocode/api-reference/geocoding-reverse-geocode.htm" title="https://developers.arcgis.com/rest/geocode/api-reference/geocoding-reverse-geocode.htm"&gt;reverseGeocode—ArcGIS REST API: World Geocoding Service | ArcGIS for Developers&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2020 21:19:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-api-search-widget-lat-long/m-p/121333#M11324</guid>
      <dc:creator>Noah-Sager</dc:creator>
      <dc:date>2020-03-23T21:19:31Z</dc:date>
    </item>
  </channel>
</rss>

