[OpenLayers-Users] WMSGetFeatureInfo doesnt seem to work

Dominik Wiedner dominikwiedner at web.de
Tue Sep 1 12:40:05 EDT 2009


Hi guys,

Currently I try to find my way in to OpenLayers.

The problem, I'm currently facing, is that this code:

function load () {
var map = new OpenLayers.Map('map');
var wms = new OpenLayers.Layer.WMS(
"OpenLayers WMS", "http://labs.metacarta.com/wms/vmap0",
{
layers: 'basic',
//srs: 'EPSG:31467',
format: 'image/gif'
}
);
var studiwohn = new OpenLayers.Layer.WMS(
"Studentenwohnheime ", "http://localhost:8080/geoserver/wms",
{
layers: 'topp:Studentenwohnheime',
//srs: 'EPSG:31467',
transparent: 'true',
format: 'image/gif'
}
);
map.addLayers([wms, studiwohn]);
map.zoomToMaxExtent();
var info = new OpenLayers.Control.WMSGetFeatureInfo({ url:
'http://localhost:8080/geoserver/wms', title: 'Identify features by
clicking',
queryVisible: true,
eventListeners: {
getfeatureinfo: function(event) {
map.addPopup(new OpenLayers.Popup.FramedCloud(
"chicken", map.getLonLatFromPixel(event.xy),
null,
event.text,
null,
true
));
}
}
});
map.addControl(info);
info.activate();
map.addControl(new OpenLayers.Control.LayerSwitcher());
}

doesn't work very well, when I click on one of my features in the Layer
"Studentenwohnheime", i can see that a query is submitted to the server, but
no result is being sent back.

Kind regards,
Dominik
-- 
View this message in context: http://n2.nabble.com/WMSGetFeatureInfo-doesnt-seem-to-work-tp3561729p3561729.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.



More information about the Users mailing list