3 inline unsigned int xy2tile(unsigned int x, unsigned int y)
8 for (i = 15; i >= 0; i--)
10 tile = (tile << 1) | ((x >> i) & 1);
11 tile = (tile << 1) | ((y >> i) & 1);
17 inline unsigned int lon2x(double lon)
19 return round((lon + 180.0) * 65535.0 / 360.0);
22 inline unsigned int lat2y(double lat)
24 return round((lat + 90.0) * 65535.0 / 180.0);