Created
January 21, 2011 18:46
-
-
Save willwhite/790163 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SphericalMercator.prototype.envelope_to_xyz = function(bbox, minzoom, maxzoom) { | |
var ll0 = [bbox[0],bbox[3]] | |
var ll1 = [bbox[2],bbox[1]] | |
var that = this; | |
_.range(minzoom, maxzoom+1).forEach(function(z) { | |
px0 = that.ll_to_px(ll0,z); | |
px1 = that.ll_to_px(ll1,z); | |
_.range(px0[0]/256.0, px1[0]/256.0+1).forEach(function(x) { | |
console.log(x); | |
}) | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment