你的浏览器禁用了JavaScript, 请开启后刷新浏览器获得更好的体验!
输入关键字进行搜索
搜索:
没有找到相关结果
zkbhj - 凯冰科技站长
赞同来自:
<?php function getPositionByMercator($mercator, $scale) { return [floor($mercator[0]/$scale), floor($mercator[1]/$scale)]; } function getIndexByMercator(array $mercator, $scale){ $pos = getPositionByMercator($mercator, $scale); return ($pos[0]<<24)+$pos[1]; } function getMercatorByLngLat(array $lngLat) { $PI = pi(); $x = number_format ($lngLat[0]*20037508.34/180,6, '.', ''); $y = log(tan((90+$lngLat[1])*$PI/360))/($PI/180); $y = number_format($y*20037508.34/180, 6, '.', ''); return [$x, $y]; } function getIndexByLngLat(array $lngLat, $scale) { return getIndexByMercator(getMercatorByLngLat($lngLat), $scale); } $location = [117.279336,39.083255]; $cellid = getIndexByLngLat($location, 200); //1095166352500 echo $cellid; ?>
要回复问题请先登录或注册
凯冰科技站长
1 个回复
zkbhj - 凯冰科技站长
赞同来自: