I have previously asked this question to no avail so I thought putting this up here would be a good idea.
Here is an example on:
How to Refresh / Reload a KML layer in OpenLayers. Dynamic KML Layer. See my answer below.
TLDR: See my answer below.
Figured seen as it was hard enough for me to find information on this I would add this:
Create the KML Layer:
Set the URL for the KML Layer:
Set the interval in which to refresh your layer:
The function to update the layer:
Hopes this makes it easier for some others out there. Good luck.
I have been putzing around with this to no avail. Would someone mind taking a look at my code and telling me what I am doing wrong? Thank you!
So sorry, I had to correct your imperfect codes. Should run this time.
untested but something like this?
You may want to look at the Refresh strategy. http://dev.openlayers.org/releases/OpenLayers-2.11/doc/apidocs/files/OpenLayers/Strategy/Refresh-js.html