I would do something like this. Hope this help. theControl.events.register("getfeatureinfo", this, showInfo);
function showInfo(evt) { if( evt.text != "\n" && evt.text != "") map.addPopup(......); } "Manuel Aymerich" <maymer...@argongra.es>@openlayers.org Envoyé par : users-boun...@openlayers.org 15/06/2010 06:05 AM A <users@openlayers.org> cc Objet [OpenLayers-Users] WMSGetFeatureInfo hangs when getfeatureinfo returns no results Hi, I am using openlayers 2.9 together with mapsever 5.6. I am retrieving queries with OL control WMSGetFeatureInfo() and getfeatureinfo event. Up to this point everything works fine, being able to show query results when the user clicks on a queryable map feature. However if the user clicks the map on a zone where no features are available, the mouse cursor moves to the loading state (hourglass icon), and waits for a response that doesn?t seem to arrive. The mapserver logs show that no result was returned (? GetFeatureInfo Results: Search returned no results). However, it seems that OL is not able to handle this response and remains waiting in this state until the user performs another operation. Any suggestions about how behaviour could be fixed? Shouldn?t OL handle the no result exception case? Thanks in advance, Manuel _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
_______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users