Skip to content

Comment on How Google Maps splits the world in 2^20 256x256 tiles (2006)parent

Comments

EDIT: "Each tile is 256 pixels square and the number of tiles across at each zoom level is given by this formula: Math.pow(2, zoom)"; ops I missed the word "across" :)

How did you come up with that number? The sum loop that follows reports 524287 tiles total.

#include <stdio.h> #include <math.h> int main(void) { int i; double tot = 0; for(i = 0; i <= 18; ++i) tot += exp2(i); printf("tot %f\n", tot); return 0; }

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.