以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  如果通过坐标数据获取百度地图中的地址  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=72530)

--  作者:kunmails
--  发布时间:2015/7/31 15:43:00
--  如果通过坐标数据获取百度地图中的地址
如何通过百度地图网页获取地址!

我在表A 的列1,中存储了坐标数据如 121.49237,31.21546

如何通过百度的网页坐标拾取系统反查获得真实地址 存入表A 的列2


图片点击可在新窗口打开查看此主题相关图片如下:3333333.jpg
图片点击可在新窗口打开查看


http://api.map.baidu.com/lbsapi/getpoint/index.html

--  作者:kunmails
--  发布时间:2015/7/31 15:50:00
--  
袍哥帮忙看下,怎么抓取网页中的数据呢!
--  作者:大红袍
--  发布时间:2015/7/31 16:37:00
--  

mark 百度地图Api

 

参考文档 http://developer.baidu.com/map/index.php?title=webapi/guide/webservice-geocoding

 

你去申请成为开发者,红色的替换成你自己key

 

http://api.map.baidu.com/geocoder/v2/?ak=hAaa2NLELKdAIfMhMjnuEgi1&output=json&location=39.91064,116.39925

 

做个简单的例子,如下

 

dim 纬度 as double = 39.91064
dim 经度  as double = 116.39925

Dim rqst As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create("http://api.map.baidu.com/geocoder/v2/?ak=hAaa2NLELKdAIfMhMjnuEgi1&output=json&location=" & 纬度 & "," & 经度)
Dim rsps As System.Net.HttpWebResponse = rqst.GetResponse
Dim stm As System.IO.Stream = rsps.GetResponseStream()
Dim reader As New System.IO.StreamReader(stm)
Dim json As String = reader.ReadToEnd
msgbox(json)
Dim ScriptControl As Object, data  As Object, JscriptCode As String
JscriptCode = "function toObject(json) {eval(""var o=""+json);return o;}"
ScriptControl = CreateObject("MSScriptControl.ScriptControl")
With ScriptControl
    .Language = "Javascript"
    .Timeout = -1
    .AddCode(JscriptCode)
    data = .Run("toObject", json)
End With

msgbox(data.status)
msgbox(data.result.formatted_address)


--  作者:桃花笑
--  发布时间:2018/5/7 15:46:00
--  
 请问你的嵌入百度地图能成功了么,可以分享一个能够正常定位的案例么,论坛上的案例我看了,但是我试了试,没有成功打开
--  作者:有点蓝
--  发布时间:2018/5/7 15:54:00
--  
怎么试的?写了什么代码?