首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何在iPhone中使用Geoapi搜索特定城市的业务?

如何在iPhone中使用Geoapi搜索特定城市的业务?
EN

Stack Overflow用户
提问于 2011-01-27 18:01:41
回答 1查看 128关注 0票数 0

谁能帮助我如何获得可在特定城市使用Geoapi.Is的商业列表,它可以检索使用GeoApi中的特定城市的商业列表。如果可能,请让我知道如何使用示例mql查询或url链接。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2011-01-28 11:07:48

是的,您可以检索您所在位置周围的企业列表,您的查询将如下所示,

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

GeoAPI url查询: 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格式的结果。

代码语言:javascript
复制
* 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
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/4814936

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档