I want to seperate the WMSGetFeatureInfo request using the params of my layer
so that I can pull out specific layers within group layers to display the
info. Is there a place I can put this params variable to define which layers
to include?
My layer is declared as -
//Areas of Interest Group
var layer_AOIs = new OpenLayers.Layer.WMS("Areas of Interest",
"http://localhost/WebServices/Request.aspx",
{
layers: ['Community_Shelter', 'Hotel_Motel', 'Library',
'Museum', 'Theatre', 'Place_of_Worship', 'Parking', 'City_Facility',
'Recreation', 'School_Age_Program', 'School' , 'Major_Commercial_Centre' ,
'Hospital' , 'Police_Station' , 'Fire_Hall' , 'Attraction'],
VERSION: "1.1.1",
transparent: true
},
{ isBaseLayer: false,
singleTile: true,
visibility: false,
buffer: 1,
ratio: 1
}
);
And my WMSGetFeatureInfo is declare as -
//Define hotspot for Major Parks (testing purposes)
info = new OpenLayers.Control.WMSGetFeatureInfo({
url: 'http://localhost/WebServices/Request.aspx',
title: 'Identify features by clicking',
queryVisible: false,
infoFormat: 'text/html',
layers: [layer_AOIs],
maxFeatures: 1,
hover:false
});
info.events.on({
getfeatureinfo: function(e) {
infopop = new GeoExt.Popup({ //utilizing the GeoExt popup
functionality
title: "Hotspot Information",
autoheight: true,
width: 300,
autoScroll: true,
panIn: false,
map: map,
lonlat: map.getLonLatFromPixel(e.xy),
html: e.text
})
infopop.show();
etext = e.text;
if (etext.length == 146)
{
infopop.close();
}
}});
And my layer is defined as the entire AOIs layer.. can I use the params to
say only use the 'School' layer within my AOIs layer? Appreciate any advice.
--
View this message in context:
http://osgeo-org.1803224.n2.nabble.com/WMSGetFeatureInfo-with-grouped-layers-tp5850904p5850904.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users