PHP经纬座标转地名(通过腾讯地图接口),函数来源:梦行云软件

function get_gps_to_name_tx($location,$key){
	$url='https://apis.map.qq.com/ws/geocoder/v1/?location='.$location.'&key='.$key.'&get_poi=1&poi_options=policy=2';
	$c= file_get_contents($url);
	$c=json_decode($c,1);
	if(isset($c['result']['pois'][0]['title'])){
		return $c['result']['pois'][0]['title'];
	}
	return '';
}

  

posted @ 2020-10-02 16:20  Monxin梦行云软件  阅读(154)  评论(0编辑  收藏  举报