Venue Maps API Developer's Guide

Example Calculate Tile Address

--- JavaScript ---
var latRad, n, xTile, yTile,
  PI = Math.PI,
  lat = 52.519067, //latitude
  lon = 13.415851, //longitude
  z = 16; //zoom level
latRad = lat * PI/180;
n = Math.pow(2, z);
xTile = n * ((lon + 180)/360);
yTile = n * (1-(Math.log(Math.tan(latRad) + 1/Math.cos(latRad))/PI))/2;

--- Output ---
latRad = 0.9166306392255008
n = 65536
xTile = 35210.28114204445
yTile = 21493.148547728106
  

xTile and yTile are used as an input for the following step to generate their corresponding quadkey.