Select to view content in your preferred language

refreshInterval in MapImageLayer not working as expected

850
3
Jump to solution
03-02-2022 02:49 AM
HanochS
Emerging Contributor

Hi,

I have configured refreshInterval for MapImageLayer to be 0.1 (6 seconds). After monitoring the requests I can see that the timing is not as configured and seems awkward.

I attached a screenshot with the timing. You can see that requests are triggering each 12/6 sec randomly.

From the documentation I understood it should trigger each 6 sec but that is not the case.

 

Regards,

Hanoch

0 Kudos
1 Solution

Accepted Solutions
UndralBatsukh
Esri Regular Contributor

Yes indeed. We did make improvements to refreshable layers at version 4.21 and 4.22. In the process we fixed bugs as well. 

https://developers.arcgis.com/javascript/latest/4.21/#refreshable-layers

https://developers.arcgis.com/javascript/latest/release-notes/#refreshable-layers

 

View solution in original post

3 Replies
UndralBatsukh
Esri Regular Contributor

Hi there, 

What version of the JS API are you using? At 4.22, I can see that refresh is triggered at every 6 seconds exactly. The response time can vary from the server.

 

Here is a simple test app that listens to the refresh event on the layer and it is goes off every 6 seconds: https://codepen.io/U_B_U/pen/ZEaVQmW?editors=1000

0 Kudos
HanochS
Emerging Contributor

I am using 4.17, were there any changes related to refreshintervel between those versions?

0 Kudos
UndralBatsukh
Esri Regular Contributor

Yes indeed. We did make improvements to refreshable layers at version 4.21 and 4.22. In the process we fixed bugs as well. 

https://developers.arcgis.com/javascript/latest/4.21/#refreshable-layers

https://developers.arcgis.com/javascript/latest/release-notes/#refreshable-layers