[OpenLayers-Users] panzoombar problem
Bart van den Eijnden (OSGIS)
bartvde at osgis.nl
Thu Mar 22 09:24:27 EDT 2007
Hi Schuyler,
thanks for the update. Your patch will only work for resize events and not
for text size increases/decreases if I interpret correctly?
I read in the ticket comments that updateSize is already a way for the
developer to update the position.
This is true for the map, but shouldn't controls also have a way to do this?
A problem right now (2.3) is that there is no standard interface to do this,
as you can see from the code fragment below which I used to workaround the
issue:
map.events.element.offsets = null;
overviewmap.ovmap.events.element.offsets = null;
for(var i=0; i< map.controls.length; i++) {
var control = map.controls[i];
if (control.divEvents) { control.divEvents.element.offsets =
null; }
if (control.elementEvents) {
control.elementEvents.element.offsets = null; }
if (control.rectEvents) { control.rectEvents.element.offsets =
null; }
}
Best regards,
Bart
--
Bart van den Eijnden
OSGIS, Open Source GIS
http://www.osgis.nl
--------- Oorspronkelijk bericht --------
Van: Schuyler Erle <sderle at metacarta.com>
Naar: Bart van den Eijnden OSGIS <bartvde at osgis.nl>
Cc: Christopher Schmidt <crschmidt at metacarta.com>, OpenLayers-Users
<users at openlayers.org>
Onderwerp: Re: [OpenLayers-Users] panzoombar problem
Datum: 22/03/07 10:47
> On Thu, 2007-03-22 at 13:13 +0100, Bart van den Eijnden (OSGIS) wrote:
> > I was too optimistic :-(
> >
> > There are nasty side-effects, especially when dragging the rectangle
in the
> > overview map. Panning in the main map by dragging ofcourse is also
quite a
> > bit slower.
> >
> > Is there any timeline for a fix? Seems to me this is a serious
problem. I
> > fear it is beyond my capabilities to provide a patch for this.
>
> Bart, if you have a look at #388, you'll see that I've written a patch
> that solves part of the problem:
>
> http://trac.openlayers.org/ticket/388
>
> Now that I think about it, perhaps we should also recalculate the
> screen offsets on zoom in/zoom out, and perhaps on every move start.
> This way if the screen positions get messed up, they won't stay messed
> up for very long, but we won't spend a whole lot of time while the user
> is dragging the map doing the recalculations.
>
> Opinions? I can write a patch for this and file it with #388 today.
>
> SDE
>
>
>
More information about the Users
mailing list