Solved! Go to Solution.
This post was a while back, but has anyone found a solution? We have KML files we serve up through AGOL, but we need to display updates as they take place. Unfortunately, the existing AGOL 30-minute cache will not work for us. We're working with the JavaScript API as well, but we're not sure how to set the "refresh=true" parameter within the KML utility service.
Thanks for any ideas you can send our way.
Bert
According to the KML documentation the web map refresh rates on KML layers are honoured.
KML—ArcGIS Online Help | ArcGIS
I'm not entirely sure that's the case. I've got a KML that's refreshing on our web server every minute and the layer in the web map is set to refresh every minute. So at worst you'd expect something like a 2 minute refresh. As far as I can see that's not the case. I suppose it could be my browser caching or firewall caching, but Google Earth sees the changes so it's all a little unclear.
I've tried incognito in chrome with no change.
Can anyone clear up what the story is with KML refresh rates in AGOL?
Reply to my own reply....
While refresh rates on layers within Web Maps don't seem to be honoured, you can create a kml with a network link with a refresh rate and that may work.
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.1">
<Document>
<NetworkLink>
<Link>
<href>https://server/data.kmz</href>
<refreshMode>onInterval</refreshMode>
<refreshInterval>60</refreshInterval>
</Link>
</NetworkLink>
</Document>
</kml>