[OpenLayers-Users] Switching a layer between tiled and untiled behaviour

Jon Blower jdb at mail.nerc-essc.ac.uk
Wed Mar 7 16:53:09 EST 2007


Hi Christopher,

My reason for wanting to switch a layer between tiled and untiled
behaviour is as follows.  I'm displaying dynamically-generated images
of ocean forecast data and normally I want to display this in tiles
for efficiency (in future I'll have a tile cache of some sort).
However, I also want to display animations (my WMS supports output in
animated GIF format).  This cannot be done in tiles because each tile
would be a separate animation and hence they would not be mutually
synchronized on the map.  In this case I need to use an untiled layer
and have a single animated GIF that covers the whole viewport (and
possibly beyond).

The obvious way to do this would be to have two layers and switch
between them automatically as required.  However, I don't want to show
both the tiled and untiled layers in the LayerSwitcher control: I just
want to show the active layer (to give the illusion that there is only
one layer, exhibiting both behaviours).  I suppose I can call
map.addLayer() and map.removeLayer() when I switch between them.

It would be useful to be able to switch behaviours but I can see this
might be tricky.

Regards,
Jon

On 3/3/07, Christopher Schmidt <crschmidt at metacarta.com> wrote:
> On Sat, Mar 03, 2007 at 08:53:03AM +0000, Jon Blower wrote:
> > Hi all,
> >
> > I suspect the answer to this is probably "no" but is there a way to
> > switch a certain WMS layer between tiled and untiled behaviour at
> > runtime?
>
> I'm not really sure hwy you'd want to do it, but you could probably have
> two layers, and then make turning them on or off change the state to the
> other layer type.
>
> However, a WMS Untiled layer is no different than any other layer
> (WorldWind, Ka-Map, etc.) -- there is no inherent connection between a
> layer and its untiled cousin, so the answer is, as you suspected, 'no'.
>
> If you could explain your use case more completely, I might be able to
> understand your question better and give a better answer.
>
> Regards,
> --
> Christopher Schmidt
> MetaCarta
>


-- 
--------------------------------------------------------------
Dr Jon Blower              Tel: +44 118 378 5213 (direct line)
Technical Director         Tel: +44 118 378 8741 (ESSC)
Reading e-Science Centre   Fax: +44 118 378 6413
ESSC                       Email: jdb at mail.nerc-essc.ac.uk
University of Reading
3 Earley Gate
Reading RG6 6AL, UK
--------------------------------------------------------------



More information about the Users mailing list