[OpenLayers-Users] Google Style popup
Daniel de la Cuesta
cues7a at yahoo.es
Thu Sep 27 14:34:15 EDT 2007
Hi,
I am newbie using Open Layers and I saw this sandboxed code in the archives:
http://openlayers.org/pipermail/users/2007-August/002580.html
It was what I was looking for!.
I have checked it out and I am trying to show a the google style popup when
a marker is clicked:
marker1.events.register("mousedown", marker1, function(evt) {
text = "hello"
popup = new OpenLayers.Popup("olPopup",
new OpenLayers.LonLat(-4.549683, 36.737052),
new OpenLayers.Size(200,200),
texte,
true);
markers.map.addPopup(popup);
});
markers.addMarker(marker1);
The google popup works fine except:
1. The position of the popup is not above the marker.
2. When the popup it is outside the map it doesn´t pan.
I have tried the example from
http://svn.openlayers.org/sandbox/CloudAmber/Trunk/. In this example the
popup it is shown using the method "OpenLayers.Layer.Text" and getting the
information from text file. It works perfectly.
Am I doing something wrong or the Google popup doesn´t work fine if I create
it in the way explained above.
Thank you very much.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20070927/2a4162cb/attachment.html
More information about the Users
mailing list