Update Interval (seconds) Not Working!
It looks like the Update Interval (seconds) option for map services is not working in the HTML5 viewer. I can tell the Silverlight Viewer is refreshing without any issues, but no refresh with HTML5. Has anyone else experienced this issue and how I can resolve it?
Thanks in advance,
Sedat
-
Hi Sedat,
You are correct, HTML5 Viewer is not supporting UpdateInterval quite yet. However, the feature will be available as of version 1.1 release.
Cheers
Dan
0 -
Thanks Dan.
It looks like the problem is still there even in the HTML 1.1 version which I downloaded and tested today. Can anyone else confirm this?
Regards,
Sedat
0 -
Hi Sedat,
I apologize for causing confusion. UpdateInterval support has been implemented only for GeoRss layers and not Map Services in Html5 Viewer 1.1.
We will try to provide support for UpdateInterval for Map Services as soon as possible.
Dan
0 -
Resolved! Here is a code snippet Geocortex support provided. I implemented it successfully in a custom module.
initialize: function (config) {
this.inherited(arguments);if (this.app.site && this.app.site.isInitialized) {
this.setupInterval();
}
else {
this.app.eventRegistry.event("SiteInitializedEvent").subscribe(this, this.setupInterval);
}},
setupInterval: function () {
var services = null;// Require an initialized site
if (!this.app.site || !this.app.site.isInitialized || !this.app.site.essentialsMap) {
this.app.trace.error("Error - site was not initialized or map was not present.");
return;
}// This is where you select the appropriate map service.
var myMapService = this.app.site.essentialsMap.mapServices[0];var updateIntervalInSeconds = 20;
// Make sure that the serviceLayer exists and has a "refresh" method before applying the interval.
if (myMapService.serviceLayer && myMapService.serviceLayer.refresh) {
setInterval(function () {
myMapService.serviceLayer.refresh();
}, updateIntervalInSeconds * 1000);
}
}0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
4 kommentarer