OOOHHHH, I see, I see!! :-)
I hadn't noticed that the map didn't re-center.

In that case, you need to do something like this:
Here we assume that the left column is 370 pixels wide.

When the left column collapses (map gets bigger to the left):
----------
var pt =
map.getCurrentMapType().getProjection().fromLatLngToPixel(map.getCenter(),map.getZoom());
var newpt =new GPoint(pt.x - Math.floor(370/2),pt.y);
var newCenter =
map.getCurrentMapType().getProjection().fromPixelToLatLng(newpt,map.getZoom());
map.checkResize();
map.setCenter(newCenter);
----------

and when the left column gets expanded you need to move the center in
the opposite direction.


--
Marcelo - http://maps.forum.nu
--





On Oct 21, 4:12 pm, Esa <[EMAIL PROTECTED]> wrote:
> On Oct 21, 3:58 pm, marcelo <[EMAIL PROTECTED]> wrote:
>
> > var center = map.getCenter();
> > map.checkResize();
> > map.setCenter(center)
>
> Yes, but that doesn't keep map stationary when the container is
> resized to one direction only. The behaviour on maps.google.com is
> mystique.
>
> javascript:void(prompt('lat, lng',
> gApplication.getMap().getCenter()));
> reveals that the center is moving but map doesn't move.
>
> To me it looks that there are actually two maps on the page.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to