-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
upgrade the API from v2.0 to v3.0 #4
base: master
Are you sure you want to change the base?
Conversation
Please notice, as the documents of Baidu Map API revealing the global reverse geocoding POI service is available after July 2, 2020, the AKs registered before then have no permission to use it by default. If anyone who needs to use the service for AKs registered before then, please go to the API console and select "global reverse geocoding POI service" for AKs, then this service will be available. So why should we switch the older reverse geocoding to the current version, viz., from v2.0 to v3.0? Because the 'reverse_geocoding/v3' entry has been removed from current documents, which means it has been already deprecated. |
Hey, thank you so much for bringing this to my attention. So I only have access to a key that was registered prior to 2019. For me, API calls made with
This is the same response reported in issue #5, so I assume the API is returning the same error response when you use a "new" key with the I worked on edits that will set a version ( |
@womeimingzi11 Opened a new PR off my branch, here. Give it a try and let me know if it works with a v3 AK key. |
@ChrisMuir I am so sorry for my unworkable PR. With your new branch, Unfortunatly,
I guess this is caused by the breaking upgrade of API of Baidu Map. I find the geocode and reverse-geocode services have been seperated in v3. For geocoding service, the base url is: And the argument name of address is For reverse geocoding service, the base url is: And the argument for coordinate is I hope that helps. To apologize for my unworkable PR again. |
No worries, your PR was still very helpful since it brought the issue to my attention. I don't personally use the Baidu API anymore, so was unaware of the upgrade, so thanks! And thank you for the feedback and details on the reverse geocoding, yeah I'm still using I actually can't get the Baidu API docs to load in my browser. This is the url constructor for v3 that I'm using (after updating the base url): uri <- paste0(
"http://api.map.baidu.com/reverse_geocoding/v3/?ak=",
"%s",
"&location=",
lat,
",",
lon,
"&output=json&coordtype=wgs84ll"
) I noticed in your notes, you indicated |
Oh! Yes you are right. I have confused by Baidu and AutoNavi API.
In this case, it should be latitude comma longitude.
…----------------------------------------------------
Chen Han
E-mail: [email protected]
School of Life Sciences, Lanzhou University, Lanzhou, 730000 P.R.China
2020年9月28日 +0800 PM11:41 Chris Muir <[email protected]>,写道:
No worries, your PR was still very helpful since it brought the issue to my attention. I don't personally use the Baidu API anymore, so was unaware of the upgrade, so thanks!
And thank you for the feedback and details on the reverse geocoding, yeah I'm still using http://api.map.baidu.com/geocoding/v3/ as the base url for the reverse geocoding calls, so that's probably what's causing the failures.
I actually can't get the Baidu API docs to load in my browser. This is the url constructor for v3 that I'm using (after updating the base url):
uri <- paste0(
"http://api.map.baidu.com/reverse_geocoding/v3/?ak=",
"%s",
"&location=",
lat,
",",
lon,
"&output=json&coordtype=wgs84ll"
)
I noticed in your notes, you indicated longitude comma latitude....is that accurate, according to the API docs? v2 required those values in the opposite order as the string latitude comma longitude.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Just pushed to my open branch/PR to update the reverse geocoding base url. Try pulling that down and giving that a test, when you get a chance. |
Sure!
I may work on it during Chinese National Festival.
…----------------------------------------------------
Chen Han
E-mail: [email protected]
School of Life Sciences, Lanzhou University, Lanzhou, 730000 P.R.China
在 2020年9月29日 +0800 AM6:30,Chris Muir <[email protected]>,写道:
Just pushed to my open branch/PR to update the reverse geocoding base url. Try pulling that down and giving that a test, when you get a chance.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Hello @womeimingzi11 , I'm going back through my old repos and wanted to check in with you on this. Did you ever have a chance to pull down the branch from my PR-6, to test the reverse geocoding? Thanks! |
Sorry, I don't have too many time to test this PR right away. And my
current work does not use this function. But when I have time, I may apply
some test.
Chris Muir ***@***.***> 于2023年12月20日周三 11:01写道:
… Hello @womeimingzi11 <https://github.com/womeimingzi11> , I'm going back
through my old repos and wanted to check in with you on this. Did you ever
have a chance to pull down the branch from my PR-6
<#6>, to test the reverse
geocoding? Thanks!
—
Reply to this email directly, view it on GitHub
<#4 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACO4PHLHXEJAF3BZDDG53BDYKJIJHAVCNFSM4QPWD7Y2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOBWGM3TONRUGUZA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
The Baidu Maps API geocoding services and reverse geocoding has been upgraded from v2 to v3. The v2.0 API is unavailable for users who registered after 2019.06.18. To guarantee the experience and availability, I highly recommend upgrading the API in baidugeo synchronously.