<?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: Search Widget - &amp;quot;Invalid URL&amp;quot; in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-widget-quot-invalid-url-quot/m-p/696247#M64833</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you tried debugging your code to see the resulting URL on the request? It may be incorrect... I would also have a look at capturing the web traffic using Fiddler - this could shine some light on the issue.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 17 Aug 2015 18:22:26 GMT</pubDate>
    <dc:creator>ChrisSmith7</dc:creator>
    <dc:date>2015-08-17T18:22:26Z</dc:date>
    <item>
      <title>Search Widget - "Invalid URL"</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-widget-quot-invalid-url-quot/m-p/696246#M64832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Trying to use the Search widget for the first time and I'm getting an "Invalid URL" as I start to type in the widget. The service itself works since I can use it via the REST directory:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="searchWidgetExample.jpg" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/122747_searchWidgetExample.jpg" style="width: 620px; height: 436px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm modeling my code partly after what's in &lt;A _jive_internal="true" href="https://community.esri.com/thread/123038" target="_blank"&gt;this thread&lt;/A&gt; (April 22nd by John Ritsko). Anyways here's my code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var s = new Search({
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map: app.map,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sources: [{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; locator: new Locator(SERVERPATH + "/transportation/StreetsGeocder/GeocodeServer"),
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; singleLineFieldName: "Single Line Input",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; name: "County Geocoding Service",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; localSearchOptions: {
&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; minScale: 300000,
&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; distance: 50000},
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; placeholder: "Search for Street / Address",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; maxResults: 3,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; maxSuggestions: 6,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; enableSuggestions: true,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; minCharacters: 0
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }]
&amp;nbsp;&amp;nbsp;&amp;nbsp; },"search");
&amp;nbsp;&amp;nbsp;&amp;nbsp; s.startup();&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's the error in the console:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="searchError.jpg" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/122748_searchError.jpg" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried both an absolute URL to the Geocoder service as well as the relative pathing as shown above. So what gives?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 05:18:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-widget-quot-invalid-url-quot/m-p/696246#M64832</guid>
      <dc:creator>SteveCole</dc:creator>
      <dc:date>2021-12-12T05:18:40Z</dc:date>
    </item>
    <item>
      <title>Re: Search Widget - "Invalid URL"</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-widget-quot-invalid-url-quot/m-p/696247#M64833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you tried debugging your code to see the resulting URL on the request? It may be incorrect... I would also have a look at capturing the web traffic using Fiddler - this could shine some light on the issue.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Aug 2015 18:22:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-widget-quot-invalid-url-quot/m-p/696247#M64833</guid>
      <dc:creator>ChrisSmith7</dc:creator>
      <dc:date>2015-08-17T18:22:26Z</dc:date>
    </item>
    <item>
      <title>Re: Search Widget - "Invalid URL"</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-widget-quot-invalid-url-quot/m-p/696248#M64834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, Chris. Your response led me in the right direction. I was fixated on the front part of the URL and didn't notice that the actual operation it was requesting ("suggest") did not exist. When I switched the "enableSuggestions" option to false in the constructor, the widget worked as it should.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to re-create the geocoder in 10.3 to get it to work with suggestions. Thanks, though!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Aug 2015 18:39:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-widget-quot-invalid-url-quot/m-p/696248#M64834</guid>
      <dc:creator>SteveCole</dc:creator>
      <dc:date>2015-08-17T18:39:04Z</dc:date>
    </item>
  </channel>
</rss>

