Hello I am a starter of OL and GeoServer. I have tried to modify popup codes where I get from http://openlayers.org/dev/examples/getfeatureinfo-popup.html. My map work very well but the popup seems a trouble. I have two questions for asking. 1. When I click other than a point the popup show up with a blank. I don’t like it so I write my code like this var info = new OpenLayers.Control.WMSGetFeatureInfo({ url: 'http://localhost:8080/geoserver/wms', title: 'Identify features by clicking', layers: [herb], vendorParams: {"FEATURE_COUNT": "100"}, //maxfeatures: 200, vendorParams: { format : 'image/png' }, //handlerOptions: {'hover':{delay:500}}, eventListeners: { getfeatureinfo: function(event) { if (popup != null) { popup.destroy(); popup = null; } if((event.text).length != 1){ map.addPopup(popup = new OpenLayers.Popup.FramedCloud( "chicken", map.getLonLatFromPixel(event.xy), null, event.text, null, true )); } } } }); map.addControl(info); info.activate(); It still doesn’t work. I get idea from an old thread. .: See picture if you don’t understand. http://img260.imageshack.us/img260/4239/34618760.jpg http://img260.imageshack.us/img260/4239/34618760.jpg
2. When I look in my map at high level, the points seem to overlap each other. After I click on the point, the popup query all the point. I want the top most only query. I am using WMS layer not Vector layer. Is it impossible for WMS layer? Can anyone tell me ideas to write a code? If you don’t mind please give me some example or explain. Sorry for my English .: See picture if you don’t understand. http://img42.imageshack.us/img42/4038/85036773.jpg http://img42.imageshack.us/img42/4038/85036773.jpg Thank you Zuhex -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Please-help-me-configured-popup-GetFeatureInfo-tp5003719p5003719.html Sent from the OpenLayers Users mailing list archive at Nabble.com. _______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
