Hi Marcos
my - not very sophisticated - approach:
function setHTML(response) {
if (response.responseText.indexOf('<body> </body>') == -1) {
// show popup....
}
else {
// do not show popup...
}
}
It simply checks wether the returned html stuff consists only of two body tags.
Probably you have to change the check string according to your wms server's
empty response.
regards
Stefan
----- Originalnachricht -----
Von: Marcos Nogueira <[email protected]>
Gesendet: Die, 25.8.2009 21:17
An: [email protected]
Betreff: [OpenLayers-Users] Popups doubt in example "Feature Info in Popup"
Hi,
I managed to use GetFeatureInfo perfectly in my application after checking the
example "Feature Info in Popup".
Every point that I click that has some information to be returned gets it
returned. It's great.
But the problem is, when I click in a place in the map that has no information,
I mean, a point from my WMS layer that has no
information about it in my source, it returns an empty popup.
That behaviour also happens in the example. If you click in the white area, for
example, it returns you an empty popup.
The question I have is:
how do I make for the popup to appear only when there's some information being
returned ??
I'm using openlayers 2.8
Thanks for the attention guys
Marcos
--
"Saber o que é certo e não fazê-lo é a pior covardia."
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users