[OpenLayers-Users] Change server wms layer depending resolution

Christopher Schmidt crschmidt at metacarta.com
Fri Jan 2 10:03:55 EST 2009


On Fri, Jan 02, 2009 at 02:39:23PM +0100, Vidal, Antoni wrote:
> Hi there,
> 
> I would change the server of a wms layer depending of map's resolution. Is this possible ?, if yes, any help will be thankfull.

You probably want to have two scale-dependant WMS overlays -- one with a
minScale: 1000000, maxScale: 10000 , the next with a minScale: 10000 ,
maxScale: 1, or something. If you don't have another base layer,
creating an empty base layer:

  new OpenLayers.Layer("", {displayInLayerSwitcher: false, isBaseLayer:
  true});

Can be used.  

REgards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list