当我尝试使用gFlags查询时,使用Yahoo,什么都不会返回。https://developer.yahoo.com/yql/console/?debug=true#h=select+*+from+geo.placefinder+where+text%3D%2237.416275%2C-122.025092%22+and+gflags%3D'R‘
响应:
<?xml version="1.0" encoding="UTF-8"?>
<query xmlns:yahoo="http://www.yahooapis.com/v1/base.rng"
yahoo:count="0" yahoo:created="2016-01-20T16:07:28Z" yahoo:lang="en-US">
<diagnostics>
<publiclyCallable>true</publiclyCallable>
<url execution-start-time="16" execution-stop-time="21"
execution-time="5" http-status-code="503" http-status-message="Service Unavailable"><![CDATA[http://gws2.maps.yahoo.com/findlocation?pf=1&locale=en_US&offset=15&flags=&q=37.416275%2c-122.025092&gflags=R&start=0&count=100]]></url>
<user-time>22</user-time>
<service-time>5</service-time>
<build-version>0.2.376</build-version>
</diagnostics>
<results/>
</query>当我删除gFlags时,就会有一个成功的结果。示例:https://developer.yahoo.com/yql/console/?debug=true#h=select+*+from+geo.placefinder+where+text%3D%2237.416275%2C-122.025092%22
我需要使用gFlags来访问woeid属性(根据docs:YQL.html,从POI )
发布于 2016-01-21 16:35:29
昨天玩了很多次之后,我发现geo.placefinder表什么也不返回,但geo.places表却返回任何内容。因此,您可以将查询更改为"select * from geo.places(1) where.“请注意,结果的格式略有不同。
另外,我注意到,在经过纬度和经度时,一定要在它周围加上括号。例如text=“(111.111,222.22222)”
因此,要将您的原始查询重新发布到工作位置(请注意,在lat/lng周围没有更多的GFlags参数和括号):
+from+geo.places(1)+where+text%3D%22(37.416275%2C-122.025092)%22
发布于 2016-01-21 09:46:26
对于我来说,一个运行良好的查询现在返回null。从纬度/经度向外撤退的内部调用似乎在雅虎服务器内部没有成功。但是,这个调用在我的机器上运行得很好:
US&offset=15&flags=&q=48.136757%2c-1.622015&gflags=R&start=0&count=100
因此,解决办法是首先调用findLocation服务,然后使用woeid调用天气服务。今天试过了,效果很好。
https://stackoverflow.com/questions/34904938
复制相似问题