Marcelo, I don't understand the frustration. I was genuinely
appreciative of your suggestion, enough so that I will be taking the
time to implement it. Surely you can understand that the existence of
a better solution than that which you suggested may exist, and if so I
would be interested in finding it.

On Mar 5, 8:09 am, Marcelo <[email protected]> wrote:
> On Mar 5, 4:32 pm, ShaneB <[email protected]> wrote:
>
> > I am hoping for
> > a more elegant solution.
>
> Sometimes, I really don't understand why I bother responding.
>
> --
> Marcelo -http://maps.forum.nu
> --
>
>
>
> > On Mar 5, 1:32 am, Marcelo <[email protected]> wrote:
>
> > > On Mar 5, 4:16 am, ShaneB <[email protected]> wrote:
>
> > > > What I want to do is change this behavior to more closely match what
> > > > is seen on maps.google.com. On that site, when you open/close the
> > > > menu, the right edge of the map stays fixed and instead the map
> > > > expands on the left.
>
> > > > The difference is, on my map the location of the markers on your
> > > > screen changes, and on maps.google.com they stay fixed.
>
> > > What you need to do is to change the center of the map by half the
> > > pixel width of the sidebar.
>
> > > 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(),m
> > >  ap.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
> > > --

-- 
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