我正在使用以下YQL查询来获取天气信息
有没有办法使用经度,纬度作为YQL查询参数来获取天气信息。
答案 0 :(得分:2)
您可以使用子选择从纬度/经度对转到WOEID
SELECT * FROM weather.woeid
WHERE w IN (
SELECT place.woeid
FROM flickr.places(1)
WHERE (lat,lon) in (55.948503,-3.198931)
);
答案 1 :(得分:0)
这对我有用:
...
query = "SELECT * FROM weather.forecast " +
"WHERE woeid in (" +
"SELECT woeid " +
"FROM geo.places(1) " +
"WHERE text=\"(%1$s, %2$s)\") " +
"AND u='c'";
...然后:
query = String.format(query, location.getLatitude(), location.getLongitude());
答案 2 :(得分:-1)
我发现有些东西使用了ful;如果你需要预测天气yql使用了 SELECT * FROM weather.bylocation WHERE location ='Indonesia' select * from weather.forecast where location = 90210