<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7654.12">
<TITLE>RS: [Users] Error with popup</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<P><FONT SIZE=2>map var is defined in layout.js, and the code belongs to another js file, but it seems is still referenced.<BR>
<BR>
Toni<BR>
<BR>
<BR>
-----Missatge original-----<BR>
De: Joaquin [<A HREF="mailto:jcarrascog@gmail.com">mailto:jcarrascog@gmail.com</A>]<BR>
Enviat el: dv. 13/05/2011 16:14<BR>
Per a: Vidal, Antoni<BR>
A/c: <users@geoext.org><BR>
Tema: Re: [Users] Error with popup<BR>
<BR>
Where is the variable map defined and created?<BR>
<BR>
<BR>
<BR>
El 13/05/2011, a las 14:10, "Vidal, Antoni" <antoni.vidal@icc.cat> escribiķ:<BR>
<BR>
> Hi list,<BR>
><BR>
> <BR>
><BR>
> I've followed popup example <A HREF="http://api.geoext.org/1.0/examples/popup-more.html">http://api.geoext.org/1.0/examples/popup-more.html</A> but I get an error:<BR>
><BR>
> <BR>
><BR>
> this.feature is null<BR>
><BR>
> <image001.png>var centerLonLat = this.feature.geometry.getBounds().getCenterLonLat();<BR>
><BR>
> <BR>
><BR>
> Popup.js line 212<BR>
><BR>
> <BR>
><BR>
> My simple code:<BR>
><BR>
> <BR>
><BR>
> var popup = new GeoExt.Popup({<BR>
><BR>
> title: "My Popup",<BR>
><BR>
> location: px,<BR>
><BR>
> width: 200,<BR>
><BR>
> map: map,<BR>
><BR>
> html: "<div>Popup content</div>",<BR>
><BR>
> collapsible: true<BR>
><BR>
> });<BR>
><BR>
> <BR>
><BR>
> popup.show();<BR>
><BR>
> <BR>
><BR>
> If comment popup.show(); error disappears.<BR>
><BR>
> <BR>
><BR>
> Any idea?<BR>
><BR>
> <BR>
><BR>
> Thanks in advance.<BR>
><BR>
> <BR>
><BR>
> Antoni Vidal<BR>
><BR>
> Unitat d'Aplicacions SIG-WEB<BR>
> Institut Cartogrāfic de Catalunya<BR>
> Parc de Montjuīc, E-08038 Barcelona<BR>
> Tel. (+34) 93 567 15 00 (ext. 3228)<BR>
> www.icc.cat<BR>
><BR>
> <BR>
><BR>
> _______________________________________________<BR>
> Users mailing list<BR>
> Users@geoext.org<BR>
> <A HREF="http://www.geoext.org/cgi-bin/mailman/listinfo/users">http://www.geoext.org/cgi-bin/mailman/listinfo/users</A><BR>
<BR>
</FONT>
</P>
</BODY>
</HTML>