[OpenLayers-Users] Animating vector polygons generated from separate data files

Jon Oxtoby joxtoby27 at gmail.com
Thu Feb 23 20:21:19 EST 2012


I'm working on a project which displays radar data on a map of the US.
 This data is currently stored in KML format with one file per radar
snapshot.  Snapshots are taken every 5 minutes, therefore to display one
hours worth of data requires 12 files.  The method I'm currently using is
to create a new vector layer for each data file consisting of polygons from
the KML files.  I then use setVisibility(false) to hide the layer and add
it to the map.  Once all layers are created I use a timer to loop through
the layers making the current layer visible and the previous layer
invisible every 100ms to animate the radar display.  This works but
consumes an awful lot of memory (3 hours worth of data, or 36 layers,
consumes almost 300MB).  I'm trying to find a solution which uses much less
memory as the end goal is to be able to load up 24 hours worth of data at a
time for display.

I do not need to use KML - I can reformat the data files into whatever
format is best suited to the task.  I tried a similar approach using WMS
layers and a shapefile format served by MapServer but the redrawing of the
layers couldn't really keep up and the memory footprint wasn't much better
than the vector layers.  Also when I zoom in using the WMS format it makes
things even worse as the new tiles need to be loaded in for each zoom
level, whereas the vectors are drawn immediately.

Does anyone have any suggestions for improving this setup?  I was
originally going to post this to the dev list but thought I'd first see if
there was any native functionality that I'm overlooking.

Thanks for any help
Jon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20120223/4eb87162/attachment-0001.html


More information about the Users mailing list