//解密后的经纬度数据(火星坐标)
public function decode_poi($poi) {
$settings = array(
'digi' => 16,
'add' => 10,
'plus' => 7,
'cha' => 36,
'center' => array(
'lat' => 34.957995,
'lng' => 107.050781,
'isDef' => TRUE
)
);
$i = -1;
$h = 0;
$b = "";
$j = strlen($poi);
$g = ord($poi{$j - 1});
$c = substr($poi, 0, $j - 1);
$j--;
for ($e = 0; $e < $j; $e++) {
$d = base_convert($c{$e}, $settings['cha'], 10) - $settings['add'];
if ($d >= $settings['add']) {
$d = $d - $settings['plus'];
}
$b .= base_convert($d, 10, $settings['cha']);
if ($d > $h) {
$i = $e;
$h = $d;
}
}
$a = intval(substr($b, 0, $i), $settings['digi']);
$f = intval(substr($b, $i + 1), $settings['digi']);
$l = ($a + $f - intval($g)) / 2;
$k = ($f - $l) / 100000;
$l /= 100000;
$lat = $k;
$lon = $l;
return array($lon, $lat);
}