[Users] Loading WMS layer from WMSCapabilities Store

Jason Hochschild sk1 at sk1consulting.com
Tue Jun 7 17:10:55 CEST 2011


I don't know if this will work, but try to define a 'group' literal in
the options when defining the WMS layer and then filter on that when
defining the container:

var wmslayer = new OpenLayers.Layer.WMS(
		"layername", "/geoserver/gwc/service/wms",
		{ layers: 'what:ever', transparent: true, format: "image/gif" },
		{ isBaseLayer: false, visibility: true, group: "groupName" }	
);	

and in the loader for the container:

loader: {
	filter: function (record) {  // this filters on the literal 'group:'
on each layer
		return record.get("layer").options.group === "groupName";
	}
}

Good Luck


More information about the Users mailing list