[OpenLayers-Users] KML NetworkLink and auto-refresh
Andrew Smith
laconical at gmail.com
Tue May 12 21:31:44 EDT 2009
Thanks Dan, I'll have to give this a try.
I notice that your timer is going off every 10 minutes...how much data are
you loading from the KML file? Is there much in the way of a noticeable
flicker when you reload the layer (i.e. does all of the data completely
disappear for a few seconds while the KML file is parsed and reloaded)?
I'd be looking to reload a layer containing between 20-100 text objects
every 5 seconds or so and I'm not sure what the performance will be like
under those conditions.
Cheers,
Andrew
On Wed, May 13, 2009 at 1:35 AM, ChiefDan <ChiefDan at gmail.com> wrote:
>
> Andrew,
> Not sure if you found a solution, if not, this is what I've done.
>
> In the map init function, set a timer:
>
> window.setInterval(raingaugeRefreshData, 600000, rainGauges);
>
> Then in the timer service function:
> function raingaugeRefreshData(layer)
> {
> layer.loaded = false;
> layer.setVisibility(true);
> }
> By setting loaded to false then calling setVisibility(), openlayers goes
> and
> grabs the kml file again.
>
> Hope this helps.
>
> Dan
> --
> View this message in context:
> http://n2.nabble.com/KML-NetworkLink-and-auto-refresh-tp2531433p2870627.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090513/32f3e80b/attachment.html
More information about the Users
mailing list