Skip to content

Commit

Permalink
fix baidu map (#481)
Browse files Browse the repository at this point in the history
Co-authored-by: 孙永强 <11704063+s-yongqiang@user.noreply.gitee.com>
  • Loading branch information
awu0403 and 孙永强 authored Feb 24, 2025
1 parent a747214 commit cb05e94
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions repo_metadata/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ def get_location_from_map_service(point_key):
'output': 'json',
'location': point_key,
"coordtype": "wgs84ll",
'extensions_poi': '0'
'extensions_poi': '1'
}
try:
response = requests.get(BAIDU_MAP_URL, params=params, timeout=30)
if response.status_code == 200:
data = response.json()
if data.get('status') == 0:
return {
'address': data['result']['formatted_address'],
'address': data['result']['formatted_address_poi'],
'country': data['result']['addressComponent']['country'],
'province': data['result']['addressComponent']['province'],
'city': data['result']['addressComponent']['city'],
Expand Down

0 comments on commit cb05e94

Please sign in to comment.