[Users] geoext.popup position wrong

13 views
Skip to first unread message

Robert Buckley

unread,
Mar 6, 2012, 8:06:35 AM3/6/12
to us...@geoext.org
Hi,

it´s not the first time I have had this problem, but I have looked into my own work and cannot find a solution.

When the popup appears, it is not positioned on the point I clicked..

I have included the geoext css and the popup css files in the html doc.

my code is here...if some could give me a clue as to where I should look for a solution I´d be most grateful,

cheers,

Rob



var featureInfo = new OpenLayers.Control.WMSGetFeatureInfo({
   infoFormat: "application/vnd.ogc.gml",   
        queryVisible: true,
        highlightOnly: false,
        maxFeatures: 20,
eventListeners: {
                    "getfeatureinfo": function(e) {                       
                        var items = [];
                        Ext.each(e.features, function(feature) {
                            items.push({
                                xtype: "propertygrid",
                                title: feature.fid,
                                source: feature.attributes
                            });
                        });
new GeoExt.Popup({
                url: "/geoserver/ows",
                title: "Info",
                layout: "border",
                region:"east",
                //x: 330,
                //y: 20,
                width: 200,
                height: 300,
                layout: "accordion",
                bodyStyle: 'background-color:#FFF;,font-size:14px;',
                autoScroll: true,
                map: mapPanel.map,
                location: map.getLonLatFromPixel(e.xy),
                //location: e.xy,
               //lonlat: mapPanel.map.getLonLatFromPixel(e.xy),
               // html: e.text,
                maximizable: false,
                resizable: false,
                collapsible: false,
                items: items 
                }).show(); 
        }
        }
    });

Andreas Hocevar

unread,
Mar 6, 2012, 8:59:45 AM3/6/12
to Robert Buckley, us...@geoext.org
Can you be a bit more specific on how the popup position is wrong?
Maybe with a screenshot?

It should be enough to configure

location: e.xy

Andreas.

> _______________________________________________
> Users mailing list
> Us...@geoext.org
> http://www.geoext.org/cgi-bin/mailman/listinfo/users
>

--
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.
_______________________________________________
Users mailing list
Us...@geoext.org
http://www.geoext.org/cgi-bin/mailman/listinfo/users

Robert Buckley

unread,
Mar 6, 2012, 9:04:36 AM3/6/12
to us...@geoext.org
Hi,

you can try it out here...



Von: Andreas Hocevar <ahoc...@opengeo.org>
An: Robert Buckley <robertd...@yahoo.com>
CC: "us...@geoext.org" <us...@geoext.org>
Gesendet: 14:59 Dienstag, 6.März 2012
Betreff: Re: [Users] geoext.popup position wrong

Andreas Hocevar

unread,
Mar 6, 2012, 9:17:57 AM3/6/12
to Robert Buckley, us...@geoext.org
Looks to me like you're using an old version of the GeoExt css - one
that doesn't match your GeoExt version.

Andreas.

Robert Buckley

unread,
Mar 6, 2012, 9:23:23 AM3/6/12
to us...@geoext.org
OK.......ill update right away and see what happens


Von: Andreas Hocevar <ahoc...@opengeo.org>
An: Robert Buckley <robertd...@yahoo.com>
CC: "us...@geoext.org" <us...@geoext.org>
Gesendet: 15:17 Dienstag, 6.März 2012

Robert Buckley

unread,
Mar 6, 2012, 10:34:11 AM3/6/12
to us...@geoext.org
Thanks Andreas,

The popup works fine now that i´ve updated to geoext 1.1

The code I am using is taken from the examples http://api.geoext.org/1.1/examples/tree.html.

1 Question remains though...

Although the first node is NOT checked on starting the application, the popup is still activated for the first layer. Why is the getFeatureInfo already activated although the node is not checked?

Thanks for any help,

Rob



Von: Robert Buckley <robertd...@yahoo.com>
An: "us...@geoext.org" <us...@geoext.org>
Gesendet: 15:23 Dienstag, 6.März 2012

Andreas Hocevar

unread,
Mar 12, 2012, 5:58:59 AM3/12/12
to Robert Buckley, us...@geoext.org
The example has been updated. Look at
http://dev.geoext.org/trunk/geoext/examples/tree.html for the latest
version, and see if you can fix your remaining issue.

Andreas.

Reply all
Reply to author
Forward
0 new messages