[Users] Openlayers 2.11 and Map tabs

Dan Ramage dan at inlet.geol.sc.edu
Tue Nov 29 20:11:23 CET 2011


Further investigation shows that updateSize() doesn't do anything since
there is a check to see if the new size is the same as the old size.

setCenter() works if you give a LonLat that is different than the current.
My first test was to just use the center from the initial tab which worked,
I then tested by called map.getCenter() map.setCenter() and that didn't
work. 

Dan

-----Original Message-----
From: andreas.hocevar at gmail.com [mailto:andreas.hocevar at gmail.com] On Behalf
Of Andreas Hocevar
Sent: Tuesday, November 29, 2011 1:12 PM
To: Dan Ramage
Cc: users at geoext.org
Subject: Re: [Users] Openlayers 2.11 and Map tabs

Try to call map.updateSize() when you hit a tab for the first time.

Andreas.

On Tue, Nov 29, 2011 at 5:36 PM, Dan Ramage <dan at inlet.geol.sc.edu> wrote:
> I've been experimenting with OL2.11 and noticed that on my maps with tabs,
> when I open a different tab nothing happens in the map area. If I zoom,
then
> the map fills in(baselayers, WMS layers). Some bits of the map are present
> initially such as the Permalink and the Google logo for the baselayer.
>
>
>
> Seems like there might be an init function not being triggered.
>
>
>
>
>
> Dan
>
> _______________________________________________
> Users mailing list
> Users at geoext.org
> http://www.geoext.org/cgi-bin/mailman/listinfo/users
>
>



-- 
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.



More information about the Users mailing list