Hi,
I trying to retrieve info via WMS getFeatureInfo and display it in OL
through a popup. The maps are being served by Mapserver. Here is my code:
var info = new OpenLayers.Control.WMSGetFeatureInfo({
url:
'http://labs.argongra.com/cgi-bin/mapserv?map=/var/datos/SIOSE/maps/SIOSE.ma
p&service=WMS&VERSION=1.1.1'
title: 'Info:',
queryVisible: true,
layers: [Superficie_Industria],
eventListeners: {
getfeatureinfo: function(event) {
map.addPopup(new
OpenLayers.Popup.FramedCloud(
"identifier",
map.getLonLatFromPixel(event.xy),
new OpenLayers.Size(400,100),
event.text,
null,
true
));
}
}
}
});
map.addControl(info);
info.activate();
However OL is not sending getFeatureInfo requests to the server (no entries
in the apache access log at least).
I'll explain myself. No popup is shown on the map when the users clicks on
the desired layer (in this case the layer is 'Superficie_Industrila'). After
checking my apache acces log, I can say that not actual getFeatureInfo
request is being sent to the server. The funny thing is that when in OL I
don't specify an url for the WMSGetFeatureInfo control, this time the
request is made, the pop up appears in the map, but of course with the error
'loadMap(): Web application error. CGI variable "map" is not set'.
Manually, I've double checked that the server is correctly answering
getFeatureInfo requests:
<http://labs.argongra.com/cgi-bin/mapserv?MAP=/var/datos/SIOSE/maps/SIOSE.ma
p&VERSION=1.1.1&service=WMS&REQUEST=GetFeatureInfo&SRS=EPSG:25830&BBOX=28059
6.712452866,4393553.81841292,595201.950892653,4577290.86422365&WIDTH=1327&HE
IGHT=774&LAYERS=Superficie_Industria&QUERY_LAYERS=Superficie_Industria&INFO_
FORMAT=text/html&FEATURE_COUNT=50&X=608&Y=218>
http://labs.argongra.com/cgi-bin/mapserv?MAP=/var/datos/SIOSE/maps/SIOSE.map
&VERSION=1.1.1&service=WMS&REQUEST=GetFeatureInfo&SRS=EPSG:25830&BBOX=280596
.712452866,4393553.81841292,595201.950892653,4577290.86422365&WIDTH=1327&HEI
GHT=774&LAYERS=Superficie_Industria&QUERY_LAYERS=Superficie_Industria&INFO_F
ORMAT=text/html&FEATURE_COUNT=50&X=608&Y=218
So if the error is not server side, why is OL not making featureInfoRequests
to the server? Any clues? What am I missing?
Thanks in advance,
Manu
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users