#define tile2grid(tile) ((tile) << 3)
#define grid2tile(grid) ((grid) >> 3)
+
#define tile2pixel(tile) ((tile) << 8)
#define pixel2tile(pixel) ((pixel) >> 8)
+
#define tile2unit(tile) ((tile) << (8 + priv->zoom))
#define unit2tile(unit) ((unit) >> (8 + priv->zoom))
+
#define tile2zunit(tile, zoom) ((tile) << (8 + zoom))
#define unit2ztile(unit, zoom) ((unit) >> (8 + zoom))
#define grid2pixel(grid) ((grid) << 5)
#define pixel2grid(pixel) ((pixel) >> 5)
+
#define grid2unit(grid) ((grid) << (5 + priv->zoom))
#define unit2grid(unit) ((unit) >> (5 + priv->zoom))