2011-01-27 12 views

回答

0

是的,你可以檢索業務的列表在你的位置,你的查詢將如下,

MQL查詢:{"lat": 37.75629, "lon": -122.4213, "radius": "1km", "entity": [{"type": "business", "guid": null}]}

GeoAPI網址查詢: http://api.geoapi.com/v1/q?q=%7B%22lat%22%3A+37.75629%2C+%22lon%22%3A+-122.4213%2C+%22radius%22%3A+%221km%22%2C+%22entity%22%3A+%5B%7B%22type%22%3A+%22business%22%2C+%22guid%22%3A+null%7D%5D%7D&apikey=demo&pretty=1

這裏一個example

爲了得到一個感覺GeoAPI如何工作,下面是一些基本查詢。將查詢放在瀏覽器中以查看其JSON格式的結果。

* Search from a latitude, longitude coordinate pair: 
     o http://api.geoapi.com/v1/search?lat=37.75647&lon=-122.421218&radius=0.1km&apikey=demo&pretty=1 
* Get the parent entities of a lat, lon pair: 
     o http://api.geoapi.com/v1/parents?lat=37.563475&lon=-122.323219&apikey=demo&pretty=1 
* Get an entitys parents (in this case, the entity is Ritual Roasters in San Francisco, and its parents are the neighborhood and city its located in): 
     o http://api.geoapi.com/v1/e/ritual-coffee-roasters-san-francisco-ca-94110/parents?apikey=demo&pretty=1 
* Get information about a business (in this case, Ritual Roasters in San Francisco): 
     o http://api.geoapi.com/v1/e/ritual-coffee-roasters-san-francisco-ca-94110/view/listing?apikey=demo&pretty=1 
* Get information about an entity (in this case, San Francisco): 
     o http://api.geoapi.com/v1/e/san-francisco-ca?apikey=demo&pretty=1 
相關問題