[Users] Hidden popups showing when panning/zooming

Adrià Mercader amercader.dev at gmail.com
Thu Feb 3 15:46:32 CET 2011


Hi all,

I'm trying to reuse a popup instance everytime a user clicks on the
map, without needing to recreate it. My idea was to hold a reference
to a popup constructed with the closeAction:'hide' property, and then
call the show() method when necessary.
But when I close the popup (or hide it), it keeps showing whenever I
do a pan or zoom.

This is how I create the popup:

var popup = new GeoExt.Popup({
    items: [{xtype: "box", autoEl: {html: "Hola"}}],
    map: mapPanel.map,
    closeAction: 'hide',
    height: 200,
    width: 280,
    location: mapPanel.map.getCenter()
});
popup.show();

And here is a working example that shows this behaviour:
http://amercader.net/dev/sandbox/geoextpopup/

Did anybody found this behaviour or knows how to avoid it?

Thanks,


-- 


Adrià Mercader
-----------------------------
http://amercader.net


More information about the Users mailing list