Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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",
                       new OpenLayers.Size(200,200),

    // popup.autoSize = true;
share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.