I am reading some map data from a WMS on a Amazon Web Server running GeoServer. The WMS layer (actually a layer group) is configured to allow queries and appears to work fine using layer preview in GeoServer.
Unfortunately I am having trouble when trying to use the same layer from Map Suite. The layer opens fine and I can zoom in, pan and so on but GetFeatureInfo always returns a count of 0. The code I am using to query the layer looks like this:
privatevoidtheMapControl_MapClick(objectsender, MapClickWinformsMapEventArgs e){WmsRasterLayer searchLayer = theMapControl.FindRasterLayer("ClipLayer")asWmsRasterLayer;searchLayer.Open();Dictionary<string, Collection<feature>> selectedFeatures =searchLayer.GetFeatureInfo(newScreenPointF(e.ScreenX, e.ScreenY),"text/html", 1);if(selectedFeatures.Count > 0){clsMyMessages.mySimpleNotification("Hello");}searchLayer.Close();}
Do I need to do any other setting up to make this work? or am I maybe overlooking something?
Regards,
Jonathan