Forum Moderators: open

Message Too Old, No Replies

Google Maps API change center

         

ogletree

4:56 pm on May 2, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I am working with the Google maps api. I have a page that loads with a map and it has a button to make it bigger. The only problem is I can't seem to make it recenter. It just makes the map bigger. If I move the map around and click the button again it goes back to the center as if the map was stil small. I guess what is happening is even though the map is bigger it still thinks the center is the center of when it was smaller. How can I center it when I make it bigger?

phranque

8:37 am on May 4, 2009 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



you might want to look at getCenter() [code.google.com] and setCenter [code.google.com].

ogletree

12:53 pm on May 4, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



actually I found it

checkResize() is what I needed