[OpenLayers-Dev] Google layer and div resize: wrong config or bug?

Christopher Schmidt crschmidt at metacarta.com
Tue Feb 5 16:08:31 EST 2008


On Tue, Feb 05, 2008 at 09:44:35PM +0100, Diego Guidi wrote:
> Sorry for the cryptic post, I try to explain my problem and tomorrow I
> could send a sample code.
> I have a "terrible" bug and i need to know if it's due to my mistake
> or to a openlayers bug...
> I'm creating a website (using openlayers, of course!) that publish WMS
> data (from MapServer, but I'm using OpenLayers WMS layer).
> This data is published over Google layers: I've prepared three layers
> for satellite, maps, and hybrid google data.
> So when i use my website, the layerswitcher control shows three map
> data (from google) and a bunch of overlays.
> All works well (sorry, all works GREAT!), except...
> I'm using also ExtJS for create a flexible layout (something like
> this: http://extjs.com/deploy/dev/examples/feed-viewer/view.html),
> with a center div for openlayers and a right panel for additional
> data: the panel size is modifiable with a splitter... and here are the
> problems :(
> When i resize the splitter (and, i suppose, the center div size
> changes) the visible layers (one from google, and my data from WMS)
> are sized correctly, but when i try to show another basemap from
> google all the images are moved; looks like the tiles from google are
> in a wrong position, moved in the upper-left corner from a size that
> is not comparable to splitter move (i.e: if i move the splitter for 10
> pixels or 200 pixels, the layer movement looks the same).
> This problem is with IE7 and Firefox 2.0 (the only browser that I've tested).
> I think that the problem is not well explained, so tomorrow i could
> try to publish my website so anyone could see the problem abd look at
> the source code.
> Anyway, anyone has experienced my problem? Maybe should I simply call
> map.updateSize()?

Yes, this is a problem, it has been filed as a bug:

http://trac.openlayers.org/ticket/830

The patch there may be helpful. It looks unlikely at this point that a
more general fix will make it into 2.6, but it is possible, through some
other work that is being done.

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Dev mailing list