[OpenLayers-Users] WMSGetFeatureInfo request error: "this.size is null"

mike_de_funk m.j.gale at gmail.com
Fri Jan 6 05:55:43 EST 2012


Hi List

I am trying to initiate popups for point features rendered via MapServer /
PostGIS. The code is based on the openlayers example:
http://openlayers.org/dev/examples/getfeatureinfo-popup.html

Initially using firebug the "map" parameter was not being passed to the
request and I have managed a work around by adding the vendorParams
variable. This now produces a getfeatureinfo request that when entered
manually works perfectly and returns the requested information.

I Am now however getting the Firebug error: "this.size is null" followed by
the line:

if((origTL.x+this.size.w)>(mapSize.w-t....paddingForPopups.right-this.size.w;} 


My Code is listed below:

     info = new OpenLayers.Control.WMSGetFeatureInfo({
           url: '*HOST*/cgi-mapserv/mapserv?',
           vendorParams: {
                         map: 'mapfiles/fhf_test/booth_points.map'
                        } ,
            title: 'Identify features by clicking',
            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();


Any help much appreciated.

Mike

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/WMSGetFeatureInfo-request-error-this-size-is-null-tp7157998p7157998.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.


More information about the Users mailing list