更新地图元素
更新元素
PUT /map/api/v1/workspaces/{workspace_id}/elements/{id}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
workspace_id | path | string | true | 工作空间id |
id | path | string | true | element id |
x-auth-token | header | string | true | 访问令牌 |
body | body | map.ElementUpdateInput | true | body |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | map.SwagUUIDResp |
Example responses
{
"code":0,
"data":{
"id":"94c51c50-f111-45e8-ac8c-4f96c93ced44"
},
"message": "success"
}
Schemas
map.ElementUpdateInput
{
"content": {
"geometry": {
"coordinates": [
113.9970776,
22.5958253
],
"type": "Point"
},
"properties": {
"clampToGround": false,
"color": "#03FEF4"
},
"type": "Feature"
},
"description": "",
"element_id": "107653f6-4032-4485-aa91-ed89454cceff",
"group_id": "e3dea0f5-37f2-4d79-ae58-490af3228060",
"id": "107653f6-4032-4485-aa91-ed89454cceff",
"name": "",
"obj_type": 0,
"oper_type": 0,
"role": 3,
"type": 0,
"workspace_id": ""
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
content | map.Content | false | none | 资源内容对象 |
name | string | false | none | 元素名称 |
description | string | false | none | 描述 |
group_id | string | false | none | 群组id |
id | string | false | none | 元素id |
obj_type | int | false | none | 目标类型 0:默认、1:无人机、2:人类、3:遥控器、4:机巢、5:哨兵塔、6:雷视一体、7:雷达、8:PTZ、10:背景、11:动物、12:船、13:小车、15:骑行者、16:大车、35:烟雾、36:火、99:未检测到目标 |
oper_type | int | false | none | 操作类型,0:信息共享,1:前去侦查,2:无人机前去侦查 |
role | int | false | none | 元素形状:0:默认,1:菱形,2:矩形,3:梅花,4:正方形 |
element_id | string | true | none | 元素id |
type | int | true | none | 0 - pin点 |
map.Content
{
"geometry": {
"coordinates": [
113.9970776,
22.5958253
],
"type": "Point"
},
"properties": {
"clampToGround": false,
"color": "#03FEF4"
},
"type": "Feature"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
geometry | object | false | none | geojson属性 |
» coordinates | [any] | false | none | geojson属性 |
» type | string | false | none | geojson属性 |
properties | object | false | none | geojson属性 |
» clampToGround | boolean | false | none | 是否贴地 |
» color | string | false | 支持的元素颜色<br> * BLUE:0x2D8CF0<br> * GREEN - 0x19BE6B<br><br> * YELLOW - 0xFFBB00<br><br> * ORANGE - 0xB620E0<br><br> * RED - 0xE23C39<br> * PURPLE - 0x212121 | |
type | string | false | none | geojson属性 |
map.SwagUUIDResp
{
"code": 0,
"data": {
"id": "string"
},
"message": "string"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
code | integer | true | none | 错误码 |
data | map.UUIDResp | true | none | none |
message | string | true | none | 错误描述 |
map.UUIDResp
{
"id": "string"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | true | none | 元素id |