[OpenLayers-Dev] Problem in the positioning of popups "Anchored", "Framed" and "FramedCloud" using argument "anchor".

Xavier Mamano (jorix) xavier.mamano at gmail.com
Sun Oct 10 17:16:26 EDT 2010


Hi list, 

I have reproduced a problem in the positioning of popups "Anchored",
"Framed" and "FramedCloud" using argument "anchor". Some users have reported
on this list.  

Using markers is easy to see:  
  var markers = new OpenLayers.Layer.Markers();
  map.addLayer(markers);
            
  var icon = new OpenLayers.Icon('../img/marker.png',new
OpenLayers.Size(21,25));
  var marker = new OpenLayers.Marker(new
OpenLayers.LonLat(0,0),icon.clone());
  markers.addMarker(marker); 
  marker.events.register('mousedown', marker, function(evt) {
    var myPopup = new OpenLayers.Popup.Anchored(null, marker.lonlat, new
OpenLayers.Size(50,50), "text", marker.icon);
    map.addPopup(myPopup);
    myPopup.show();
  });
the only position that works correctly is the "br", for the rest ("tr", "tl"
and "bl") reserve twice the size of the icon. Try to move the icon at the
bottom of the map and press it.
            
This is a regression introduced by r10700 (in #2651) Removing r10700 the
positioning works correctly, and I could not reproduce the problem described
in #2651.
-- 
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Problem-in-the-positioning-of-popups-Anchored-Framed-and-FramedCloud-using-argument-anchor-tp5621326p5621326.html
Sent from the OpenLayers Dev mailing list archive at Nabble.com.


More information about the Dev mailing list