zoom to cursor calculation
4. Březen 2011 v 22:25
I want to be able to zoom in and out of the map using the scroll wheel. I want to zoom towards the cursor like Google Maps does, but I'm completely lost on how to calculate the movements.
So far, all I have is the resizing, but I now need to change the map position.
What I have: map x
and y
; map width
and height
; cursor x
and y
.
Any help would be most welcome.