[OpenLayers-Users] which feature is from wich layer in WMSGFI

vrbikdan vrbikdan at gmail.com
Tue Jun 19 03:24:37 PDT 2012


Hi all,
I'm using WMSGetFeatureInfo for writting information about feature. But now
I need to know, which feature in response is from which layer. Problem is,
that I'm using infoFormat: 'application/vnd.ogc.gml'. My code is here:

infoPropVar = new OpenLayers.Control.WMSGetFeatureInfo(
	{
            url: "http://192.168.1.92:8080/geoserver/zk/wms", 
            title: '',
            queryVisible: true,
			infoFormat: 'application/vnd.ogc.gml',
			eventListeners: 
			{				
                getfeatureinfo: function(event) 
				{
					for (i=0; i<event.features.length; i++)
					{
                                            alert();
					}
				}
			}
	});
	map.addControl(infoPropVar);
	infoPropVar.activate();

I tried write event.features[i].layer/name/layerName and so on but nothing.
Do you have any tip how I can extract which feature in response is from
which layer?

Thanks a lot
Dan

--
View this message in context: http://osgeo-org.1560.n6.nabble.com/which-feature-is-from-wich-layer-in-WMSGFI-tp4982353.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.


More information about the Users mailing list