block by mpmckenna8 12bfcf6cd85b7f205475

zooming with d3 geo

Full Screen

So In my previous examples I was trying to zoom using a handy little script made by Jason Davies. But I don’t think I was using it correctly and things were a little jenky so I tried to look for some other examples. Of course right in the docs there’s a link to https://github.com/mbostock/d3/wiki/Zoom-Behavior zoom behaviors of a bunch of different kinds.

Also there’s a little animation on the location dot using css. I hope this zoom method is a little less jenky especially in mobile browsers.

index.html

map.css

twomap.js

zoomed.js