[OpenLayers-Users] Re: vendorParams in wmsGetFeatureInfo

vrbikdan vrbikdan at gmail.com
Tue Apr 17 08:33:20 EDT 2012


Hi,
still no progress. I have changed my code to this:

function infoDrill(){
        checked();
	infoDrillVar = new OpenLayers.Control.WMSGetFeatureInfo({
            url: "http://192.168.1.92:8080/geoserver/zk/wms",
            queryVisible: false,
			findLayers: function (){
				var layers=[layers[vrs[checkedButt]]];
			},
			eventListeners: {	
                getfeatureinfo: function(event) {
					 for (var i = 0; i < event.features.length; i++) {
                       feature = event.features[i];
                       var attDrill = feature.attributes;
					   zona=attDrill.zona;
					   alert(zona);
			}}}
			});	
			map.addControl(infoDrillVar);
			infoDrillVar.activate();	
}

And now it tells me, that my layer is not defined. I have defined my layers
like this: layers={layer1, layer2, layer3} so variable in findLayers
function is changing depend on visible layer.

But I'm not sure, if findLayers will solve my problem, because I need to
change layer in WMSGFI, but once if  infoDrillVar is add to map, every click
uses only eventListeners part :(

Dan

--
View this message in context: http://osgeo-org.1560.n6.nabble.com/vendorParams-in-wmsGetFeatureInfo-tp4848746p4890119.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.


More information about the Users mailing list