How to zoom with mouse in OpenLayers so that the mouse points to the same place before and after zooming (a la Google Maps)?
I'm having a tough time changing the zoom method of my OpenLayers map. If you were to go开发者_StackOverflow to Google Maps right now and double click on London on the map to zoom, the mouse cursor is pointing at London after the zoom operation has completed. In OpenLayers, if I double click on London, my mouse cursor is nowhere near London because the map now has London in the centre of the viewport. Is there an easy way of accomplishing this? Thanks!
Without seeing your code I'll make an assumption that you are using OpenLayers.Control.MouseDefaults for navigation and it works the way you described(I think it will be deprecated in coming versions). To have Google Maps-like zoom in functionality you should use OpenLayers.Control.Navigation control.
精彩评论