status == 'OK') { $location = $xml->result->geometry->location; $lat = rlat((string)$location->lat); $lng = rlng((string)$location->lng); } } else { $lat = rlat($_GET["lat"]); $lng = rlng($_GET["lng"]); } if($lat == ""){ $lat = rlat(38.2596); } if($lng == ""){ $lng = rlng(140.8799); } //�k�ڗ� $z = $_GET["z"]; if($z ==""){ $z = 15; } //�ړ���̈ʒu���v�Z $top = adjust($lng, $lat, 0, -100, $z); $bottom = adjust($lng, $lat, 0, 100, $z); $left = adjust($lng, $lat, -100, 0, $z); $right = adjust($lng, $lat, 100, 0, $z); $url = "http://saqoo.sh/a/labs/to-reru/?lat=" . $lat . "&lng=" . $lng; $mailto = "mailto:?body=" . urlencode($url); /* function adjust $x:���S�̌o�x $y:���S�̈ܓx $deltaX:���炵��������(�s�N�Z���P��) $deltaY:���炵��������(�s�N�Z���P��) $z:�Y�[�� �߂�l array("x"=>"�ړ���̌o�x","y"=>"�ړ���̈ܓx"); */ function r($val) { return round($val * 1000) / 1000; } function rlng($lng) { return r(round($lng / 0.004291534423828125) * 0.004291534423828125); } function rlat($lat) { return r(round($lat / 0.0035230795686373995) * 0.0035230795686373995); } function adjust($x,$y,$deltaX,$deltaY,$z){ $offset = 268435456; $radius = $offset / pi(); $x = ((round(round($offset + $radius * $x * pi()/180)+($deltaX << (21-$z))) - $offset) / $radius) * 180 / pi(); $y = (pi() / 2 - 2 * atan(exp((round(round($offset - $radius * log((1 + sin($y * pi() / 180))/(1 - sin($y * pi() / 180))) / 2)+($deltaY << (21-$z))) - $offset) / $radius))) * 180 / pi(); $xy = array("x" => rlng($x), "y" => rlat($y)); return $xy; } ?> ���k�n�������m���n�k�F�ʍs���я��i�g�єŁj Google�����̎����Ԓʍs���я��ϯ�߂��ł��܂����B


4:�� 2:�� 8:�� 6:��
�����߰�ނ�Ұق���

���̃T�C�g�͎�ɋً}�ԗ��p�ł��B�{�����e�B�A�ɂ��a�؂��ً}�������~�߂܂��B�䗯�Ӊ������B