<?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 Missing parameter and other issues in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/missing-parameter-and-other-issues/m-p/549541#M51185</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This concerns the esri.tasks.Locator class of the javascript API.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
locationToAddress(location, distance, callback?, errback?)
addressToLocations(address, outFields?, callback?, errback?)
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Both methods return the type AddressCandidate. LocationToAddress returns one AddressCandidate and addressToLocations returns an array of AddressCandidate.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the locationToAddress method the optional outFields parameter is &lt;/SPAN&gt;&lt;STRONG&gt;missing&lt;/STRONG&gt;&lt;SPAN&gt;. There is no reason why the programmer shouldn't be able to specify which fields he wants in the AddressCandidate object returned by locationToAddress.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As it is right now in order to retrieve additional field data one has to use the address provided by locationToAddress to call addressToLocations where outfields can be set.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When applying this to &lt;/SPAN&gt;&lt;A href="http://tasks.arcgisonline.com/ArcGIS/rest/services/Locators/TA_Address_EU/GeocodeServer" rel="nofollow noopener noreferrer" target="_blank"&gt;http://tasks.arcgisonline.com/ArcGIS/rest/services/Locators/TA_Address_EU/GeocodeServer&lt;/A&gt;&lt;SPAN&gt; another issue arises:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is the definition for the Address Fields:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
Address Fields:

&amp;nbsp;&amp;nbsp;&amp;nbsp; Address (Type: esriFieldTypeString, Alias: Address, Required: false )
&amp;nbsp;&amp;nbsp;&amp;nbsp; City (Type: esriFieldTypeString, Alias: City, Required: false )
&amp;nbsp;&amp;nbsp;&amp;nbsp; Postcode (Type: esriFieldTypeString, Alias: Postcode, Required: false )
&amp;nbsp;&amp;nbsp;&amp;nbsp; Country (Type: esriFieldTypeString, Alias: Country, Required: true )
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For some reason the Country field is set to Required:true (there are no required fields in TA_Address_NA). The problem here is that there is no Country data available. locationToAddress only returns Address, City and Postcode data. Country is always null.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This means that retrieving an address and using addressToLocations to retrieve missing field data doesn't work because the country field is set to required. You have to manually set the country property to finally be able to access fields you define in outfields.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Finally I register an account to post a thread about this and I notice another irregularity. There are two URLs to register esri global accounts:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://webaccounts.esri.com/cas/index.cfm/index.cfm" rel="nofollow noopener noreferrer" target="_blank"&gt;https://webaccounts.esri.com/cas/index.cfm/index.cfm&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;and&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="https://www.arcgis.com/home/createaccount.html" rel="nofollow noopener noreferrer" target="_blank"&gt;https://www.arcgis.com/home/createaccount.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Notice that there are different policies for the format of username. (Also more required fields on the first link)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;... please pay more attention to detail :rolleyes:&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 23:46:45 GMT</pubDate>
    <dc:creator>FlorianPölz</dc:creator>
    <dc:date>2021-12-11T23:46:45Z</dc:date>
    <item>
      <title>Missing parameter and other issues</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/missing-parameter-and-other-issues/m-p/549541#M51185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This concerns the esri.tasks.Locator class of the javascript API.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
locationToAddress(location, distance, callback?, errback?)
addressToLocations(address, outFields?, callback?, errback?)
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Both methods return the type AddressCandidate. LocationToAddress returns one AddressCandidate and addressToLocations returns an array of AddressCandidate.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the locationToAddress method the optional outFields parameter is &lt;/SPAN&gt;&lt;STRONG&gt;missing&lt;/STRONG&gt;&lt;SPAN&gt;. There is no reason why the programmer shouldn't be able to specify which fields he wants in the AddressCandidate object returned by locationToAddress.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As it is right now in order to retrieve additional field data one has to use the address provided by locationToAddress to call addressToLocations where outfields can be set.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When applying this to &lt;/SPAN&gt;&lt;A href="http://tasks.arcgisonline.com/ArcGIS/rest/services/Locators/TA_Address_EU/GeocodeServer" rel="nofollow noopener noreferrer" target="_blank"&gt;http://tasks.arcgisonline.com/ArcGIS/rest/services/Locators/TA_Address_EU/GeocodeServer&lt;/A&gt;&lt;SPAN&gt; another issue arises:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is the definition for the Address Fields:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
Address Fields:

&amp;nbsp;&amp;nbsp;&amp;nbsp; Address (Type: esriFieldTypeString, Alias: Address, Required: false )
&amp;nbsp;&amp;nbsp;&amp;nbsp; City (Type: esriFieldTypeString, Alias: City, Required: false )
&amp;nbsp;&amp;nbsp;&amp;nbsp; Postcode (Type: esriFieldTypeString, Alias: Postcode, Required: false )
&amp;nbsp;&amp;nbsp;&amp;nbsp; Country (Type: esriFieldTypeString, Alias: Country, Required: true )
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For some reason the Country field is set to Required:true (there are no required fields in TA_Address_NA). The problem here is that there is no Country data available. locationToAddress only returns Address, City and Postcode data. Country is always null.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This means that retrieving an address and using addressToLocations to retrieve missing field data doesn't work because the country field is set to required. You have to manually set the country property to finally be able to access fields you define in outfields.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Finally I register an account to post a thread about this and I notice another irregularity. There are two URLs to register esri global accounts:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://webaccounts.esri.com/cas/index.cfm/index.cfm" rel="nofollow noopener noreferrer" target="_blank"&gt;https://webaccounts.esri.com/cas/index.cfm/index.cfm&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;and&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="https://www.arcgis.com/home/createaccount.html" rel="nofollow noopener noreferrer" target="_blank"&gt;https://www.arcgis.com/home/createaccount.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Notice that there are different policies for the format of username. (Also more required fields on the first link)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;... please pay more attention to detail :rolleyes:&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 23:46:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/missing-parameter-and-other-issues/m-p/549541#M51185</guid>
      <dc:creator>FlorianPölz</dc:creator>
      <dc:date>2021-12-11T23:46:45Z</dc:date>
    </item>
  </channel>
</rss>

