Hi Joost, you can pass layerOptions to the Format.WMC constructor in order to do this. Code example:
mapfish.OGCUtil.readWMC = function(map, response, noZoom) { var format = new OpenLayers.Format.WMC({layerOptions: {isBaseLayer: false, singleTile: true, buffer: 0,ratio: 1}}); // remove all layers except the baselayer for (var i = map.layers.length-1; i >= 0; i--) { if (!map.layers[i].isBaseLayer) { map.removeLayer(map.layers[i], false); } } map = format.read(response.responseText, {map: map}); ... } Best regards, Bart > Thanks John, that works. Now I need to know how to convert all of the > layers in my WMC to overlay's. Any ideas? > > -----Original Message----- > From: John Pulles [mailto:[EMAIL PROTECTED] > Sent: Wed 06/08/2008 2:49 PM > To: Van Ulden, Joost > Cc: users@openlayers.org > Subject: Re: [OpenLayers-Users] Loading WMC layers at overlays? > > 2008/8/6 jvanulde <[EMAIL PROTECTED]> > >> >> Is this possible? I want to add a fake base layer and load all the WMC >> layers as overlays. Any ideas on how one would go about doing this? > > > You can add a fake base layer with > > map.addLayer(new OpenLayers.Layer('None', {isBaseLayer: true})); > > Regards, > John > > >> >> -- >> View this message in context: >> http://www.nabble.com/Loading-WMC-layers-at-overlays--tp18859376p18859376.html >> Sent from the OpenLayers Users mailing list archive at Nabble.com. >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users