Pois/get poi

跳转到: 导航, 搜索
(pois/get_poi)
第1行: 第1行:
 
== '''pois/get_poi''' ==
 
== '''pois/get_poi''' ==
读取新增POI数据信息,通过该接口返回进行地理编码、数据排重、信息整合、质量改进等处理后的新增POI数据信息,包括数据处理的状态信息,具体状态信息请查看字段说明。
+
获取之前提交的POI信息。
  
 
== '''URL''' ==
 
== '''URL''' ==
http://api.map.sina.com.cn/pois/get_poi.(json|xml)
+
http://api.t.sina.com.cn/location/pois/get_poi.(json|xml)
  
 
== '''支持格式''' ==
 
== '''支持格式''' ==
第12行: 第12行:
  
 
== '''是否需要登录''' ==
 
== '''是否需要登录''' ==
'''false'''  
+
'''true'''  
  
 
== '''请求参数''' ==
 
== '''请求参数''' ==
{| style="width:100%; height:100px;border:1px solid;" border="1" cellspacing="0" cellpadding="0"
+
{| style="width:100%; height:100px;" border="1" cellspacing="0" cellpadding="0"
! style="border:1px solid;text-align:center;width:20%" |参数  
+
! style="width:20%" |参数  
! style="border:1px solid;text-align:center;width:10%" |必选
+
! style="width:10%" |必选
! style="border:1px solid;text-align:center;width:20%" |类型及范围
+
! style="width:20%" |类型及范围
! style="border:1px solid;text-align:center;width:50%" |说明
+
! style="width:50%" |说明
|- style="border:1px solid;"  
+
|- style="height:px"  
| style="text-align:center;border:1px solid;" |source  
+
| style="text-align:center;" |source  
| style="text-align:center;border:1px solid;" |true
+
| style="text-align:center;" |true
| style="text-align:center;border:1px solid;" |string
+
| style="text-align:center;" |string
 
| 申请应用时分配的AppKey
 
| 申请应用时分配的AppKey
|-style="border:1px solid;"
 
| style="text-align:center;border:1px solid;" |srcids
 
| style="text-align:center;border:1px solid;" |true
 
| style="text-align:center;border:1px solid;" |string
 
| 需查询来源ID(多个ID之间用“,”分割)
 
 
|-
 
|-
 +
| 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>
<geoSearchResult>
+
<?xml version="1.0" encoding="UTF-8" ?>  
<result>1</result>
+
<geoResult>
<num>2</num>
+
<num>2</num>
 
  <pois>
 
  <pois>
 
   <poi>
 
   <poi>
第61行: 第60行:
 
   ...
 
   ...
 
</pois>
 
</pois>
</geoSearchResult>
+
</geoResult>
 
</pre>
 
</pre>
  
第67行: 第66行:
 
<pre>
 
<pre>
 
{
 
{
"result":1,
 
 
  "num":2,
 
  "num":2,
 
  "pois":
 
  "pois":
第92行: 第90行:
 
  ]
 
  ]
 
}
 
}
 +
 
</pre>
 
</pre>
  
 
=== '''字段说明 ''' ===
 
=== '''字段说明 ''' ===
:result:结果标志 (1表示成功)
 
 
:num:结果总数
 
:num:结果总数
 
:pois:结果集
 
:pois:结果集
第111行: 第109行:
 
::description: POI点介绍
 
::description: POI点介绍
 
::traffic: POI点交通换乘描述
 
::traffic: POI点交通换乘描述
::pic_url: POI点图片信息
+
::deal:POI的处理状态(0:未处理;1:已处理但未生成SPID;2:已处理且生成SPID;3:已发布)
::deal:POI的处理状态(0:未处理;1:已处理但未生成SPID;2:已处理且生成SPID;3:已发布;)
+
 
::spid:POI点的SPID
 
::spid:POI点的SPID
  
第119行: 第116行:
 
<pre>
 
<pre>
 
json:
 
json:
http://api.map.sina.com.cn/pois/get_poi.json?source=appkey&srcids=20,21
+
curl -u "username:password" "http://api.t.sina.com.cn/location/pois/get_poi.json?srcids=20,21&source=appkey"
  
 
xml:
 
xml:
http://api.map.sina.com.cn/pois/get_poi.xml?source=appkey&srcids=20,21
+
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"