1): select * from geo.placefinder where text="Guangzhou"
2): select * from geo.placefinder where text="北京"
3): select * from geo.placefinder where text="39.9919336,116.3404132" and gflags = "R"
2,使用如下url查询城市的woeid:三种方法均可使用
https://query.yahooapis.com/v1/public/yql?q=select * from geo.placefinder where text="39.9919336,116.3404132" and gflags = "R"&format=json
https://query.yahooapis.com/v1/public/yql?q=select * from geo.placefinder where text="北京"&format=json
https://query.yahooapis.com/v1/public/yql?q=select * from geo.placefinder where text="Guangzhou"&format=json
注意使用经纬度获取woeid时一直取不到,后来才知道时缺少一个参数 fglags参数。,不许加 and gflags = "R"这一串才行