Zoom and pan in animated HTML5 canvas
Here’s one technique for zooming at a point: Drawing the map Simplify things by not using transforms to draw the map (no need for translate,scale!). All that’s needed is the scaling version of context.drawImage. What you do is scale the original map to the desired size and then pull it upward and leftward from the … Read more