[Users] [OpenLayers-Users] Control not working when implementing FeatureInfo

Smaran Harihar smaran.harihar at gmail.com
Thu Oct 11 04:33:46 CEST 2012


ya it is but I thought that when I am creating the new popup it should not
be a problem. The reason it is null is because I am making it null. Here is
the function for the popup,

if (!popup) {
    popup = new GeoExt.Popup({
        title: "Feature Info",
        width: 200,
        maximizable: true,
        collapsible: true,
        map: panel.map,
        location: loc,
        anchored: true,
        listeners: {
            close: function () {
                // closing a popup destroys it, but our reference is truthy
                popup = null;
            }
        }
    });
}

Thanks,
Smaran

On Wed, Oct 10, 2012 at 7:26 PM, Phil Scadden <p.scadden at gns.cri.nz> wrote:

> On 11/10/2012 3:16 p.m., Smaran Harihar wrote:
> > Thanks Phil. I was basically creating popups and closing them, if they
> > were open, using,
> >
> > if (popup) popup.close();
> >
> > Not sure why that causes the error?
>
> I gather that fixed it? I'm guessing the scope allowed js to remove it.
> You might need code to see if pop needs to be created. If you leave that
> line in, then step through code on response and see what value popup has
> in the error creating situation. I'd guess null.
>
> Notice: This email and any attachments are confidential. If received in
> error please destroy and immediately notify us. Do not copy or disclose the
> contents.
>
>


-- 
Thanks & Regards
Smaran Harihar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20121010/095005f2/attachment.htm 


More information about the Users mailing list