//获取经纬度腾讯
php代码
private function get_lng_lat_tx($address){ $url = "https://apis.map.qq.com/ws/geocoder/v1/?address='地址'&key='key值(字符串)'"; $result = curl_get($url); if($result) { $data = array(); $res= json_decode($result,true); if ($res['status'] == 0) { $results = $res['result']; $data['lng'] = $results['location']['lng']; $data['lat'] = $results['location']['lat']; } return $data; } else{ return 0; } }