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/> 

 

_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to