[OpenLayers-Users] Switching to singleTile mode (and back) on the fly

Christopher Schmidt crschmidt at metacarta.com
Thu Nov 29 07:47:11 EST 2007


On Thu, Nov 29, 2007 at 12:20:43PM +0000, Jon Blower wrote:
> Hi all,
> 
> Is there a way to switch a WMS layer from gridded to singleTile mode
> after it has been created?  I have a WMS that serves several different
> types of layers - some work best displayed in gridded mode and some
> work better in singleTile mode.  Therefore I'd like to be able to
> switch between modes in Javascript.

Have two layers, and switch between them? You don't have to display them
both: when you switch, set the one you'r turning 'off' to
displayInLayerSwitcher false, then call cahngebaseLayer (or
setVisibility, if they are overlays) and change the layer.

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list