[OpenLayers-Users] . Popup. FramedCloud this.initialize is undefined error

Vidal, Antoni antoni.vidal at icc.cat
Tue Jul 26 04:36:50 EDT 2011


Hello list,

 

In a new class I'm trying to create a popup when users click over map.

 

                getCoords: function(e) {

                    var lonlat = this.map.getLonLatFromViewPortPx(e.xy);

                               popup = OpenLayers.Popup.FramedCloud("featurePopup",

                                                  lonlat,

                                                  null,

                                                 "<div style='font-size:.8em'>Lon: " + lonlat.lon +"<br>Lat: " + lonlat.lat+"</div>",

                                                null, true, function() {alert("close2");}

                               );

                               

                               map.addPopup(popup);

                },

 

 

Trying with OpenLayers. Popup. FramedCloud I got the following error in firebug:

 

"this.initialize is undefined"

 

But using OpenLayers.Popup it works !

 

What's wrong?. I'm using OL 2.9.

 

Any help would be appreciatted !.

 

Antoni Vidal

Unitat d'Aplicacions SIG-WEB
Institut Cartogràfic de Catalunya <http://mercuri.icc.cat/website/mob_nf/mob1/mob2/inici2.htm?CONSULTA=Institut%20Cartogr%25E0fic%20de%20Catalunya&XYADDRESS=429486:4580392> 
Parc de Montjuïc, E-08038 Barcelona
Tel. (+34) 93 567 15 00 (ext. 3228)
www.icc.cat <http://www.icc.cat/> 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20110726/ae58ce8b/attachment.html


More information about the Users mailing list