[OpenLayers-Dev] Probable draw issue
giannibarrotta at gmail.com
Fri Jan 15 08:08:07 EST 2010
I found a Christopher's answser on 4/23/09 to a similar problem; basically
you just register a function on the "onscroll" event of the scrolled pane an
It works for me, let me know if it's the same for you.
Thank's a lot to Chris...
- Show quoted text -
On Thu, Apr 23, 2009 at 11:32:55AM -0400, ashley_c_mort wrote:
> Hello all. I am relatively new to OpenLayers and have a quick question.
> I have an OpenLayers map within a page that contains scrollbars. If I
> scroll within my webpage, my OpenLayers getMousePosition() XY coordinates
> are off by the amount that I scrolled. Is there an OpenLayers
> for this? Or is the solution just to keep the OpenLayers map within a
> container with no scrollbars at all times?
call map.updateSize() on the map after the pane is scrolled, perhaps? We
may only look at scroll distances at the document level; I don't recall
looking into this issue on sub-panes before.
On Tue, Dec 29, 2009 at 2:28 PM, Ringdahl Niklas
<Niklas.Ringdahl at sweco.se>wrote:
> I am also experiencing an issue that sounds like yours. I am using a UI
> framework (JSF) that opens the map in a floating div (imitating a window),
> and when the underlying page is scrolled, the zoom box appears below the
> mouse pointer. I realized recently that the distance is equal to the amount
> of scrolled pixels, as if the map object believes that is being scrolled
> down with the page.
> course, but if anyone has a neat little trick to solve this, that would be
> highly appreciated.
> - Niklas
> *Från:* dev-bounces at openlayers.org [mailto:dev-bounces at openlayers.org] *För
> *Gianni Barrotta
> *Skickat:* den 23 december 2009 18:45
> *Till:* Dev at openlayers.org
> *Ämne:* [OpenLayers-Dev] Probable draw issue
> I've experienced a problem when the Map is inside a div whoose css style
> have a "overflow-y:auto" property.
> *<div style="height:600px;overflow-y:auto;">
> <div id="map"></div>
> If I scrooll down the div with the overflow, the bbox (and the draw
> controls too) appears to be shifted down of the number of pixel of the
> Does anyone experienced something like this?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Dev