I have Google Maps loaded in a div, at 100% page width (via API). The overlay is located in the center, and the map should be located as shown. The problem is that the map is now aligned to the left.
I could move the center using LatLng corresponding to the page width, but this seems like a lot of work for a simple task. I was looking through the API link but could not find a solution.
Is there any way in the Maps API (v3) to place / align the map in / in the center?
Edit:
When resizing the browser window in this example:
http://econym.org.uk/gmap/example_fullscreen1.htm
The map is aligned to the edge of the window.
I want the center of the map to stay in the center of the window when resizing.
Thus, the map will move 100 pixels to the right if the window is 200 pixels wider.
source share