If you want features, you need a WMS that supports GML as output format for GetFeatureInfo. For WMS 1.1.1, the format is "application/vnd.ogc.gml". It has to be provided as the infoFormat options.
Andreas. On Sep 18, 2011 11:40 AM, "juhulian" <[email protected]> wrote: > Hi there, > I'm using the standard example for a getfeatureinfo popup and now I want to > use some of the attribute data of the feature that was clicked, but the > event.features array is just empty when I try the alert... > > info = new OpenLayers.Control.WMSGetFeatureInfo({ > url: 'http://localhost:8080/geoserver/wms/', > title: 'Identify features by clicking', > queryVisible: true, > eventListeners: { > getfeatureinfo: function(event) { > alert(event.features.length); > map.addPopup(new OpenLayers.Popup.FramedCloud( > "chicken", //id > map.getLonLatFromPixel(event.xy), //koord auf dem > event > null, //contentsize > event.text, //contentHtml > null, //anchor > true //closeBox > ),true); > } > } > }); > > any help is appreciated, > julian > > -- > View this message in context: > http://osgeo-org.1803224.n2.nabble.com/features-length-is-0-beginner-question-tp6805453p6805453.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 >
_______________________________________________ Users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/openlayers-users
