[OpenLayers-Users] WFSGetFeatureInfo and OpenLayers.Popup.FramedCloud

Jerome A. Wendell jawendell at suddenlink.net
Fri May 10 06:21:12 PDT 2013


Raffaele,

 

That is the way I prevent the popup from showing up when there are not any
features.  I am not sure how to prevent the getfeatureinfo request from
being made in that situation.  Someone with more experience than myself will
need to address that issue.

 

Jerome

 

 

From: openlayers-users-bounces at lists.osgeo.org
[mailto:openlayers-users-bounces at lists.osgeo.org] On Behalf Of Raffaele
Morelli
Sent: Friday, May 10, 2013 9:10 AM
To: openlayers-users at lists.osgeo.org
Subject: Re: [OpenLayers-Users] WFSGetFeatureInfo and
OpenLayers.Popup.FramedCloud

 

It helps but the WMS request is sent anyway, but apart from that it doesn't
work

event.features.length=0 but the popup doesn't show up

 

Here is my code snippet

 

getfeatureinfo: function(event) {

                if(event.features.length > 0) {

                        map.addPopup(new OpenLayers.Popup.FramedCloud(

                            "sostegno",

                            map.getLonLatFromPixel(event.xy),

                            null,

                            event.text,

                            null,

                            true

                        ));

                    }

                }

            }

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20130510/432b1584/attachment-0001.html>


More information about the Users mailing list