[OpenLayers-Trac] [OpenLayers] #1529: WMC should not make all layers baselayers

OpenLayers trac at openlayers.org
Fri May 23 09:15:27 EDT 2008


#1529: WMC should not make all layers baselayers
-------------------------+--------------------------------------------------
  Reporter:  jpulles     |       Owner:  tschaub              
      Type:  bug         |      Status:  new                  
  Priority:  minor       |   Milestone:                       
 Component:  Format.WMC  |     Version:  2.6                  
Resolution:              |    Keywords:  wmc context baselayer
     State:  Review      |  
-------------------------+--------------------------------------------------
Comment (by bartvde):

 John, there is an easy way around this without changing the code.

 There are many different use cases, for instance I always use a dummy
 Image baselayer and I would not want the WMC code to change my baselayer.

 The WMC format has an option called layerOptions which you can use to set
 isBaseLayer to false. Then once the WMC has been loaded, you can just set
 e.g. the first/bottom layer to be the baselayer if you want (but in my use
 case I don't want to set any new baselayer since I have the dummy Image
 base layer).

 {{{
     var format = new OpenLayers.Format.WMC({layerOptions: {isBaseLayer:
 false,
         singleTile: true, buffer: 0,ratio: 1}});
 }}}

-- 
Ticket URL: <http://trac.openlayers.org/ticket/1529#comment:2>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer


More information about the Trac mailing list