Coen de Jong, I also had this idea today :) but I was trying to find an other way. I agree with you and think that hide the map behind a div it's the only way. I'll do this
Thanks, Jonathan Roque On Feb 28, 8:38 pm, Coen de Jong <co.dej...@gmail.com> wrote: > What you can do is just to let the map extend behind a floated div that > would be your sidebar. I'm pretty sure google does it this way too. So the > map doesn't resize, but a part of the map is just hidden from your view. > You can do the same. Just show or hide a div that is on top of the map > element. The map element stretches behind the div element. > > > > > > > > On Tuesday, February 28, 2012 1:04:31 PM UTC+1, Jonathan Roque Santos wrote: > > > Hi Davie, > > > Thanks for your help. So, what I really want is to change the size > > without shaking the map :) If I use getCenter and setCenter the map > > will shake to the left and after to the center :). Have you seen the > > panel in the map of the maps.google.com? When click in the arrow to > > the left, just the panel goes and the map still in the same position > > just increasing to the left or this it just a effect? > > > Regards > > > Jonathan Roque > > > On Feb 27, 8:49 pm, davie <daviestrac...@yahoo.co.uk> wrote: > > > Hi > > > Try > > > > //Update current center info. > > > lastCenter=map.getCenter(); > > > > new google.maps.event.trigger(map,"resize"); > > > > // then add the event listener > > > google.maps.event.addListener(map, 'resize', function(){ > > > map.setCenter(lastCenter); > > > > }); > > > > Regards Davie -- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group. To post to this group, send email to google-maps-js-api-v3@googlegroups.com. To unsubscribe from this group, send email to google-maps-js-api-v3+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.