Pois/add poi

跳转到: 导航, 搜索
第1行: 第1行:
== '''pois/postpoi''' ==
+
== '''pois/add_poi''' ==
 
提交POI点信息。请求必须用POST方式提交。
 
提交POI点信息。请求必须用POST方式提交。
  
 
== '''URL''' ==
 
== '''URL''' ==
http://api.map.sina.com.cn/pois/postpoi.php
+
http://api.map.sina.com.cn/pois/add_poi.php
  
 
== '''支持格式''' ==
 
== '''支持格式''' ==
第119行: 第119行:
 
== '''使用示例''' ==
 
== '''使用示例''' ==
 
<pre>
 
<pre>
curl -d "srcid=yb&name=理想国际大厦&address=北四环西路58号&city=北京&category=大厦&longitude=116.30995&latitude=39.98465" "http://api.map.sina.com.cn/pois/postpoi.php?source=appkey"
+
curl -d "srcid=yb&name=理想国际大厦&address=北四环西路58号&city=北京&category=大厦&longitude=116.30995&latitude=39.98465" "http://api.map.sina.com.cn/pois/add_poi.php?source=appkey"
 
</pre>
 
</pre>

2011年3月25日 (五) 17:46的版本

目录

pois/add_poi

提交POI点信息。请求必须用POST方式提交。

URL

http://api.map.sina.com.cn/pois/add_poi.php

支持格式

JSON

HTTP请求方式

POST

是否需要登录

false

请求参数

参数 必选 类型及范围 说明
source true string 申请应用时分配的AppKey
srcid true int 来源ID
name true string POI点名称
address true string POI点地址
category true string POI点类别,填写类别中文名 (详见分类代码对照表
city true string POI点城市,填写城市中文名 (详见城市代码对照表
longitude true float POI点经度 (如:116.30636)
latitude true float POI点维度 (如:39.84985)
telephone false int POI点电话
url false string POI点网址
tags false string POI点标签(根据类别填写标签,比如:湘菜,川菜)
description false string POI点介绍
traffic false string POI点交通情况描述(换乘,公交地铁到达)
pic_url false string POI点图片(输入图片路径,多张图片之间用“,”分割)
intro false string POI点其他特色信息(将特色信息组织成数组array('key1'=>value,'key2'=>value)后转成json格式存入)

返回结果

JSON示例

{
 "result":1,
 "info":"Submit success",
 "num":1
}

字段说明

result:结果标志 (1表示成功)
info:提示信息
num:结果总数

使用示例

curl -d "srcid=yb&name=理想国际大厦&address=北四环西路58号&city=北京&category=大厦&longitude=116.30995&latitude=39.98465" "http://api.map.sina.com.cn/pois/add_poi.php?source=appkey"