[OpenLayers-Users] Re: GetFeatureInfo: White Popup

Andrea.Z a_zanotti at hotmail.com
Thu Mar 1 10:26:47 EST 2012


Hi Francesc,

thanks for your reply, but all the suggestions in the link you game me did
not work. I was losing any hope, when this morning I suddenly find a
solution. I was making some tries, changing the parameters of my request,
and finally I made it work. I paste my code here, maybe it will help some
other persons who are having the same troubles.

     map.events.register('click', map, function (e) {
        var url =
"http://localhost/cgi-bin/mapserv?map=/home/andrea/Documenti/alta_bassa.map" 
          + "&REQUEST=GetFeatureInfo"
          + "&VERSION=1.1.1"
          + "&BBOX=" + map.getExtent().toBBOX()
          + "&X=" + e.xy.x
          + "&Y=" + e.xy.y
          + "&QUERY_LAYERS=bassa_val_900913,alta_val_900913"
          + "&LAYERS=bassa_val_900913,alta_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=300"
        );
      });

As you can see, it was not necessary to add the exceptions; by the way I had
to add the version. I really do not remember if I changed something
elsewhere, but I do not think so; so, probably, all the problems were in the
parameters of the request. I tested it in other maps and it works!

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


More information about the Users mailing list