Skip to content

Commit

Permalink
upgrade geocoding service from v2 to v3
Browse files Browse the repository at this point in the history
  • Loading branch information
womeimingzi11 committed Sep 13, 2020
1 parent bea3930 commit 1c71ac1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/getCoordinate.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ getCoordinate.core = function(address, city=NULL,
address = gsub(' |#', '', address)

### url
url_head = paste0('http://api.map.baidu.com/geocoder/v2/?address=', address)
url_head = paste0('http://api.map.baidu.com/geocoding/v3/?address=', address)
if (!is.null(city)) url_head = paste0(url_head, "&city=", city)
url = paste0(url_head, "&output=", output, "&ak=", map_ak)

Expand Down

0 comments on commit 1c71ac1

Please sign in to comment.