常用地址访问

localhost 访问:URL = http://gis.138.com
用户 访问:URL = http://192.168.4.222

标记功能

添加标记

注:接口更新,统一 点、线、面标注,修改Json格式,增加type,style,address

访问地址
HOST:URL/tpmarker/home/marker/setMarker

  • 请求方式:POST

老接口:改为setmarkertest

  • 参数:Json
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    * @param   string    title           标记标题
    * @param string detail 详情
    * @param string type 类型 默认为1 普通标记 type:1 num:0 动画导航标记 type:0 num:1-n
    * @param string cat_id 标签分类ID号
    * @param string img_server_url 图片服务器相对路径
    * @param string lng
    * @param string lat
    * @param string alt
    * @param string heading
    * @param string tilt pitch
    * @param string roll
    * @param int camType 标记点类型 默认值为1 1=点,0=巡航线区间,2=巡航线终点
    *
    * @return string attr_value

新接口

  • 参数:Json

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    {
    "marker":{
    "type": 2,
    "title": "测试标注9",
    "detail": "这是测试标注 这是测试标注这是测试标注这是测试标注这是测试标注这是测试标注这是测试标注这是测试标注",
    "cat_id": 2,
    "img_server_url": "201805/M_1527660821144.jpg",
    "style": "<style> 这是风</style>",
    "address": ""
    },
    "points":[
    {
    "num": 1, //序号
    "lng": 120.87543316699713,
    "lat": 30.825924029679964,
    "alt": 39.506303902711,
    "heading": 0.0,
    "pitch": -45.0,
    "roll": 0.0,
    "camType": 1 //巡航点起点
    },{
    "num": 2, //序号
    "lng": 120.87543316699713,
    "lat": 30.825924029679964,
    "alt": 39.506303902712,
    "heading": 0.0,
    "pitch": -45.0,
    "roll": 0.0,
    "camType": 0 //巡航点中间点
    },{
    "num": 3, //序号
    "lng": 120.87543316699713,
    "lat": 30.825924029679964,
    "alt": 39.506303902711,
    "heading": 0.0,
    "pitch": -45.0,
    "roll": 0.0,
    "camType": 0 //巡航点中间点
    },{
    "num": 4, //序号
    "lng": 120.87543316699713,
    "lat": 30.825924029679964,
    "alt": 39.506303902712,
    "heading": 0.0,
    "pitch": -45.0,
    "roll": 0.0,
    "camType": 2 //巡航点终点
    }
    ]
    }
  • 返回值

1
2
3
4
5
6
7
8
9
10
11
12
13
添加成功:
{
status = 1,
message = 添加标签成功!,
marker_id = x
}

添加失败:

{
status = 0,
message = getError()
}

删除标注

访问地址http://gis.138.com/api/marker/dropmarker?marker_id=
HOST:URL/api/marker/dropmarker

  • 请求方式:POST
  • 参数:
1
marker_id
  • 返回值
1
2
3
4
5
6
7
8
9
10
11
12
删除成功:
{
status = 1,
message = 删除标注成功!,
}

删除失败:

{
status = 0,
message = getError()
}

上传图片到服务器

返回图片在服务器的地址

访问地址
HOST:URL/api/marker/getloadfile

  • 请求方式:POST
  • 参数:Json
1
* @param   文件参数    UploadForm[imageFile]
  • 返回值
1
2
3
{
imgUrl = "",
}

获取标注的类型列表

标注的类型,下拉菜单应用

访问地址http://gis.138.com/api/marker/getcategory
HOST:URL/api/marker/getcategory

  • 请求方式:get

  • 参数

    1
    void
  • 返回值

1
2
3
4
5
6
7
8
9
10
11
12
[
{
"cat_id": "1",
"cat_name": "默认",
"cat_url": "项目数据\\shp\\IMG_POI\\默认.png"
},
{
"cat_id": "2",
"cat_name": "排污",
"cat_url": "项目数据\\shp\\IMG_POI\\排污.png"
}
]

获取标注列表

访问地址http://gis.138.com/api/marker/getmarkerlist
HOST:URL/api/marker/getmarkerlist

  • return
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
[
{
"id": 8,
"title": "测试标注",
"img": "201805/M_1527674327605.jpg",
"detail": "这是测试标注 这是测试标注这是测试标注这是测试标注这是测试标注这是测试标注这是测试标注这是测试标注",
"type": null,
"points": [
{
"id": 5,
"lng": 120.87497513427,
"lat": 30.823073727261,
"alt": 20.630929306149,
"heading": -27.330086827782,
"pitch": -65.16811438783,
"roll": 0,
"marker_id": 8,
"num": 0,
"type": 1
}
],
"tags": [],
"category": {
"cat_id": 1,
"cat_name": "默认",
"keywords": "",
"cat_desc": "这是默认分类",
"parent_id": 0,
"sort_order": 50,
"cat_url": "项目数据\\shp\\IMG_POI\\默认.png"
}
},
{}

}

获取标注详情

描述:点击标注图片,漫游至相应的位置。

注:删除type参数

访问地址http://gis.138.com/api/marker/clickmarker?marker_id=
HOST:URL/api/marker/clickmarker

  • 请求方式:POST/Get
  • 参数:
1
* @param   int      marker_id   标记的ID号
  • 返回值
1
2
3
4
5
6
7
8
9
10
11
12
{
"id": 31,
"lng": 120.875433167,
"lat": 30.82592402968,
"alt": 39.506303902711,
"heading": 0,
"pitch": -45,
"roll": 0,
"marker_id": 14,
"num": 1,
"type": 1
}

获取单个标注详细信息

注:删除type参数

访问地址
HOST: URL/api/marker/getmarker

  • 请求方式:POST/GET
  • 参数:
1
2
* @param   int     marker_id
* @param int type
  • 返回值
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
[
{
"id": 1,
"title": "测试标注yii",
"img": "http://gis.138.com/resource201805/M_1527660821144.jpg",
"detail": "这是测试标注 这是测试标注这是测试标注这是测试标注这是测试标注这是测试标注这是测试标注这是测试标注",
"type": 1,
"points": [
{
"id": 1,
"lng": 120.875433167,
"lat": 30.82592402968,
"alt": -0.0000056903809309006,
"heading": 0,
"pitch": -45,
"roll": 0,
"marker_id": 1,
"num": 0,
"type": 1
}
],
"tags": [
{
"id": 2,
"name": "标签2"
},
{
"id": 3,
"name": "标签3"
},
{
"id": 4,
"name": "标签4"
}
],
"category": {
"cat_id": 1,
"cat_name": "默认",
"keywords": "",
"cat_desc": "这是默认分类",
"parent_id": 0,
"sort_order": 50,
"cat_url": "项目数据\\shp\\IMG_POI\\默认.png"
}
}
]

更新标注

访问地址
HOST:URL/api/marker/syncMarker

  • 请求方式:POST
  • 参数:Json(必须)

旧版参数

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
* @param   int       marker_id       要更新的标注ID   (新增)
* @param string title 标记标题
* @param string detail 详情
* @param string type 类型 默认为1 普通标记 type:1 num:0 动画导航标记 type:0 num:1-n
* @param string cat_id 标签分类ID号
* @param string img_server_url 图片服务器相对路径
* @param string lng
* @param string lat
* @param string alt
* @param string heading
* @param string pitch pitch
* @param string roll
* @param int camType 标记点类型 默认值为1 1=点,0=巡航线区间,2=巡航线终点
*
* @return string attr_value

新参数

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
{
"markers":{
"marker_id":9,
"type": 2,
"title": "编辑标注9",
"detail": "这是测试标注 这是测试标注这是测试标注这是测试标注这是测试标注这是测试标注这是测试标注这是测试标注",
"cat_id": 2,
"img_server_url": "201805/M_1527660821144.jpg",
"style": "<style> 这是风</style>",
"address": ""
},
"points":[
{
"num": 1,
"lng": 120.87543316699713,
"lat": 30.825924029679964,
"alt": 39.506303902711,
"heading": 1.0,
"pitch": -45.0,
"roll": 0.0,
"camType": 1
},{
"num": 2,
"lng": 120.87543316699713,
"lat": 30.825924029679964,
"alt": 39.506303902712,
"heading": 2.0,
"pitch": -45.0,
"roll": 0.0,
"camType": 0
},{
"num": 3,
"lng": 120.87543316699713,
"lat": 30.825924029679964,
"alt": 39.506303902711,
"heading": 3.0,
"pitch": -45.0,
"roll": 0.0,
"camType": 0
},{
"num": 4,
"lng": 120.87543316699713,
"lat": 30.825924029679964,
"alt": 39.506303902712,
"heading": 4.0,
"pitch": -45.0,
"roll": 0.0,
"camType": 2
}
]
}

  • 返回值
1
2
3
4
5
6
7
8
9
10
11
12
13
添加成功:
{
status = 1,
message = 添加标签成功!,
marker_id = x
}

添加失败:

{
status = 0,
message = getError()
}

获取Host地址

图片拼接的host地址

访问地址
HOST:URL/api/marker/gethost

  • 返回值
1
2
3
{
"img_host": "http://gis.138.com/resource"
}

获取首页标注列表

访问地址http://gis.138.com/api/marker/markerindex
HOST:URL/api/marker/markerindex

  • 参数
1
2
3
{
"markers":[55,56,57,58]
}
  • 返回值
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
{
"status": 1,
"data": [
{
"id": 55,
"title": "默认点标注",
"img": "/no_photo_1200.png",
"detail": "默认标注详情",
"type": 1,
"address": "",
"style": "",
"points": [
{
"id": 217,
"lng": 120.87139150886,
"lat": 30.82207126093,
"alt": -0.0000095954164862633,
"heading": -13.597139002353,
"pitch": 0,
"roll": 0,
"marker_id": 55,
"num": 0,
"type": 1
}
],
"tags": [],
"category": {
"cat_id": 1,
"cat_name": "默认",
"keywords": "",
"cat_desc": "这是默认分类",
"parent_id": 0,
"sort_order": 50,
"cat_url": "项目数据\\shp\\IMG_POI\\默认.png"
}
},
{
"id": 56,
"title": "默认点标注",
"img": "/no_photo_1200.png",
"detail": "默认标注详情",
"type": 1,
"address": "",
"style": "",
"points": [
{
"id": 218,
"lng": 120.87000197221,
"lat": 30.822149147606,
"alt": -0.000004730187356472,
"heading": -13.597139002353,
"pitch": 0,
"roll": 0,
"marker_id": 56,
"num": 0,
"type": 1
}
],
"tags": [],
"category": {
"cat_id": 1,
"cat_name": "默认",
"keywords": "",
"cat_desc": "这是默认分类",
"parent_id": 0,
"sort_order": 50,
"cat_url": "项目数据\\shp\\IMG_POI\\默认.png"
}
},
{
"id": 57,
"title": "默认点标注",
"img": "/no_photo_1200.png",
"detail": "默认标注详情",
"type": 1,
"address": "",
"style": "",
"points": [
{
"id": 219,
"lng": 120.86993112767,
"lat": 30.821507473274,
"alt": -0.000010554678738117,
"heading": -13.597139002353,
"pitch": 0,
"roll": 0,
"marker_id": 57,
"num": 0,
"type": 1
}
],
"tags": [],
"category": {
"cat_id": 1,
"cat_name": "默认",
"keywords": "",
"cat_desc": "这是默认分类",
"parent_id": 0,
"sort_order": 50,
"cat_url": "项目数据\\shp\\IMG_POI\\默认.png"
}
},
{
"id": 58,
"title": "默认点标注",
"img": "/no_photo_1200.png",
"detail": "默认标注详情",
"type": 1,
"address": "",
"style": "",
"points": [
{
"id": 220,
"lng": 120.87092894877,
"lat": 30.821200880187,
"alt": -0.000010219402611256,
"heading": -13.597139002353,
"pitch": 0,
"roll": 0,
"marker_id": 58,
"num": 0,
"type": 1
}
],
"tags": [],
"category": {
"cat_id": 1,
"cat_name": "默认",
"keywords": "",
"cat_desc": "这是默认分类",
"parent_id": 0,
"sort_order": 50,
"cat_url": "项目数据\\shp\\IMG_POI\\默认.png"
}
}
]
}

Marker标签管理

Marker标签管理主要管理标注的所属标签。

添加标签

访问地址:http://gis.138.com/api/marker/addtag
HOST:URL/api/marker/addtag

  • 请求方式:post
  • 参数
1
2
3
4
{
"marker_id":5,
"tags":[4,2,3,5]
}
  • 返回值
1
2
3
4
5
6
7
{
"status": 1,
"data": {
"id": 1,
"name": "default"
}
}

删除标签

访问地址:http://gis.138.com/api/marker/droptag?marker_id=&tag_id=
HOST:URL/api/marker/droptag

  • 请求方式:get
  • 参数
1
2
3
4
5
* @param   int marker_id  标注ID  无ID时为0
* @param int tag_id 标签ID
*
* @return string status 状态
* @return string data 数据
  • 返回值
1
2
3
4
5
6
7
8
编辑成功:
{
"status": 1,
"data": {
"marker_id": "0",
"tag_id": "2"
}
}

获取标签列表

访问地址:http://gis.138.com/api/marker/taglist?marker_id=
HOST:URL/api/marker/taglist

  • 请求方式:get
  • 参数
1
2
3
4
* @param   int marker_id  标注ID  无ID时为0
*
* @return string status 状态
* @return string data 数据
  • 返回值
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{
"status": 1,
"data": [
{
"id": 2,
"marker_id": 0,
"tag_id": 2
},
{
"id": 3,
"marker_id": 0,
"tag_id": 2
}
]
}


————————————-分割线————————————————



Tag标签管理

Tag标签管理主要管理标签页面

添加标签

访问地址:http://gis.138.com/api/tag/add?name=
HOST:URL/api/tag/edit

  • 请求方式:get
  • 参数
1
* @param   string name    标签名字
  • 返回值
1
2
3
4
5
6
7
{
"status": 1,
"data": {
"id": 1,
"name": "default"
}
}

编辑标签

访问地址:http://gis.138.com/api/tag/edit?id=&name=
HOST:URL/api/tag/edit

  • 请求方式:get
  • 参数
1
2
* @param   int    id      标签ID
* @param string name 标签名字
  • 返回值
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
编辑成功:
{
"status": 1,
"data": {
"id": 1,
"name": "default"
}
}

编辑失败:
{
"status": 0,
"data": {
}
}

删除标签

访问地址:http://gis.138.com/api/tag/drop?id=
HOST:URL/api/tag/edit

  • 请求方式:get
  • 参数
1
* @param   int    id      标签ID
  • 返回值
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
编辑成功:
{
"status": 1,
"data": {
"id": 1,
"name": "default"
}
}

编辑失败:
{
"status": 0,
"data": {
}
}

标签列表

访问地址:http://gis.138.com/api/tag/list
HOST:URL/api/tag/edit

  • 请求方式:get
  • 参数
1
void
  • 返回值
1
2
3
4
5
6
7
8
9
10
11
12
13
{
"status": 1,
"data": [
{
"id": 1,
"name": "default"
},
{
"id": 2,
"name": "djfoie"
}
]
}

线标注

线标注

访问地址http://gis.138.com/api/line/setline
HOST:URL/api/line/setline

  • 请求方式:POST
  • 参数:Json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
{
"markers":{
"type": 1,
"title": "测试标注2",
"detail": "这是测试标注 这是测试标注这是测试标注这是测试标注这是测试标注这是测试标注这是测试标注这是测试标注",
"cat_id": 2,
"img_server_url": "201805/M_1527660821144.jpg",
"style": "<style> 这是风</style>",
"address": ""
},
"points":[{
"num": 0,
"lng": 120.87543316699713,
"lat": 30.825924029679964,
"alt": 39.506303902711,
"heading": 0.0,
"pitch": -45.0,
"roll": 0.0,
"camType": 1
},{
"num": 1,
"lng": 120.87543316699713,
"lat": 30.825924029679964,
"alt": 39.506303902712,
"heading": 0.0,
"pitch": -45.0,
"roll": 0.0,
"camType": 0
},{
"num": 0,
"lng": 120.87543316699713,
"lat": 30.825924029679964,
"alt": 39.506303902711,
"heading": 0.0,
"pitch": -45.0,
"roll": 0.0,
"camType": 0
},{
"num": 1,
"lng": 120.87543316699713,
"lat": 30.825924029679964,
"alt": 39.506303902712,
"heading": 0.0,
"pitch": -45.0,
"roll": 0.0,
"camType": 2
}
]
}
  • 返回值
1
2
3
4
5
{
"status": 1,
"message": "Add Line Marker Succeed!",
"marker_id": 8
}

————————————-以下未启用————————————————


————————————-以下未启用————————————————


————————————-以下未启用————————————————

动画导航返回值

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{
{
"X": "",
"Y": "",
"Z": "",
"Heading": "",
"Pitch": "",
"Roll": "",
"FlyMode":
},
{
"X": "",
"Y": "",
"Z": "",
"Heading": "",
"Pitch": "",
"Roll": "",
"FlyMode":
},
{
"X": "",
"Y": "",
"Z": "",
"Heading": "",
"Pitch": "",
"Roll": "",
"FlyMode":
}
}

标记上传:

1
2


demo

访问地址
HOST:URL/api/tag/setMarker

  • 请求方式:POST
  • 参数:Json
1
2


  • 返回值
1
2


更新内容

20180518