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: [email protected] [mailto:[email protected]] On Behalf Of Andreas Hocevar Sent: Tuesday, November 29, 2011 1:12 PM To: Dan Ramage Cc: [email protected] 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 <[email protected]> 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 > [email protected] > http://www.geoext.org/cgi-bin/mailman/listinfo/users > > -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. _______________________________________________ Users mailing list [email protected] http://www.geoext.org/cgi-bin/mailman/listinfo/users
