<?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: Why a Custom Geocoding Service Fails in ArcGIS JavaScript API Page in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/why-a-custom-geocoding-service-fails-in-arcgis/m-p/591450#M55272</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think this is on the right track, but I have a question.&amp;nbsp; Address parts are separated by spaces when written out.&amp;nbsp; The space character is encoded as %20 and the plus character is encoded as %2B, but I know that plus can replace space (though I'm not sure why).&amp;nbsp; So, in a way, I accept any URL's with pluses because I interpret them as spaces, but I don't think I want to accept %2B's, since those become literal pluses, which addresses shouldn't have.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since the parameter to the meter search map already looks like this (addr=575+E+Heather+Road), can I pass that literally to my geocoder?&amp;nbsp; Or maybe I could decode and recode the URL?&amp;nbsp; How would I do that in JavaScript?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 Jan 2020 20:39:09 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2020-01-02T20:39:09Z</dc:date>
    <item>
      <title>Why a Custom Geocoding Service Fails in ArcGIS JavaScript API Page</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/why-a-custom-geocoding-service-fails-in-arcgis/m-p/591448#M55270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm more of a desktop GIS developer, and I need some web GIS programming help.&amp;nbsp; The following URLs are public.&amp;nbsp; The JavaScript isn't obfuscated, so you should be able to see and read the source in developer mode within your browser.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First, check out &lt;A href="https://maps.orem.org/MeterSearch.htm"&gt;https://maps.orem.org/MeterSearch.htm&lt;/A&gt;&amp;nbsp;.&amp;nbsp; This web page can take two parameters in the URL.&amp;nbsp; You can append "?id=1234" to have the map zoom to a particular water meter ID, like 1234.&amp;nbsp; You&amp;nbsp;&lt;EM&gt;should&amp;nbsp;&lt;/EM&gt;be able to also append an address with an addr query parameter.&amp;nbsp; The idea is that, if the meter can't be found by ID, then at least the address should be geocoded and the map should zoom in just like when the water meter ID&amp;nbsp;&lt;EM&gt;is&lt;/EM&gt; found.&amp;nbsp; So, if a negative meter ID is used above, and the house address is off by 2, the URL would look like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://maps.orem.org/MeterSearch.htm?id=-1234&amp;amp;addr=575+E+Heather+Road"&gt;https://maps.orem.org/MeterSearch.htm?id=-1234&amp;amp;addr=575+E+Heather+Road&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It &lt;EM&gt;should&lt;/EM&gt; zoom to Heather Road, but it doesn't work.&amp;nbsp; Just so you know, the underlying geocoder is a custom one that I built which queries the geodatabase directly.&amp;nbsp; It uses a metaphone algorithm, linear algebra, dynamic segmentation, QGrams, and Utah house/street number switching to find the correct point.&amp;nbsp; A sample REST request for the address above would look like this, using an offset of 100 feet:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://maps.orem.org/Geocoding/OremGeocoder.dll/rest/GeocodedAddress/?addr=98+N+State+Street&amp;amp;Offset=100"&gt;https://maps.orem.org/Geocoding/OremGeocoder.dll/rest/GeocodedAddress/?addr=98+N+State+Street&amp;amp;Offset=100&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The response is:&amp;nbsp;&lt;SPAN style="color: #000000;"&gt;{"x":1945693.56472451,"y":716049.690701424,"spatialReference":{"wkid":32043}}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The hyperlink to the meter map which includes the sample address should zoom to the suburbs.&amp;nbsp; The error I see in JavaScript is this:&lt;/P&gt;&lt;PRE&gt;dojo.js:354 [esri.core.accessorSupport.write] web-document-write:property-required Missing value for required property 'x' on 'esri.geometry.Point'&lt;/PRE&gt;&lt;P&gt;Clearly, x is in the REST response from the geocoder, so I'm lost.&amp;nbsp; Please help me fix this, ESRI Community! &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"Roj"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 Dec 2019 00:53:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/why-a-custom-geocoding-service-fails-in-arcgis/m-p/591448#M55270</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2019-12-28T00:53:51Z</dc:date>
    </item>
    <item>
      <title>Re: Why a Custom Geocoding Service Fails in ArcGIS JavaScript API Page</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/why-a-custom-geocoding-service-fails-in-arcgis/m-p/591449#M55271</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Roj,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;The issue is that your custom geocoding service is not handling an encoded url.&lt;/P&gt;&lt;P&gt;This fails:&lt;/P&gt;&lt;P&gt;&lt;A href="https://maps.orem.org/Geocoding/OremGeocoder.dll/rest/GeocodedAddress/?addr=575%2BE%2BHeather%2BRoad&amp;amp;offset=55.5"&gt;https://maps.orem.org/Geocoding/OremGeocoder.dll/rest/GeocodedAddress/?addr=575%2BE%2BHeather%2BRoad&amp;amp;offset=55.5&lt;/A&gt;&lt;/P&gt;&lt;P&gt;But this works:&lt;/P&gt;&lt;P&gt;&lt;A href="https://maps.orem.org/Geocoding/OremGeocoder.dll/rest/GeocodedAddress/?addr=575+E+Heather+Road&amp;amp;offset=55.5"&gt;https://maps.orem.org/Geocoding/OremGeocoder.dll/rest/GeocodedAddress/?addr=575+E+Heather+Road&amp;amp;offset=55.5&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You need to decode the url in your dll before you try and resolve it in the geocoding.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Dec 2019 13:48:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/why-a-custom-geocoding-service-fails-in-arcgis/m-p/591449#M55271</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2019-12-30T13:48:46Z</dc:date>
    </item>
    <item>
      <title>Re: Why a Custom Geocoding Service Fails in ArcGIS JavaScript API Page</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/why-a-custom-geocoding-service-fails-in-arcgis/m-p/591450#M55272</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think this is on the right track, but I have a question.&amp;nbsp; Address parts are separated by spaces when written out.&amp;nbsp; The space character is encoded as %20 and the plus character is encoded as %2B, but I know that plus can replace space (though I'm not sure why).&amp;nbsp; So, in a way, I accept any URL's with pluses because I interpret them as spaces, but I don't think I want to accept %2B's, since those become literal pluses, which addresses shouldn't have.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since the parameter to the meter search map already looks like this (addr=575+E+Heather+Road), can I pass that literally to my geocoder?&amp;nbsp; Or maybe I could decode and recode the URL?&amp;nbsp; How would I do that in JavaScript?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jan 2020 20:39:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/why-a-custom-geocoding-service-fails-in-arcgis/m-p/591450#M55272</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2020-01-02T20:39:09Z</dc:date>
    </item>
    <item>
      <title>Re: Why a Custom Geocoding Service Fails in ArcGIS JavaScript API Page</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/why-a-custom-geocoding-service-fails-in-arcgis/m-p/591451#M55273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Roger,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; The esriRequest will url encode the request so your + will always get a %2B where it was a +. What you need to do is in your service code you need to url decode the parameters before attempting to do your query (not in JS, you need to do this on the service end).&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jan 2020 20:45:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/why-a-custom-geocoding-service-fails-in-arcgis/m-p/591451#M55273</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2020-01-02T20:45:47Z</dc:date>
    </item>
    <item>
      <title>Re: Why a Custom Geocoding Service Fails in ArcGIS JavaScript API Page</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/why-a-custom-geocoding-service-fails-in-arcgis/m-p/591452#M55274</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I changed my DLL to replace pluses with spaces and it now works!&amp;nbsp; Thank you.&amp;nbsp; I'll mark your reply as an answer.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jan 2020 21:45:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/why-a-custom-geocoding-service-fails-in-arcgis/m-p/591452#M55274</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2020-01-02T21:45:59Z</dc:date>
    </item>
  </channel>
</rss>

