[Google Maps API v3] Re: Map position when re-size

2012-02-28 Thread Jonathan Roque
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 wrote: > What you can do is just to let the map extend behind a

[Google Maps API v3] Re: Map position when re-size

2012-02-28 Thread Coen de Jong
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 elem

[Google Maps API v3] Re: Map position when re-size

2012-02-28 Thread Jonathan Roque
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 t

[Google Maps API v3] Re: Map position when re-size

2012-02-28 Thread davie
Hi If you look at https://beta.rti4.com.br/c3po/garbage/index.html you will see where the snippet goes Regards Davie On Feb 28, 12:53 am, Geoff Leff wrote: > Hi Davie, > > Thanks for the response..normally I would respond in the group but the post > was rejected as it's not the correct grou

Re: [Google Maps API v3] Re: Map position when re-size

2012-02-27 Thread Geoff Leff
Hi Davie, Thanks for the response..normally I would respond in the group but the post was rejected as it's not the correct group. Can you advise where in the code your snippet needs to go? I've tried adding it to the bottom of the javascript code but once I drag the marker nothing changes. T

[Google Maps API v3] Re: Map position when re-size

2012-02-27 Thread davie
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 subsc