[OpenLayers-Users] KML NetworkLink and auto-refresh

ChiefDan ChiefDan at gmail.com
Wed May 13 16:40:14 EDT 2009


Andrew,
I honestly haven't done extensive testing to notice if it flickers or not. I
did set the timer to 1000ms to test that it would go grab the file and it
didn't seem to flicker, but I am not 100% confident I have it all working
smoothly.
If you don't mind, keep posting to this thread with anything you discover
and I'll do the same.

Dan

Andrew Smith wrote:
> 
> 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
>>
> 
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
> 
> 

-- 
View this message in context: http://n2.nabble.com/KML-NetworkLink-and-auto-refresh-tp2531433p2886417.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.




More information about the Users mailing list