<?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: map.centerAndZoom deferred in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-centerandzoom-deferred/m-p/52999#M4682</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Robert, I tried to add a flash point marker graphic&amp;nbsp;in both ways when &lt;SPAN style="font-family: Consolas; font-size: small;"&gt;!&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;this&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;.map.extent.contains(zoomExtent):&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;this&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;.map.centerAt(zoomExtent).then(DoFlash());&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;new&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt; Promise(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;function&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;(resolve, reject) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;this&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;.map.centerAt(zoomExtent);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;}).then(DoFlash());&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I got error message 'Uncaught lang.hitch: scope["setStroke"] is null (scope="[object Window]")'.&amp;nbsp; But no problem DoFlash() if the map doesn't need to be re-centered.&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help, thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 06 Dec 2018 23:28:38 GMT</pubDate>
    <dc:creator>TONGSUN</dc:creator>
    <dc:date>2018-12-06T23:28:38Z</dc:date>
    <item>
      <title>map.centerAndZoom deferred</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-centerandzoom-deferred/m-p/52994#M4677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good afternoon everybody,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my webapp I use the map centerAndZoom method &lt;A href="https://developers.arcgis.com/javascript/jsapi/map-amd.html#centerandzoom" title="https://developers.arcgis.com/javascript/jsapi/map-amd.html#centerandzoom"&gt;Map | API Reference | ArcGIS API for JavaScript&lt;/A&gt;&amp;nbsp; which will return a deferred.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I haven't worked with deferred before and was wondering how I can continue with my code once the centerAndZoom has finished.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would it look something like this or can somebody (probably Robert) give me an example?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;map.centerAndZoom(allPoints[0].geometry,8).then(function(){&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //continuation of the code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jan 2016 18:13:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-centerandzoom-deferred/m-p/52994#M4677</guid>
      <dc:creator>TimWitt2</dc:creator>
      <dc:date>2016-01-28T18:13:47Z</dc:date>
    </item>
    <item>
      <title>Re: map.centerAndZoom deferred</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-centerandzoom-deferred/m-p/52995#M4678</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tim,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; That is it exactly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jan 2016 18:29:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-centerandzoom-deferred/m-p/52995#M4678</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2016-01-28T18:29:17Z</dc:date>
    </item>
    <item>
      <title>Re: map.centerAndZoom deferred</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-centerandzoom-deferred/m-p/52996#M4679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeah, centerAndZoom returns a Promise, which comes from the Deferred. This means you can use the "then()" method as your sample shows to continue your code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jan 2016 18:29:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-centerandzoom-deferred/m-p/52996#M4679</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2016-01-28T18:29:33Z</dc:date>
    </item>
    <item>
      <title>Re: map.centerAndZoom deferred</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-centerandzoom-deferred/m-p/52997#M4680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, since I've never dealt with deferred, I figured I ask to make sure I understand it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jan 2016 18:33:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-centerandzoom-deferred/m-p/52997#M4680</guid>
      <dc:creator>TimWitt2</dc:creator>
      <dc:date>2016-01-28T18:33:10Z</dc:date>
    </item>
    <item>
      <title>Re: map.centerAndZoom deferred</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-centerandzoom-deferred/m-p/52998#M4681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, I tried to add a flash point marker graphic&amp;nbsp;in both ways when &lt;SPAN style="font-family: Consolas; font-size: small;"&gt;!&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;this&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;.map.extent.contains(zoomExtent):&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;this&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;.map.centerAt(zoomExtent).then(DoFlash());&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;new&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt; Promise(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;function&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;(resolve, reject) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small; font-family: Consolas;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: small; font-family: Consolas;"&gt;this&lt;/SPAN&gt;&lt;SPAN style="font-size: small; font-family: Consolas;"&gt;.map.centerAt(zoomExtent);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;}).then(DoFlash());&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I got error message 'Uncaught lang.hitch: scope["setStroke"] is null (scope="[object Window]")'.&amp;nbsp; But no problem DoFlash() if the map doesn't need to be re-centered.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Dec 2018 23:21:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-centerandzoom-deferred/m-p/52998#M4681</guid>
      <dc:creator>TONGSUN</dc:creator>
      <dc:date>2018-12-06T23:21:40Z</dc:date>
    </item>
    <item>
      <title>Re: map.centerAndZoom deferred</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-centerandzoom-deferred/m-p/52999#M4682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Robert, I tried to add a flash point marker graphic&amp;nbsp;in both ways when &lt;SPAN style="font-family: Consolas; font-size: small;"&gt;!&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;this&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;.map.extent.contains(zoomExtent):&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;this&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;.map.centerAt(zoomExtent).then(DoFlash());&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;new&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt; Promise(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;function&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;(resolve, reject) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;this&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;.map.centerAt(zoomExtent);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;}).then(DoFlash());&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I got error message 'Uncaught lang.hitch: scope["setStroke"] is null (scope="[object Window]")'.&amp;nbsp; But no problem DoFlash() if the map doesn't need to be re-centered.&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help, thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Dec 2018 23:28:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-centerandzoom-deferred/m-p/52999#M4682</guid>
      <dc:creator>TONGSUN</dc:creator>
      <dc:date>2018-12-06T23:28:38Z</dc:date>
    </item>
    <item>
      <title>Re: map.centerAndZoom deferred</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-centerandzoom-deferred/m-p/53000#M4683</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tong,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;Because you have this.map I have to assume that your issue is a scope issue and your code should look like:&lt;/P&gt;&lt;PRE class="language-javascript line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;map&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;centerAt&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;zoomExtent&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;then&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;lang&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;hitch&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; DoFlash&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Dec 2018 02:57:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-centerandzoom-deferred/m-p/53000#M4683</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2018-12-07T02:57:13Z</dc:date>
    </item>
    <item>
      <title>Re: map.centerAndZoom deferred</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-centerandzoom-deferred/m-p/53001#M4684</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Robert,&lt;/P&gt;&lt;P&gt;Thanks for your advice.&amp;nbsp; I tried your suggestion of "&lt;SPAN&gt;this&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;map&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;centerAt&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;zoomExtent&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;then&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;lang&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;hitch&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;this&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt; &lt;SPAN&gt;DoFlash&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;SPAN&gt;;"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Then I tried "map&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;centerAt&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;zoomExtent&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;then&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;lang&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;hitch&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;this&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt; &lt;SPAN&gt;DoFlash&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;SPAN&gt;;"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;I still got the same error message.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Basically, I need to make sure DoFlash() happens after the map is re-centered.&amp;nbsp; But when I put "alert" at the beginning of DoFlash(), the map exent has not changed yet.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Dec 2018 19:45:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-centerandzoom-deferred/m-p/53001#M4684</guid>
      <dc:creator>TONGSUN</dc:creator>
      <dc:date>2018-12-10T19:45:10Z</dc:date>
    </item>
    <item>
      <title>Re: map.centerAndZoom deferred</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-centerandzoom-deferred/m-p/53002#M4685</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tong,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;I updated my code suggestion.&lt;/P&gt;&lt;P&gt;When you have&amp;nbsp;&lt;/P&gt;&lt;PRE class="language-javascript line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;map&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;centerAt&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;zoomExtent&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;then&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;lang&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;hitch&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;DoFlash&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;the DoFlash() means call the function immediately when the code is parsed.&lt;/P&gt;&lt;P&gt;You need:&lt;/P&gt;&lt;PRE class="language-javascript line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;map&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;centerAt&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;zoomExtent&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;then&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;lang&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;hitch&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; DoFlash&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Dec 2018 20:14:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-centerandzoom-deferred/m-p/53002#M4685</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2018-12-10T20:14:28Z</dc:date>
    </item>
    <item>
      <title>Re: map.centerAndZoom deferred</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-centerandzoom-deferred/m-p/53003#M4686</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you so much!&amp;nbsp; It works now.&lt;/P&gt;&lt;P&gt;I would probably try bunch of other things before even thinking about there is difference between these two.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Dec 2018 20:29:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-centerandzoom-deferred/m-p/53003#M4686</guid>
      <dc:creator>TONGSUN</dc:creator>
      <dc:date>2018-12-10T20:29:36Z</dc:date>
    </item>
  </channel>
</rss>

