<?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 ArcGis locator task vs REST call has different results in ArcGIS Runtime SDK for iOS Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/arcgis-locator-task-vs-rest-call-has-different/m-p/1200835#M7421</link>
    <description>&lt;P&gt;I am using the android and iOS sdks to perform a geocode request to the server. When I am calling the same endpoint using REST I get different results back.&lt;/P&gt;&lt;P&gt;In my case the REST call has more results.&lt;/P&gt;&lt;P&gt;iOS code:&lt;/P&gt;&lt;PRE&gt;        &lt;SPAN class=""&gt;let&lt;/SPAN&gt; locatorTask &lt;SPAN class=""&gt;=&lt;/SPAN&gt; &lt;SPAN class=""&gt;AGSLocatorTask&lt;/SPAN&gt;(url: &lt;SPAN class=""&gt;URL&lt;/SPAN&gt;(string: &lt;SPAN class=""&gt;"https://my-server/services/GeocodeServer/"&lt;/SPAN&gt;)&lt;SPAN class=""&gt;!&lt;/SPAN&gt;)
        
        &lt;SPAN class=""&gt;let&lt;/SPAN&gt; params &lt;SPAN class=""&gt;=&lt;/SPAN&gt; &lt;SPAN class=""&gt;AGSGeocodeParameters&lt;/SPAN&gt;()
        params.maxResults &lt;SPAN class=""&gt;=&lt;/SPAN&gt; payload.maxSuggestions
        params.countryCode &lt;SPAN class=""&gt;=&lt;/SPAN&gt; &lt;SPAN class=""&gt;"DE"&lt;/SPAN&gt;
        params.outputSpatialReference &lt;SPAN class=""&gt;=&lt;/SPAN&gt; .wgs84()
        params.resultAttributeNames &lt;SPAN class=""&gt;=&lt;/SPAN&gt; [&lt;SPAN class=""&gt;"*"&lt;/SPAN&gt;]

        locatorTask.geocode(withSearchText: payload.searchQuery, parameters: params) {
          &lt;SPAN class=""&gt;// handle result&lt;/SPAN&gt;
        }&lt;/PRE&gt;&lt;P&gt;REST call:&lt;/P&gt;&lt;P&gt;&lt;A href="https://my-server/services/GeocodeServer/suggest?f=json&amp;amp;text=SomeStreet" target="_blank" rel="noopener"&gt;https://my-server/services/GeocodeServer/suggest?f=json&amp;amp;text=SomeStreet&lt;/A&gt;&lt;/P&gt;&lt;P&gt;It would be nice to know what request url the iOS lib generates.&lt;/P&gt;</description>
    <pubDate>Tue, 09 Aug 2022 15:34:05 GMT</pubDate>
    <dc:creator>JulianBissekkou</dc:creator>
    <dc:date>2022-08-09T15:34:05Z</dc:date>
    <item>
      <title>ArcGis locator task vs REST call has different results</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/arcgis-locator-task-vs-rest-call-has-different/m-p/1200835#M7421</link>
      <description>&lt;P&gt;I am using the android and iOS sdks to perform a geocode request to the server. When I am calling the same endpoint using REST I get different results back.&lt;/P&gt;&lt;P&gt;In my case the REST call has more results.&lt;/P&gt;&lt;P&gt;iOS code:&lt;/P&gt;&lt;PRE&gt;        &lt;SPAN class=""&gt;let&lt;/SPAN&gt; locatorTask &lt;SPAN class=""&gt;=&lt;/SPAN&gt; &lt;SPAN class=""&gt;AGSLocatorTask&lt;/SPAN&gt;(url: &lt;SPAN class=""&gt;URL&lt;/SPAN&gt;(string: &lt;SPAN class=""&gt;"https://my-server/services/GeocodeServer/"&lt;/SPAN&gt;)&lt;SPAN class=""&gt;!&lt;/SPAN&gt;)
        
        &lt;SPAN class=""&gt;let&lt;/SPAN&gt; params &lt;SPAN class=""&gt;=&lt;/SPAN&gt; &lt;SPAN class=""&gt;AGSGeocodeParameters&lt;/SPAN&gt;()
        params.maxResults &lt;SPAN class=""&gt;=&lt;/SPAN&gt; payload.maxSuggestions
        params.countryCode &lt;SPAN class=""&gt;=&lt;/SPAN&gt; &lt;SPAN class=""&gt;"DE"&lt;/SPAN&gt;
        params.outputSpatialReference &lt;SPAN class=""&gt;=&lt;/SPAN&gt; .wgs84()
        params.resultAttributeNames &lt;SPAN class=""&gt;=&lt;/SPAN&gt; [&lt;SPAN class=""&gt;"*"&lt;/SPAN&gt;]

        locatorTask.geocode(withSearchText: payload.searchQuery, parameters: params) {
          &lt;SPAN class=""&gt;// handle result&lt;/SPAN&gt;
        }&lt;/PRE&gt;&lt;P&gt;REST call:&lt;/P&gt;&lt;P&gt;&lt;A href="https://my-server/services/GeocodeServer/suggest?f=json&amp;amp;text=SomeStreet" target="_blank" rel="noopener"&gt;https://my-server/services/GeocodeServer/suggest?f=json&amp;amp;text=SomeStreet&lt;/A&gt;&lt;/P&gt;&lt;P&gt;It would be nice to know what request url the iOS lib generates.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Aug 2022 15:34:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/arcgis-locator-task-vs-rest-call-has-different/m-p/1200835#M7421</guid>
      <dc:creator>JulianBissekkou</dc:creator>
      <dc:date>2022-08-09T15:34:05Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGis locator task vs REST call has different results</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/arcgis-locator-task-vs-rest-call-has-different/m-p/1200868#M7422</link>
      <description>&lt;P&gt;You can use &lt;A href="https://developers.arcgis.com/ios/api-reference/interface_a_g_s_request_configuration.html" target="_self"&gt;&lt;STRONG&gt;AGSRequestConfiguration&lt;/STRONG&gt;&lt;/A&gt; to log some debug info to the console. Try something like this:&lt;/P&gt;&lt;LI-CODE lang="swift"&gt;let locatorTask = AGSLocatorTask(url: URL(string: "https://my-server/services/GeocodeServer/")!)

if let gc = AGSRequestConfiguration.global().copy() as? AGSRequestConfiguration {
    gc.debugLogRequests = true
    locatorTask.requestConfiguration = gc
}&lt;/LI-CODE&gt;&lt;P&gt;That should output the request for you.&lt;/P&gt;&lt;P&gt;Please note that you should not log this debug info in a release version of your app. There is a performance hit to this logging and you should disable it in production and testing.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Aug 2022 16:16:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/arcgis-locator-task-vs-rest-call-has-different/m-p/1200868#M7422</guid>
      <dc:creator>Nicholas-Furness</dc:creator>
      <dc:date>2022-08-09T16:16:13Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGis locator task vs REST call has different results</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/arcgis-locator-task-vs-rest-call-has-different/m-p/1201797#M7424</link>
      <description>&lt;P&gt;Thanks! I was able to take a look at the request and I noticed that the client sdk uses a different query param.&lt;/P&gt;&lt;P class=""&gt;It adds `findAddressCandidates?`, `&amp;amp;outSR`, `&amp;amp;forStorage` and `&amp;amp;SingleLine` but the REST calls works fine with just `&amp;amp;text=`.&lt;BR /&gt;&lt;BR /&gt;I would like to only send `&amp;amp;text` and nothing else.&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;Are we able to configure that?&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2022 08:52:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/arcgis-locator-task-vs-rest-call-has-different/m-p/1201797#M7424</guid>
      <dc:creator>JulianBissekkou</dc:creator>
      <dc:date>2022-08-11T08:52:24Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGis locator task vs REST call has different results</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/arcgis-locator-task-vs-rest-call-has-different/m-p/1201802#M7425</link>
      <description>&lt;P&gt;Okay I think i missed the "suggest" method of the locatorTask that does exactly what I thought.&lt;/P&gt;&lt;P&gt;My question is: Why is there a "suggest" api when we can also search for points using geocode?&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2022 09:37:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/arcgis-locator-task-vs-rest-call-has-different/m-p/1201802#M7425</guid>
      <dc:creator>JulianBissekkou</dc:creator>
      <dc:date>2022-08-11T09:37:12Z</dc:date>
    </item>
  </channel>
</rss>

