I have an animation where I move a point along a line. At certain spots of that line I open a popup to show a picture. I want the popup to be centered on the point. It seems to work for some points and not for others. Sometimes the popup is centered and sometimes it is just offset off the point. I tried to set that the relative position is "tr", but that did not help(maybe I did it wrong?):
var popup_point = new OpenLayers.LonLat(fence_point.x,fence_point.y);
var anchor = {'size': new OpenLayers.Size(0,0), 'offset': new OpenLayers.Pixel(-100, -100)};
popup = new OpenLayers.Popup.Anchored("fence",
popup_point,
new OpenLayers.Size(200,200),
contentString,
anchor,
false);
// popup.autoSize = true;
map.addPopup(popup);
