cho*_*ise 18 api yahoo latitude-longitude
我搜索了一段时间但没有发现任何东西,这与我的问题相似.
我正在尝试使用YAHOO Weather API,例如:http://weather.yahooapis.com/forecastrss?w = 4097
在我的情况下,我不知道WOEID,但我得到了纬度和经度点.
所以我的问题是:有没有办法通过使用纬度和长点获得一个地方的WOEID?
Ahm*_*dal 11
雅虎 PlaceFinder API允许您为纬度/经度对找到相应的WOEID.考虑这个示例Web服务方法调用:
http://where.yahooapis.com/geocode?location=37.42,-122.12&flags=J&gflags=R&appid=zHgnBS4m
Run Code Online (Sandbox Code Playgroud)
您可以根据需要使用请求参数,请参阅Yahoo! PlaceFinder API文档了解更多信息.你应该用你的雅虎取代appid!appid,你可以在这里创建一个.
此请求返回类似的响应,其中包含许多有用的数据以及WOEID:
{
"ResultSet": {
"version": "1.0",
"Error": 0,
"ErrorMessage": "No error",
"Locale": "us_US",
"Quality": 99,
"Found": 1,
"Results": [
{
"quality": 99,
"latitude": "37.420000",
"longitude": "-122.120000",
"offsetlat": "37.420000",
"offsetlon": "-122.120000",
"radius": 500,
"name": "37.42,-122.12",
"line1": "3589 Bryant St",
"line2": "Palo Alto, CA 94306-4207",
"line3": "",
"line4": "United States",
"house": "3589",
"street": "Bryant St",
"xstreet": "",
"unittype": "",
"unit": "",
"postal": "94306-4207",
"neighborhood": "",
"city": "Palo Alto",
"county": "Santa Clara County",
"state": "California",
"country": "United States",
"countrycode": "US",
"statecode": "CA",
"countycode": "",
"hash": "",
"woeid": 12797284,
"woetype": 11,
"uzip": "94306"
}
]
}
}
Run Code Online (Sandbox Code Playgroud)
这不是使用雅虎的API,但我发现这篇博文:http: //geomojo.org/?p = 38
提及此服务:http://www.geomojo.org/cgi-bin/reversegeocoder.cgi? long = -117.699444&la = 35.4775
也许你可以使用它?它解决了我的问题,我希望它有助于解决你的问题.
归档时间: |
|
查看次数: |
41669 次 |
最近记录: |