当我尝试使用gFlags查询时使用Yahoo YQL没有返回。 https://developer.yahoo.com/yql/console/?debug=true#h=select+ * + from + geo.placefinder +其中+ text%3D%2237.416275%2C-122.025092%22 +和+ 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 +其中+ text%3D%2237.416275%2C-122.025092%22
我需要使用gFlags来访问woeid属性(来自POI,根据文档: https : //developer.yahoo.com/boss/geo/docs/free_YQL.html )
Using Yahoo YQL when I try to query using gFlags nothing returns. 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'
Response:
<?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>When I remove gFlags, there's a succesfull result. Example: https://developer.yahoo.com/yql/console/?debug=true#h=select+*+from+geo.placefinder+where+text%3D%2237.416275%2C-122.025092%22
I need to use gFlags to access the woeid attribute (from the POI, according to the docs: https://developer.yahoo.com/boss/geo/docs/free_YQL.html)
最满意答案
在昨天玩了很多次之后,我发现geo.placefinder表什么都没有返回,但geo.places表却没有。 因此,您可以将查询更改为“select * from geo.places(1)where ...”请注意,结果的格式略有不同。
另外,我注意到在经过纬度和经度时,一定要在它周围加上括号。 例如text =“(111.11111,222.22222)”
因此,要使用工作场所重新发布原始查询(请注意,不再有GFlags参数和lat / lng周围的括号):
https://developer.yahoo.com/yql/console/?debug=true#h=select+*+from+geo.places(1)+where+text%3D%22(37.416275%2C-122.025092)%22
After much playing yesterday, I discovered that the geo.placefinder table returns nothing, but the geo.places table does. So you can change your query to "select * from geo.places(1) where..." Just be aware that the results are formatted slightly differently.
Also, I noticed that when passing in latitude and longitude, be sure to include parentheses around it. E.g. text="(111.11111,222.22222)"
So, to repost your original query with the working places (notice there is no more GFlags parameter and the parentheses around the lat/lng):
https://developer.yahoo.com/yql/console/?debug=true#h=select+*+from+geo.places(1)+where+text%3D%22(37.416275%2C-122.025092)%22
更多推荐
发布评论