<?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: Not zoomig  to geocoded address first time in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/not-zoomig-to-geocoded-address-first-time/m-p/1316522#M81885</link>
    <description>&lt;P&gt;Without knowing the details of the workflow, it's impossible for me to say.&amp;nbsp; What is plainly evident, though, is that your custom workflow is using the client-side projection engine, whether explicitly or behind the scenes.&amp;nbsp; Perhaps it is because the service is returning results in a different coordinate system than the map, thus making projection necessary.&lt;/P&gt;&lt;P&gt;Whatever the case, it has a problem with the first search because it hasn't loaded yet.&amp;nbsp; It seems to be that by the time the second search is attempted, the projection module has fully loaded, and therefore works after that.&amp;nbsp; The solution is for you to load it yourself prior to any searching taking place.&amp;nbsp; Perhaps the best way to do that would be to load it before instantiating your Map control, when your application is starting up:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;require(["esri/map", "esri/geometry/projection", "other/modules"], function(Map, projectionEngine, otherModules) {
	projectionEngine.load().then(function() {
		var map = new Map({
			//etc
		});
	});
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 08 Aug 2023 16:57:57 GMT</pubDate>
    <dc:creator>JoelBennett</dc:creator>
    <dc:date>2023-08-08T16:57:57Z</dc:date>
    <item>
      <title>Not zoomig  to geocoded address first time</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/not-zoomig-to-geocoded-address-first-time/m-p/1315792#M81868</link>
      <description>&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;&amp;nbsp; I am using geocode services to geocode and zoom to the address. When I use world geocoding it works fine but when I use my custom geocoding it geocodes well but doesnt zoom to the first time. from second geocode it works as expected. I get the below error fist time.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ADITYAKUMAR1_0-1691214249329.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/77388i77F10EA19AEEBED0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ADITYAKUMAR1_0-1691214249329.png" alt="ADITYAKUMAR1_0-1691214249329.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I am not sure if its a problem with custom geocode or any other issue is there. Has anyone faced similar issue?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;BR /&gt;Aditya Kumar&lt;/P&gt;</description>
      <pubDate>Sat, 05 Aug 2023 05:47:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/not-zoomig-to-geocoded-address-first-time/m-p/1315792#M81868</guid>
      <dc:creator>ADITYAKUMAR1</dc:creator>
      <dc:date>2023-08-05T05:47:15Z</dc:date>
    </item>
    <item>
      <title>Re: Not zoomig  to geocoded address first time</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/not-zoomig-to-geocoded-address-first-time/m-p/1316132#M81874</link>
      <description>&lt;P&gt;This error indicates the &lt;A href="https://developers.arcgis.com/javascript/3/jsapi/esri.geometry.projection-amd.html" target="_self"&gt;client-side projection engine&lt;/A&gt; is being used before it's fully loaded.&amp;nbsp; Unlike other modules which you can immediately use after bringing them in via require, define, or declare, the projection engine must be explicitly loaded as well.&amp;nbsp; Loading this module is asynchronous, so is not immediately available upon calling &lt;A href="https://developers.arcgis.com/javascript/3/jsapi/esri.geometry.projection-amd.html#load" target="_self"&gt;load&lt;/A&gt;.&amp;nbsp; You must wait until the promise returned by the load function resolves before it can be used.&lt;/P&gt;&lt;P&gt;At a minimum, you would need something like this:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;require(["esri/geometry/projection"], function(projectionEngine) {
	projectionEngine.load().then(function() {
		//do geocoding logic
	});
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, it would probably be better to move the importing and loading of this module into your application startup code.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Aug 2023 17:58:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/not-zoomig-to-geocoded-address-first-time/m-p/1316132#M81874</guid>
      <dc:creator>JoelBennett</dc:creator>
      <dc:date>2023-08-07T17:58:33Z</dc:date>
    </item>
    <item>
      <title>Re: Not zoomig  to geocoded address first time</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/not-zoomig-to-geocoded-address-first-time/m-p/1316296#M81878</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/6522"&gt;@JoelBennett&lt;/a&gt;&amp;nbsp;Thnaks for the response. But I am confused why this happens only with custom geocoding services and not with World geocoding services. And the projection Engine has problem just at&amp;nbsp; the first search.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Aug 2023 08:13:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/not-zoomig-to-geocoded-address-first-time/m-p/1316296#M81878</guid>
      <dc:creator>ADITYAKUMAR1</dc:creator>
      <dc:date>2023-08-08T08:13:34Z</dc:date>
    </item>
    <item>
      <title>Re: Not zoomig  to geocoded address first time</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/not-zoomig-to-geocoded-address-first-time/m-p/1316522#M81885</link>
      <description>&lt;P&gt;Without knowing the details of the workflow, it's impossible for me to say.&amp;nbsp; What is plainly evident, though, is that your custom workflow is using the client-side projection engine, whether explicitly or behind the scenes.&amp;nbsp; Perhaps it is because the service is returning results in a different coordinate system than the map, thus making projection necessary.&lt;/P&gt;&lt;P&gt;Whatever the case, it has a problem with the first search because it hasn't loaded yet.&amp;nbsp; It seems to be that by the time the second search is attempted, the projection module has fully loaded, and therefore works after that.&amp;nbsp; The solution is for you to load it yourself prior to any searching taking place.&amp;nbsp; Perhaps the best way to do that would be to load it before instantiating your Map control, when your application is starting up:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;require(["esri/map", "esri/geometry/projection", "other/modules"], function(Map, projectionEngine, otherModules) {
	projectionEngine.load().then(function() {
		var map = new Map({
			//etc
		});
	});
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Aug 2023 16:57:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/not-zoomig-to-geocoded-address-first-time/m-p/1316522#M81885</guid>
      <dc:creator>JoelBennett</dc:creator>
      <dc:date>2023-08-08T16:57:57Z</dc:date>
    </item>
    <item>
      <title>Re: Not zoomig  to geocoded address first time</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/not-zoomig-to-geocoded-address-first-time/m-p/1317275#M81936</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/6522"&gt;@JoelBennett&lt;/a&gt;&amp;nbsp;I managed to resolve it from the server side. Earlier i was using the data from the sql server but now i created a geodatabase. Imported the layer inside it. Created a locator and assigned Auto into the performance tab under properties section. Published it and its working as expected.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 10 Aug 2023 07:27:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/not-zoomig-to-geocoded-address-first-time/m-p/1317275#M81936</guid>
      <dc:creator>ADITYAKUMAR1</dc:creator>
      <dc:date>2023-08-10T07:27:48Z</dc:date>
    </item>
  </channel>
</rss>

