Pois/get poi
Zhangchao2 (讨论 | 贡献) (→pois/get_poi) |
Zhangchao2 (讨论 | 贡献) |
||
第1行: | 第1行: | ||
== '''pois/get_poi''' == | == '''pois/get_poi''' == | ||
− | + | 获取之前提交的POI信息。 | |
== '''URL''' == | == '''URL''' == | ||
− | http://api. | + | http://api.t.sina.com.cn/location/pois/get_poi.(json|xml) |
== '''支持格式''' == | == '''支持格式''' == | ||
第12行: | 第12行: | ||
== '''是否需要登录''' == | == '''是否需要登录''' == | ||
− | ''' | + | '''true''' |
== '''请求参数''' == | == '''请求参数''' == | ||
− | {| style="width:100%; height:100px | + | {| style="width:100%; height:100px;" border="1" cellspacing="0" cellpadding="0" |
− | ! style=" | + | ! style="width:20%" |参数 |
− | ! style=" | + | ! style="width:10%" |必选 |
− | ! style=" | + | ! style="width:20%" |类型及范围 |
− | ! style=" | + | ! style="width:50%" |说明 |
− | |- style=" | + | |- style="height:px" |
− | | style="text-align:center | + | | style="text-align:center;" |source |
− | | style="text-align:center | + | | style="text-align:center;" |true |
− | | style="text-align:center | + | | style="text-align:center;" |string |
| 申请应用时分配的AppKey | | 申请应用时分配的AppKey | ||
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
+ | | style="text-align:center;" |srcids | ||
+ | | style="text-align:center;" |true | ||
+ | | style="text-align:center;" |string | ||
+ | | 需查询来源ID(多个ID之间用“,”分割;多个ID中只要出现之前未上传的ID则无结果返回) | ||
|} | |} | ||
第37行: | 第36行: | ||
=== '''XML示例''' === | === '''XML示例''' === | ||
<pre> | <pre> | ||
− | < | + | <?xml version="1.0" encoding="UTF-8" ?> |
− | + | <geoResult> | |
− | + | <num>2</num> | |
<pois> | <pois> | ||
<poi> | <poi> | ||
第61行: | 第60行: | ||
... | ... | ||
</pois> | </pois> | ||
− | </ | + | </geoResult> |
</pre> | </pre> | ||
第67行: | 第66行: | ||
<pre> | <pre> | ||
{ | { | ||
− | |||
"num":2, | "num":2, | ||
"pois": | "pois": | ||
第92行: | 第90行: | ||
] | ] | ||
} | } | ||
+ | |||
</pre> | </pre> | ||
=== '''字段说明 ''' === | === '''字段说明 ''' === | ||
− | |||
:num:结果总数 | :num:结果总数 | ||
:pois:结果集 | :pois:结果集 | ||
第111行: | 第109行: | ||
::description: POI点介绍 | ::description: POI点介绍 | ||
::traffic: POI点交通换乘描述 | ::traffic: POI点交通换乘描述 | ||
− | :: | + | ::deal:POI的处理状态(0:未处理;1:已处理但未生成SPID;2:已处理且生成SPID;3:已发布) |
− | + | ||
::spid:POI点的SPID | ::spid:POI点的SPID | ||
第119行: | 第116行: | ||
<pre> | <pre> | ||
json: | json: | ||
− | http://api. | + | curl -u "username:password" "http://api.t.sina.com.cn/location/pois/get_poi.json?srcids=20,21&source=appkey" |
xml: | xml: | ||
− | http://api. | + | curl -u "username:password" "http://api.t.sina.com.cn/location/pois/get_poi.xml?srcids=20,21&source=appkey" |
</pre> | </pre> |
2011年5月7日 (六) 00:03的版本
目录 |
pois/get_poi
获取之前提交的POI信息。
URL
http://api.t.sina.com.cn/location/pois/get_poi.(json%7Cxml)
支持格式
JSON|XML
HTTP请求方式
GET
是否需要登录
true
请求参数
参数 | 必选 | 类型及范围 | 说明 |
---|---|---|---|
source | true | string | 申请应用时分配的AppKey |
srcids | true | string | 需查询来源ID(多个ID之间用“,”分割;多个ID中只要出现之前未上传的ID则无结果返回) |
返回结果
XML示例
<?xml version="1.0" encoding="UTF-8" ?> <geoResult> <num>2</num> <pois> <poi> <srcid>20</srcid> <name>理想国际大厦</name> <address>北四环西路58号</address> <telephone/> <city>北京</city> <category>大厦</category> <longitude>116.30995</longitude> <latitude>39.98465</latitude> <intro/> <url/> <tags/> <description/> <traffic/> <pic_url/> <deal>0</deal> <spid/> </poi> ... </pois> </geoResult>
JSON示例
{ "num":2, "pois": [ { "srcid":"20", "name":"\u7406\u60f3\u56fd\u9645\u5927\u53a6", "address":"\u5317\u56db\u73af\u897f\u8def58\u53f7", "telephone":"", "city":"\u5317\u4eac", "category":"\u5927\u53a6", "longitude":"116.30995", "latitude":"39.98465", "intro":"", "url":"", "tags":"", "description":"", "traffic":"", "pic_url":"", "deal":"0", "spid":"" }, ... ] }
字段说明
- num:结果总数
- pois:结果集
- srcid: POI来源id
- name: POI点名称
- address: POI点地址
- telephone: POI点联系电话
- city: POI点城市
- category: POI点类别
- longitude: POI点经度
- latitude: POI点纬度
- intro:POI点其他特色信息
- url: POI点网址链接
- tags: POI点标签
- description: POI点介绍
- traffic: POI点交通换乘描述
- deal:POI的处理状态(0:未处理;1:已处理但未生成SPID;2:已处理且生成SPID;3:已发布)
- spid:POI点的SPID
使用示例
json: curl -u "username:password" "http://api.t.sina.com.cn/location/pois/get_poi.json?srcids=20,21&source=appkey" xml: curl -u "username:password" "http://api.t.sina.com.cn/location/pois/get_poi.xml?srcids=20,21&source=appkey"