----- Original Message ----- From: "Rossko" <[email protected]> To: "Google Maps API" <[email protected]> Sent: Sunday, February 08, 2009 5:42 PM Subject: Re: Strange zoom/setcenter problem
> > > Is it also possible somehow to setZoom(whatever) _and_ keep the > > position? > > You'd need to clear about what you mean by position. The geographic > position (i.e. lat/lng), or pixel (i.e. screen) position. The Pixel. What I wanted to achieve is to keep the mouse pointer, where the click appeared. With zoomIn() I'm exactler there, "where I came from". Now I want to change the zoom, lets say from 5 to 10 with one single call, but want to keep the mouse position. setCenter is not an option, because the area, which was formerly "under" the mouse, is shifted in the zoomed view (=centered). setZoom() is also not an option, because it zooms by keeping the center. What I want is exactly the zoomIn/zoomOut, but for more than one step. Running zoomIn in a loop is inefficient. Best scenario: Zoom from 5 to 10, move the clicked area into the center and position the mouse over the clicked, now zoomed position. But I think it is impossible to move the mouse with JS. Regards > position of the pointer, the position of some overlay object in focus, > or the centre of the map. > Mostly, maps applications keep screen position for the pointer at > least otherwise the "user experience" is a bit unpleasant because the > pointer appears to move around > > cheers, Ross K > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
