Hello,
I am not sure if this solves your problem, but first of all you should
use *location: e.xy* instead of *lonlat:
mapPanel.map.getLonLatFromPixel(e.xy)* (since version 1.0).
What I think could be a problem is the fact that you have provided no
URL to your WMSGetFeatureInfo Control. Have a look at
http://openlayers.org/dev/examples/getfeatureinfo-control.html
Best regards,
Chris
Am 18.01.2011 19:32, schrieb Robert Buckley:
Hi,
I have layers in a mapPanel which can be queried without problem.
I also have a getcapabilities window which loads layers into the map.
But these layers do not get a response from the getFeatureInfo method.
Could anyone offer any suggestion as to why this doesn´t happen?
yours,
Robert
CODE FOR THE POPUPS
// create the popup
var featureInfo = new OpenLayers.Control.WMSGetFeatureInfo({
queryVisible: true,
highlightOnly: false,
maxFeatures: 2,
});
featureInfo.events.on({
getfeatureinfo: function(e) {
new GeoExt.Popup({
title: "INFO",
width: 300,
height : 200,
autoHeight: true,
layout: 'fit',
bodyStyle: 'background-color:#FFF;,font-size:14px;',
autoScroll: true,
maximizable: true,
map: mapPanel.map,
lonlat: mapPanel.map.getLonLatFromPixel(e.xy),
html: e.text,
unpinnable:true,
anchored: true,
shadow: true,
listeners: {
close: function() {
// closing a popup destroys it, but our
reference is truthy
popup = null;
}
}
}).show();
}
});
map.addControl(featureInfo);
featureInfo.activate();
_______________________________________________
Users mailing list
[email protected]
http://www.geoext.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
[email protected]
http://www.geoext.org/cgi-bin/mailman/listinfo/users