English 中文(简体)
2. 刚从浮桥皮/YQL取出的城镇/城市
原标题:Extract just town/city from flickr api/YQL

我正试图写一本只归还一个村民、城镇或城市的文字。 我正在使用以下YQL询问,但console的结果太具体,给我留下了第一。

select * from flickr.places where lat=51.558418 and lon=-1.781985 and api_key=YOU_FLICKR_API_KEY

这里是我对青少年的询问结果。

<?xml version="1.0" encoding="UTF-8"?>
<query xmlns:yahoo="http://www.yahooapis.com/v1/base.rng"
    yahoo:count="1" yahoo:created="2011-10-25T09:35:50Z" yahoo:lang="en-US">
    <diagnostics>
        <publiclyCallable>true</publiclyCallable>
        <url execution-start-time="1" execution-stop-time="123" execution-time="122"><![CDATA[http://api.flickr.com/services/rest/?method=flickr.places.findByLatLon&lat=51.558418&lon=-1.781985]]></url>
        <user-time>124</user-time>
        <service-time>122</service-time>
        <build-version>22535</build-version>
    </diagnostics> 
    <results>
        <places accuracy="16" latitude="51.558418" longitude="-1.781985" total="1">
            <place latitude="51.547" longitude="-1.802"
                name="West Leaze, Swindon, England, GB, United Kingdom"
                place_id="sddCvK9SW703gg" place_type="neighbourhood"
                place_type_id="22"
                place_url="/United+Kingdom/England/Swindon/West+Leaze"
                timezone="Europe/London" woeid="39722"/>
        </places>
    </results>
</query>

我想能够改变问题中的类型。 我知道,我可以利用reg来孤立无援,但我不敢肯定,这是否会为所有地点工作,因此我更愿意让大会党仅仅恢复我所期望的结果。

最佳回答

缩略语

http://www.un.org/Depts/DGACM/index_french.htm

位置信息的准确性。 世界一级为1,国家为3,地区为6,城市为11,街为16。 目前范围为1-16。 缺省是16个。

flickr.places.FindByLatLon

Putting that to use is as simple as providing accuracy =n in your where clause. A value of around 10 looks to be about the accuracy that you are looking for, but experiment to see what is best.

select * from flickr.places where 
lat=51.558418 and lon=-1.781985 and api_key=API_KEY_HERE
and accuracy=10

<>Aside

YQL表格所使用的数据来源/服务的文件一般可以通过查阅表格说明获得。

desc flickr.places

这提供了大量信息,通常包括与文件页至少一个链接。 见meta section for the documentationURL items。

“desc

问题回答

暂无回答




相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签