var center = map.getCenter(); map.checkResize(); map.setCenter(center)
-- Marcelo - http://maps.forum.nu -- On Oct 21, 12:35 pm, John Cotton <[EMAIL PROTECTED]> wrote: > Hi > > I have a resizable container (much like the maps.google.co.uk). > > I noticed that Googe's map doesn't shift left when the panel hides, > and I want to do the same. > > I've coded this in the resize event: > > var pointPos = > g_googMap.fromLatLngToContainerPixel(g_googMap.getCenter()); > var newCenter = g_googMap.fromContainerPixelToLatLng(new > GPoint(pointPos.x + mapOffset, pointPos.y)); > > g_googMap.setCenter(newCenter); > > which does the job, but I get an unpleasant looking redraw of areas of > the map that don't need it. > > Google's flashes, but looks much cleaner. > > Does anyone know of a better approach than the above? > > Regards and thanks > > John --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
