read

Took me a while to wrap my head around this: I tried to draw a circle around a specific coordinate (latitude & longitude) on a (google maps like) map. My first attempt was: EARTH_CIRCUMFERENCE / 2 ^ ZOOM_LEVEL / TILE_SIZE

which resulted in a circle whose radius was off by about 20% in my tests. ( South Germany; 500m radius ).

of course I had to factor in that this assumes we're on the equator. To account the current latitude (for the circles' center) I modified the formula:

EARTH_CIRCUMFERENCE * cos(Latitude * PI / 180) / 2 ^ ZOOM_LEVEL / TILE_SIZE

Back to Overview