[OpenLayers-Users] GetFeatureInfo: White Popup

Andrea.Z a_zanotti at hotmail.com
Thu Feb 23 05:32:06 EST 2012


Hi,
I am trying to add "GetFeatureInfo" to my WMS layers but the pop ups
displayed are blank: they open, but there is no data in them.
I found that it could be a proxy error: so I enabled my proxy. The proxy
works: if I go to /localhost/cgi-bin/proxy.cgi, OpenLayers web page is
displayed, as told in 
http://trac.osgeo.org/openlayers/wiki/FrequentlyAskedQuestions#WhydoIneedaProxyHost
Proxy Faq . Then I added /OpenLayers.ProxyHost = "/cgi-bin/proxy.cgi?url=";/
to my page; but nothing has changed.

To insert GetFeatureInfo I used the code I found in the 
http://openlayers.org/dev/examples/getfeatureinfo-popup.html OpenLayers
Example :

 info = new OpenLayers.Control.WMSGetFeatureInfo
({
     url:
'http://localhost/cgi-bin/mapserv?map=/home/andrea/Documenti/alta_bassa.map',
 layers: [layer, layer2],							
     queryVisible: true,						
     eventListeners: 
     {						
          getfeatureinfo: function(event) 
         {								
               map.addPopup(new OpenLayers.Popup.FramedCloud
               (
                    "chicken", 
                    map.getLonLatFromPixel(event.xy),
                    null,
                    event.text,
                    null,
                    true
               )
               );
        }
     }
});

map.addControl(info);
info.activate();


I also tried to use a different code, found on 
http://workshops.opengeo.org/stack-intro/openlayers.html OpenGeo Workshop :

 map.events.register('click', map, function (e) {
        var url =
"http://localhost/cgi-bin/mapserv?map=/home/andrea/Documenti/alta_bassa.map" 
          + "&REQUEST=GetFeatureInfo"
          + "&EXCEPTIONS=application/vnd.ogc.se_xml"
          + "&BBOX=" + map.getExtent().toBBOX()
          + "&X=" + e.xy.x
          + "&Y=" + e.xy.y
          + "&INFO_FORMAT=text/html"
          + "&QUERY_LAYERS=bassa_val_900913"
          + "&LAYERS=bassa_val_900913"
          + "&FEATURE_COUNT=50"
          + "&SRS=EPSG:900913"
          + "&STYLES="
          + "&WIDTH=" + map.size.w
          + "&HEIGHT=" + map.size.h;
        window.open(url,
          "getfeatureinfo",
          "location=0,status=0,scrollbars=1,width=800,height=125"
        );
      });


It changed the type of pop up, but not the result: it is still blank.

I will be grateful to anyone who will try to help me.



--
View this message in context: http://osgeo-org.1560.n6.nabble.com/GetFeatureInfo-White-Popup-tp4498238p4498238.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.


More information about the Users mailing list