Number of Zoom Levels in TMS
In the TMS protocol zoom level 0 (z=0) returns the lowest zoom, which is a single tile showing the world map. Zoom level 21 (z=21) returns Nearmap's imagery at approximately 7.5cm for the given tile coordinates. The maximum zoom level is 24, but in most areas the returned imagery would be upscaled imagery from zoom level 21. Below is a graph showing the zoom level, the pixel size at each zoom level, the tile edge size and the area covered by each tile:
Zoom | Pixel Size (m) (At Equator) | Tile Edge Size (m) | Area covered by tile (m2) |
0 | 155,495.018 | 39,806,724.67 | 1584575329188990.00 |
1 | 77,747.509 | 19,903,362.34 | 396143832297249.00 |
2 | 38,873.755 | 9,951,681.17 | 99035958074312.20 |
3 | 19,436.877 | 4,975,840.58 | 24758989518578.00 |
4 | 9,718.439 | 2,487,920.29 | 6189747379644.51 |
5 | 4,859.219 | 1,243,960.15 | 1547436844911.13 |
6 | 2,429.610 | 621,980.07 | 386859211227.78 |
7 | 1,214.805 | 310,990.04 | 96714802806.95 |
8 | 607.402 | 155,495.02 | 24178700701.74 |
9 | 303.701 | 77,747.51 | 6044675175.43 |
10 | 151.851 | 38,873.75 | 1511168793.86 |
11 | 75.925 | 19,436.88 | 377792198.46 |
12 | 37.963 | 9,718.44 | 94448049.62 |
13 | 18.981 | 4,859.22 | 23612012.40 |
14 | 9.491 | 2,429.61 | 5903003.10 |
15 | 4.745 | 1,214.80 | 1475750.78 |
16 | 2.373 | 607.40 | 368937.69 |
17 | 1.186 | 303.70 | 92234.42 |
18 | 0.593 | 151.85 | 23058.61 |
19 | 0.297 | 75.93 | 5764.65 |
20 | 0.148 | 37.96 | 1441.16 |
21 | 0.074 | 18.98 | 360.29 |
22 | 0.037 | 9.49 | 90.07 |
23 | 0.019 | 4.75 | 22.52 |
24 | 0.009 | 2.37 | 5.63 |
Maximum X and Y Values in TMS
TMS splits a map into a pyramid of 256x256-pixel map tiles at multiple zoom levels. Thus, the maximum x and y values depend on the specified z value.
We use Google’s XYZ tile referencing scheme. The Google Maps Javascript API developer documentation has a page on Map Types with a section on Tile Coordinates which explains how to get the X and Y values under Google’s XYZ tile referencing scheme.
In that section, you can view a dynamic example based in Chicago. As you zoom in and out of this map, the tile coordinates change for the same point (Chicago) on the map at different zooms.
The X and Y coordinates, and consequently their maximum values, depend on the z value. Specifically:
Max X = Max Y = (2^z)-1
So, for example, at z=21, max X and Y values are both (2^21)-1 = 2,097,151.
http://www.maptiler.org/google-maps-coordinates-tile-bounds-projection/ is a useful site that gives the tile reference (use the Google values not the TMS values) for any location in the world at any zoom.