                     alpha={dynLyr.alpha}
                     url={dynLyr.url}
                     useproxy={dynLyr.proxyURL != null}/>;
+            if (dynLyr.refreshInterval > 0)
+            {
+                lyrXML.@autorefresh = minutesToSeconds(dynLyr.refreshInterval);
+            }
             if (dynLyr.showInLegend)
             {
                 if (dynLyr.showInLegendHiddenLayers)

                    imageformat={wmtsLayer.imageFormat}
                    url={wmtsLayer.url}
                    useproxy={tiledLyr.proxyURL != null}/>;
            if (!wmtsLayer.showInLegend)
            {
                lyrXML.@showinlegend = false;

                    type="osm"
                    visible={osmLyr.visible}
                    alpha={osmLyr.alpha}/>;
            if (osmLyr.refreshInterval > 0)
            {
                lyrXML.@autorefresh = minutesToSeconds(osmLyr.refreshInterval);
            }
            if (!osmLyr.showInLegend)
            {
                lyrXML.@showinlegend = false;
