I'm having trouble with everything mouse related for an Openlayers map when the map is placed inside a DIV with position fixed. The map works fine when you're at the top of the viewport of the browser, but when you're scrolling down the page, you can see that the zooming/click effects are shifted. You can check here!search=KFC%2F0%2F0%2F0%2F%2F to see exactly what I mean.


  • 1
    That site (an unidentified Egyptian server) is so slow and unresponsive that it doesn't seem to suggest any unusual behavior to me.
    – whuber
    Dec 28, 2011 at 16:41
  • Cannot open URL
    – CaptDragon
    Jan 5, 2012 at 15:51

2 Answers 2


I was using an outdated version of openlayers (2.01), updating to the latest version of openlayers solved the issue


you can solve the problem setting the search box a fixed 'height' and using overflow:auto.

The real problem, you suggests, seems related to the compute of map position/dimensions and the fact you move the slider without moving the map.

You can check if calling the 'map.updateSize()' when you move the scroll solves the problem, but IMO i think it is better to set an heigh in the search box to not go beyond the page limits.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.