SHARE
TWEET

Untitled

a guest Jul 27th, 2012 321 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.   $xtile = (($_GET['lon'] + 180) / 360) * pow(2, $zoom);
  2.   $ytile = (1 - log(tan(deg2rad($_GET['lat'])) + 1 / cos(deg2rad($_GET['lat']))) / pi()) /2 * pow(2, $zoom);
  3.   $rechts = $xtile + ($xtile/2);
  4.   $links = $xtile - ($xtile/2);
  5.   $oben = $ytile - ($ytile/2);
  6.   $unten = $ytile + ($ytile/2);
  7.   $n = pow(2, $zoom);
  8.   $lat_r = $rechts / $n * 360.0 - 180.0;
  9.   $lon_o = rad2deg(atan(sinh(pi() * (1 - 2 * $oben / $n))));
  10.   $lat_l = $links / $n * 360.0 - 180.0;
  11.   $lon_u = rad2deg(atan(sinh(pi() * (1 - 2 * $unten / $n))));
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top