Re: [OpenLayers-Dev] addOptions and redraw

2012-04-12 Thread Bart van den Eijnden
To finally end this thread, I was unable to reproduce the displacement in a plain OpenLayers example. If I swap the Google base layer in GXP with Bing all is fine, so it must be related to the GXP-Google combination. Best regards, Bart -- Bart van den Eijnden OpenGeo - http://opengeo.org Expe

Re: [OpenLayers-Dev] addOptions and redraw

2012-04-12 Thread Bart van den Eijnden
Ofcourse this is not a solution either, since the layer will not automatically turn on again, and it will be unchecked in a layer manager. Best regards, Bart -- Bart van den Eijnden OpenGeo - http://opengeo.org Expert service straight from the developers. On Apr 12, 2012, at 9:31 AM, Bart va

Re: [OpenLayers-Dev] addOptions and redraw

2012-04-12 Thread Bart van den Eijnden
Hi Eric, the displacement issue was caused by calling display on the layer. If I use setVisibility all is fine. layer.setVisibility(layer.calculateInRange()); I'll open up a ticket for the alwaysInRange issue. Best regards, Bart -- Bart van den Eijnden OpenGeo - http://opengeo.org Expert ser

Re: [OpenLayers-Dev] addOptions and redraw

2012-04-11 Thread Eric Lemoine
On Wednesday, April 11, 2012, Bart van den Eijnden wrote: > Just tested, using map.setCenter() does not work. > > I guess it's because the code block is protected by zoomChanged and > centerChanged, and none of them changed in this case. > You're right. Sorry for the wrong path. > -- Eric Le

Re: [OpenLayers-Dev] addOptions and redraw

2012-04-11 Thread Bart van den Eijnden
Just tested, using map.setCenter() does not work. I guess it's because the code block is protected by zoomChanged and centerChanged, and none of them changed in this case. https://github.com/openlayers/openlayers/blob/master/lib/OpenLayers/Map.js#L1934 Would it not make sense to move this logic

Re: [OpenLayers-Dev] addOptions and redraw

2012-04-11 Thread Eric Lemoine
On Wed, Apr 11, 2012 at 4:26 PM, Eric Lemoine wrote: > On Wed, Apr 11, 2012 at 3:48 PM, Bart van den Eijnden > wrote: >> Hey Eric, >> >> right, what I am doing now is calling display in the following way: >> >> layer.display(layer.calculateInRange()); >> >> but it feels a bit weird to do it this

Re: [OpenLayers-Dev] addOptions and redraw

2012-04-11 Thread Eric Lemoine
On Wed, Apr 11, 2012 at 3:48 PM, Bart van den Eijnden wrote: > Hey Eric, > > right, what I am doing now is calling display in the following way: > > layer.display(layer.calculateInRange()); > > but it feels a bit weird to do it this way. Yes, that's ugly. We really provide a better way to handle

Re: [OpenLayers-Dev] addOptions and redraw

2012-04-11 Thread Bart van den Eijnden
Hey Eric, right, what I am doing now is calling display in the following way: layer.display(layer.calculateInRange()); but it feels a bit weird to do it this way. With out of sync I mean indeed being displaced, so that's similar to what your github issue describes. Thanks for the pointer I'll

Re: [OpenLayers-Dev] addOptions and redraw

2012-04-11 Thread Eric Lemoine
On Wednesday, April 11, 2012, Bart van den Eijnden wrote: > Hey Eric, > > thanks for your quick replies being at FOSS4GNA. > > I wasn't, and mainly because I was looking at Layer.js where redraw has no > argument: > > > https://github.com/openlayers/openlayers/blob/master/lib/OpenLayers/Layer.js#L

Re: [OpenLayers-Dev] addOptions and redraw

2012-04-11 Thread Bart van den Eijnden
Hey Eric, thanks for your quick replies being at FOSS4GNA. I wasn't, and mainly because I was looking at Layer.js where redraw has no argument: https://github.com/openlayers/openlayers/blob/master/lib/OpenLayers/Layer.js#L553 But I see HTTPRequest has the boolean argument: https://github.com/

Re: [OpenLayers-Dev] addOptions and redraw

2012-04-11 Thread Eric Lemoine
On Wednesday, April 11, 2012, Bart van den Eijnden wrote: > Another related question to my previous post. > > So I've worked around the previous issue by clearing alwaysInRange before > calling addOptions. > > Then when I pass in minScale and maxScale options to addOptions that > effectively will

[OpenLayers-Dev] addOptions and redraw

2012-04-11 Thread Bart van den Eijnden
Another related question to my previous post. So I've worked around the previous issue by clearing alwaysInRange before calling addOptions. Then when I pass in minScale and maxScale options to addOptions that effectively will make the layer be out of scale, nothing happens, even after calling