On Monday, December 20, 2010, Planet)x <[email protected]> wrote: > > 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.
I don't think what you want is supported by the WMSGFI control. Have you considered using a Layer.WMS instance dedicated to configuring the WMSGFI control? -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : [email protected] http://www.camptocamp.com _______________________________________________ Users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/openlayers-users
