<?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: dynamically set mapview.center in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/dynamically-set-mapview-center/m-p/426360#M39198</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Robert,&lt;/P&gt;&lt;P&gt;about the spatial reference and sharing some code:&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/490168_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;This is where I initially set up the map and thereafter the periodical GETrequest and goTo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Koen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 28 Apr 2020 14:09:53 GMT</pubDate>
    <dc:creator>KoenGallet</dc:creator>
    <dc:date>2020-04-28T14:09:53Z</dc:date>
    <item>
      <title>dynamically set mapview.center</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/dynamically-set-mapview-center/m-p/426356#M39194</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;trying to get mapview centered around a&amp;nbsp;changing set of coordinates, in other words the mapview moves and the (changing) coordinate pair stays centered.&lt;/P&gt;&lt;P&gt;I start by building the map and center it around an initial coordinate pair. Immediately after that I launch a periodical GET request (intervals of 200ms) to a server who responds with updated coordinate pairs, which I then assign to mapview.center . When I console.log(view.center) I can see the values in the center object changing over time. So far , everything seems to be working as intended. But the mapview does not change. It stays centered around the initial pair of coordinates and , curious thing, when I manually drag the mapview to another location, one that movement is finished, the mapview jumps back to the initial coordinates. can someone point out to me what I am misunderstanding about how to approach this?&lt;/P&gt;&lt;P&gt;Thank you very much&lt;/P&gt;&lt;P&gt;Koen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2020 12:22:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/dynamically-set-mapview-center/m-p/426356#M39194</guid>
      <dc:creator>KoenGallet</dc:creator>
      <dc:date>2020-04-28T12:22:47Z</dc:date>
    </item>
    <item>
      <title>Re: dynamically set mapview.center</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/dynamically-set-mapview-center/m-p/426357#M39195</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Koen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;The best approach is to use the &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#goTo"&gt;view.goTo&lt;/A&gt; method.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2020 12:48:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/dynamically-set-mapview-center/m-p/426357#M39195</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2020-04-28T12:48:51Z</dc:date>
    </item>
    <item>
      <title>Re: dynamically set mapview.center</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/dynamically-set-mapview-center/m-p/426358#M39196</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robert, thank you for your swift reply. I had tried&amp;nbsp;goTo. Have now tried it again. Didn't work. In the browser console every variable I send out reflects the changes, but the mapview stays where it is...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2020 13:40:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/dynamically-set-mapview-center/m-p/426358#M39196</guid>
      <dc:creator>KoenGallet</dc:creator>
      <dc:date>2020-04-28T13:40:30Z</dc:date>
    </item>
    <item>
      <title>Re: dynamically set mapview.center</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/dynamically-set-mapview-center/m-p/426359#M39197</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Koen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;Sounds like you may be trying to set the map to coordinates that are not the same as the views spatial Reference then. Can you share some code?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2020 13:52:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/dynamically-set-mapview-center/m-p/426359#M39197</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2020-04-28T13:52:36Z</dc:date>
    </item>
    <item>
      <title>Re: dynamically set mapview.center</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/dynamically-set-mapview-center/m-p/426360#M39198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Robert,&lt;/P&gt;&lt;P&gt;about the spatial reference and sharing some code:&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/490168_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;This is where I initially set up the map and thereafter the periodical GETrequest and goTo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Koen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2020 14:09:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/dynamically-set-mapview-center/m-p/426360#M39198</guid>
      <dc:creator>KoenGallet</dc:creator>
      <dc:date>2020-04-28T14:09:53Z</dc:date>
    </item>
    <item>
      <title>Re: dynamically set mapview.center</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/dynamically-set-mapview-center/m-p/426361#M39199</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Koen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;If you are still having issues then the better approach to this is to create an actual Point class with a specified spatial reference to give to the view.goTo target or center property.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; centerPnt &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;Point&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;newcoords&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;SpatialReference&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt; wkid&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;4326&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;
view&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;goTo&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;center&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; centerPnt&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;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 19:11:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/dynamically-set-mapview-center/m-p/426361#M39199</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-11T19:11:54Z</dc:date>
    </item>
  </channel>
</rss>

