AnsweredAssumed Answered

How to handle refresh in dynamic map

Question asked by endlessdsire on Jul 26, 2017
Latest reply on Jul 27, 2017 by endlessdsire

Hello everyone,

 

My question is the following.

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.

 

 

We noticed that the data is refreshing too slow, and we actually want to see the cars movement on the map.

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.

Actually i didnt set up the property yet, so i dont know what is the default interval for the map.

 

The table where we get the data is updated in less than a minute. So we realized the refresh is still very slow.

 

Which is the best option for this? in terms on settings and programming in js.

 

How i implement the layer is:

 

var gpsCars = new ArcGISDynamicMapServiceLayer(layers.read_GPS(), {id:"gis_gps"});
gpsCars.setInfoTemplates({
0: {infoTemplate: myinfotemplate.getCarsInfo()}
});
gpsCars.setImageFormat("png32");

mapp.addLayers([..., gpsCars]);

 

Thanks in advice

Outcomes