<?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: Geocoding with local geocoder: map does not zoom to results in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geocoding-with-local-geocoder-map-does-not-zoom-to/m-p/197850#M18353</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;our own geocoding service uses a "find" operation which returns both the geometry of each candidate and an individual extent which i assume is what the geocoder widget uses to determine how far to zoom in.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;example from geocode.arcgis.com:&lt;/SPAN&gt;&lt;PRE class="plain" name="code"&gt;{ &amp;nbsp;&amp;nbsp;&amp;nbsp; "name" : "1233 SE Main St, Portland, OR, 97214", &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "extent" : { &amp;nbsp; "xmin" : -13653815.11016134, &amp;nbsp; "ymin" : 5702594.5923811821, &amp;nbsp; "xmax" : -13653592.471179754, &amp;nbsp; "ymax" : 5702912.3125919709&amp;nbsp; },&amp;nbsp; "feature" : { &amp;nbsp; "geometry" : { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "x" : -13653703.684547694, &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "y" : 5702753.3918946823 &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;&amp;nbsp;&amp;nbsp;&amp;nbsp; "attributes" : { &amp;nbsp;&amp;nbsp; "Score" : 100, &amp;nbsp;&amp;nbsp; "Addr_Type" : "StreetAddress" &amp;nbsp; }&amp;nbsp; } }&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;i found that a call to a custom locator leverages the 'findAddressCandidates' operation, which usually only returns geometry:&lt;/SPAN&gt;&lt;PRE class="plain" name="code"&gt;{&amp;nbsp; "address" : "1233 SE MAIN ST, Portland, 97214",&amp;nbsp; "location" : { &amp;nbsp; "x" : -13653654.8506, &amp;nbsp; "y" : 5702774.4558999985&amp;nbsp; },&amp;nbsp; "score" : 100,&amp;nbsp; "attributes" : {}&amp;nbsp; }&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;you could figure out how to get your own geocoding service to return extents, but it would probably be a lot easier to set the zoom level to something static (and appropriate) when a geocoder event like 'onSelect' is triggered. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;PRE class="plain" name="code"&gt;dojo.connect(Geocoder, 'onSelect', function(results){&amp;nbsp; map.setLevel(12);&amp;nbsp; });&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 Mar 2013 16:50:06 GMT</pubDate>
    <dc:creator>JohnGravois</dc:creator>
    <dc:date>2013-03-14T16:50:06Z</dc:date>
    <item>
      <title>Geocoding with local geocoder: map does not zoom to results</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geocoding-with-local-geocoder-map-does-not-zoom-to/m-p/197848#M18351</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I???m attempting to reconfigure a geocoding application based on the Javascript API sample here:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A class="jive-link-external-small" href="http://help.arcgis.com/en/webapi/javascript/arcgis/jstutorials/#tutorial_geocoder" rel="nofollow" target="_blank"&gt;http://help.arcgis.com/en/webapi/javascript/arcgis/jstutorials/#tutorial_geocoder&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The only changes that I've made to the original code are 1) referencing my own webmap, and 2) reference a local geocoder service. The application can be viewed here:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A class="jive-link-external-small" href="https://dl.dropbox.com/u/1208356/geocode_coastalBoundary_v3.html" rel="nofollow" target="_blank"&gt;https://dl.dropbox.com/u/1208356/geocode_coastalBoundary_v3.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The application works as expected except instead of zooming to the location searched for or selected from the dropdown list,&amp;nbsp; it places the point and recenters the map (extent stays the same). I need to determine how to zoom to the results returned by my own geocoding service. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The code doesn't have any functions that explicitly take the geometry from the geocoding results and reset the map extent based on these, so i'm assuming this is something built into the geocoding digit.&amp;nbsp; I explored the JSON returned from Esri's geocoding service and compared it to what was returned from my own ArcGIS Server, and see there are many differences in the elements returned (e.g., own instance of ArcGIS Server returns 'location' containing x/y coordinates; whereas Esri's geocoding service includes the x/y coordinates in the 'geometry', and also returns the extent (strange, for a point feature..)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;JSON from ArcGIS Server:&amp;nbsp; spatialReference wkid : 102100 [number] candidates 0 address : 97301 [string] location x : -13692817.9706 [number] y : 5613666.2399 [number] score : 100 [number] attributes&amp;nbsp;&amp;nbsp; JSON from Esri's Geocode service:&amp;nbsp; spatialReference wkid : 102100 [number] latestWkid : 3857 [number] locations 0 name : 97330, Corvallis, OR [string] extent xmin : -13728247.885804845 [number] ymin : 5549357.770796694 [number] xmax : -13717115.936725518 [number] ymax : 5564989.215078552 [number] feature geometry x : -13722681.804322762 [number] y : 5557170.2004600745 [number] attributes Score : 100 [number] Addr_Type : Postal [string] 1&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anyone have any thoughts on how to best make this work, i.e., enable zoom-to-address using on-premise ArcGIS Server Geocoding service?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Erik Endrulat&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Mar 2013 17:36:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geocoding-with-local-geocoder-map-does-not-zoom-to/m-p/197848#M18351</guid>
      <dc:creator>ErikEndrulat</dc:creator>
      <dc:date>2013-03-07T17:36:34Z</dc:date>
    </item>
    <item>
      <title>Re: Geocoding with local geocoder: map does not zoom to results</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geocoding-with-local-geocoder-map-does-not-zoom-to/m-p/197849#M18352</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Erik, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;did you get anywhere with this ? I have exactly the same problem &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards, Bill&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Mar 2013 16:20:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geocoding-with-local-geocoder-map-does-not-zoom-to/m-p/197849#M18352</guid>
      <dc:creator>BillHoney</dc:creator>
      <dc:date>2013-03-14T16:20:55Z</dc:date>
    </item>
    <item>
      <title>Re: Geocoding with local geocoder: map does not zoom to results</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geocoding-with-local-geocoder-map-does-not-zoom-to/m-p/197850#M18353</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;our own geocoding service uses a "find" operation which returns both the geometry of each candidate and an individual extent which i assume is what the geocoder widget uses to determine how far to zoom in.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;example from geocode.arcgis.com:&lt;/SPAN&gt;&lt;PRE class="plain" name="code"&gt;{ &amp;nbsp;&amp;nbsp;&amp;nbsp; "name" : "1233 SE Main St, Portland, OR, 97214", &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "extent" : { &amp;nbsp; "xmin" : -13653815.11016134, &amp;nbsp; "ymin" : 5702594.5923811821, &amp;nbsp; "xmax" : -13653592.471179754, &amp;nbsp; "ymax" : 5702912.3125919709&amp;nbsp; },&amp;nbsp; "feature" : { &amp;nbsp; "geometry" : { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "x" : -13653703.684547694, &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "y" : 5702753.3918946823 &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;&amp;nbsp;&amp;nbsp;&amp;nbsp; "attributes" : { &amp;nbsp;&amp;nbsp; "Score" : 100, &amp;nbsp;&amp;nbsp; "Addr_Type" : "StreetAddress" &amp;nbsp; }&amp;nbsp; } }&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;i found that a call to a custom locator leverages the 'findAddressCandidates' operation, which usually only returns geometry:&lt;/SPAN&gt;&lt;PRE class="plain" name="code"&gt;{&amp;nbsp; "address" : "1233 SE MAIN ST, Portland, 97214",&amp;nbsp; "location" : { &amp;nbsp; "x" : -13653654.8506, &amp;nbsp; "y" : 5702774.4558999985&amp;nbsp; },&amp;nbsp; "score" : 100,&amp;nbsp; "attributes" : {}&amp;nbsp; }&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;you could figure out how to get your own geocoding service to return extents, but it would probably be a lot easier to set the zoom level to something static (and appropriate) when a geocoder event like 'onSelect' is triggered. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;PRE class="plain" name="code"&gt;dojo.connect(Geocoder, 'onSelect', function(results){&amp;nbsp; map.setLevel(12);&amp;nbsp; });&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Mar 2013 16:50:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geocoding-with-local-geocoder-map-does-not-zoom-to/m-p/197850#M18353</guid>
      <dc:creator>JohnGravois</dc:creator>
      <dc:date>2013-03-14T16:50:06Z</dc:date>
    </item>
    <item>
      <title>Re: Geocoding with local geocoder: map does not zoom to results</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geocoding-with-local-geocoder-map-does-not-zoom-to/m-p/197851#M18354</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks, John - That's exactly what I ended up doing. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I was hoping that when we migrated to 10.1 there was an option for the geocoding services to return an extent, but it appears that's not the case.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Erik&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Mar 2013 17:22:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geocoding-with-local-geocoder-map-does-not-zoom-to/m-p/197851#M18354</guid>
      <dc:creator>ErikEndrulat</dc:creator>
      <dc:date>2013-03-14T17:22:06Z</dc:date>
    </item>
  </channel>
</rss>

