Skip to content

Instantly share code, notes, and snippets.

@tmcw
Created March 31, 2014 21:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tmcw/9902640 to your computer and use it in GitHub Desktop.
Save tmcw/9902640 to your computer and use it in GitHub Desktop.
Gist from mistakes.io
void require('https://rawgithub.com/mapbox/node-sphericalmercator/master/sphericalmercator.js')
var sph = new SphericalMercator();
var zoom = 10;
tl = sph.px([0, 20], zoom);
br = sph.px([10, 0], zoom);
((br[0] - tl[0]) / 256) * ((br[1] - tl[1]) / 256)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment