如果我使用YQL知道城市的纬度和经度,如何获取城市的WOEID?

最佳答案

使用YQL控制台,您可以搜索“placeTypeName.code”为7的最近地点

http://developer.yahoo.com/yql/console/

SELECT * FROM geo.places WHERE text="{$seedLat}, {$seedLong}" AND placeTypeName.code = 7

该查询的REST查询看起来像;
http://query.yahooapis.com/v1/public/yql?q=SELECT%20*%20FROM%20geo.places%20WHERE%20text%3D%22{$seedLat}%2C%20{$seedLong}%22%20AND%20placeTypeName.code%20%3D%207&format=json&diagnostics=true&callback=

显然用自己的坐标替换$seedLat$seedLong :)

关于yql - 雅虎YQL : find city WOEID by coordinates,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/10715381/

10-11 14:23