[OpenLayers-Users] Can't display attributes via getfeatureinfo
juhulian
hansfux1 at web.de
Wed Sep 7 19:02:17 EDT 2011
Hi there,
I'm a beginner to openlayers and have looked at many examples, but I just
don't get why this isn't working...
eventListeners: {
getfeatureinfo: function(event) {
map.addPopup(new OpenLayers.Popup.FramedCloud(
"chicken",
map.getLonLatFromPixel(event.xy),
null,
*event.feature.attributes.POSKEY,*
null,
true
));
}
}
I've tried everything to access a feature, like event.features[0] which
would make sense to me, but I always get a "feature is undefined" message.
When I try event.text, all the attributes are displayed fine.
Thanks a lot in advance,
Julian
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Can-t-display-attributes-via-getfeatureinfo-tp6769791p6769791.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list