<?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: How to handle refresh in dynamic map in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-handle-refresh-in-dynamic-map/m-p/222150#M20617</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well no, I'm going to try 0.01.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Jul 2017 16:33:38 GMT</pubDate>
    <dc:creator>EvelynHernandez</dc:creator>
    <dc:date>2017-07-26T16:33:38Z</dc:date>
    <item>
      <title>How to handle refresh in dynamic map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-handle-refresh-in-dynamic-map/m-p/222146#M20613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question is the following.&lt;/P&gt;&lt;P&gt;We have a service that we populated with GPS cars data and we made an app to show how the cars are moving on the map.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/364393_pastedImage_2.png" style="width: auto; height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We noticed that the data is refreshing too slow, and we actually want to see the cars movement on the map.&lt;/P&gt;&lt;P&gt;I setted up the service as dynamic layer, and in the API there is a property called refreshInterval where the minimun interval is 1 minute and 0 if u want to stop autorefresh.&lt;/P&gt;&lt;P&gt;Actually i didnt set up the property yet, so i dont know what is the default interval for the map.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The table where we get the data is updated in less than a minute. So we realized the refresh is still very slow.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which is the best option for this? in terms on settings and programming in js.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How i implement the layer is:&lt;/P&gt;&lt;P&gt;&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; gpsCars &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;ArcGISDynamicMapServiceLayer&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;layers&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;read_GPS&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;id&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"gis_gps"&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;
gpsCars&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;setInfoTemplates&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
 &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;infoTemplate&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; myinfotemplate&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;getCarsInfo&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="punctuation token"&gt;;&lt;/SPAN&gt;
gpsCars&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;setImageFormat&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"png32"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

mapp&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;addLayers&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="punctuation token"&gt;,&lt;/SPAN&gt; gpsCars&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;/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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advice &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 10:49:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-handle-refresh-in-dynamic-map/m-p/222146#M20613</guid>
      <dc:creator>EvelynHernandez</dc:creator>
      <dc:date>2021-12-11T10:49:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to handle refresh in dynamic map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-handle-refresh-in-dynamic-map/m-p/222147#M20614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Evelyn,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;Have you tried:&lt;/P&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;gpsCars.setRefreshInterval(0.5);&amp;nbsp; ///or less&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>Wed, 26 Jul 2017 15:51:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-handle-refresh-in-dynamic-map/m-p/222147#M20614</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2017-07-26T15:51:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to handle refresh in dynamic map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-handle-refresh-in-dynamic-map/m-p/222148#M20615</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes, i tried with 0.1&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jul 2017 16:23:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-handle-refresh-in-dynamic-map/m-p/222148#M20615</guid>
      <dc:creator>EvelynHernandez</dc:creator>
      <dc:date>2017-07-26T16:23:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to handle refresh in dynamic map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-handle-refresh-in-dynamic-map/m-p/222149#M20616</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Evelyn,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you tried anything lower than that? Sounds like you map service is just taking a long time to draw.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jul 2017 16:31:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-handle-refresh-in-dynamic-map/m-p/222149#M20616</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2017-07-26T16:31:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to handle refresh in dynamic map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-handle-refresh-in-dynamic-map/m-p/222150#M20617</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well no, I'm going to try 0.01.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jul 2017 16:33:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-handle-refresh-in-dynamic-map/m-p/222150#M20617</guid>
      <dc:creator>EvelynHernandez</dc:creator>
      <dc:date>2017-07-26T16:33:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to handle refresh in dynamic map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-handle-refresh-in-dynamic-map/m-p/222151#M20618</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/people/endlessdsire"&gt;endlessdsire&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you try just adding it to an &lt;A href="https://community.esri.com/space/2106"&gt;&lt;/A&gt;‌ map and setting the layer's refresh setting there?&amp;nbsp; I am using this now at the 0.1 setting (which equals 6 seconds) and it works well for over 800 tracked vehicles at a time.&amp;nbsp; Maybe checking the service here could help to isolate the issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do not believe that a setting of 0.01 (0.6 seconds) will help you at all because the user's queries to the service and subsequent screen refresh would just tie up your application and you would not be able to see anything at all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am also not aware of the data source of your service.&amp;nbsp; I know, past a certain number of vehicles at a certain rate of position refresh, my SQL server cannot keep up with writing position updates AND handling user queries.&amp;nbsp; Thought I might mention that as a possible chokepoint.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do know that the ArcGIS Data Store configured as Spatiotemporal can handle much more throughput.&amp;nbsp;I am going to be using this in the near future to support all of our real-time data services.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--Adam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jul 2017 13:57:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-handle-refresh-in-dynamic-map/m-p/222151#M20618</guid>
      <dc:creator>AdamRepsher</dc:creator>
      <dc:date>2017-07-27T13:57:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to handle refresh in dynamic map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-handle-refresh-in-dynamic-map/m-p/222152#M20619</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I tried the 0.1 and i ask to one of my coworkers about the refresh time for the data and it is 1min app.&lt;/P&gt;&lt;P&gt;So if i set up the time that u suggest it will work for sure.&lt;/P&gt;&lt;P&gt;Hm another thing i noticed, in edge the refresh Interval for dynamic is making the layer does some snapping, but in chrome that snapping doesnt exist. Weird.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for all ur help &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jul 2017 14:05:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-handle-refresh-in-dynamic-map/m-p/222152#M20619</guid>
      <dc:creator>EvelynHernandez</dc:creator>
      <dc:date>2017-07-27T14:05:21Z</dc:date>
    </item>
  </channel>
</rss>

