PHP地址名称转座标(腾讯地图接口),涵数来源:梦行云软件

function get_address_gps_tx($map_key,$address){ //地址名称转座标
    $r=file_get_contents('https://apis.map.qq.com/ws/geocoder/v1/?address='.$address.'&key='.$map_key);
    $r=json_decode($r,1);
    return $r;
    //$r['result']['location']['lng'] $r['result']['location']['lat'] 
}

 

posted @ 2020-10-03 11:24  Monxin梦行云软件  阅读(132)  评论(0编辑  收藏  举报