跳到主要内容

更新地图元素

更新元素

PUT /map/api/v1/workspaces/{workspace_id}/elements/{id}

Parameters

NameInTypeRequiredDescription
workspace_idpathstringtrue工作空间id
idpathstringtrueelement id
x-auth-tokenheaderstringtrue访问令牌
bodybodymap.ElementUpdateInputtruebody

Responses

StatusMeaningDescriptionSchema
200OKOKmap.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

NameTypeRequiredRestrictionsDescription
contentmap.Contentfalsenone资源内容对象
namestringfalsenone元素名称
descriptionstringfalsenone描述
group_idstringfalsenone群组id
idstringfalsenone元素id
obj_typeintfalsenone目标类型 0:默认、1:无人机、2:人类、3:遥控器、4:机巢、5:哨兵塔、6:雷视一体、7:雷达、8:PTZ、10:背景、11:动物、12:船、13:小车、15:骑行者、16:大车、35:烟雾、36:火、99:未检测到目标
oper_typeintfalsenone操作类型,0:信息共享,1:前去侦查,2:无人机前去侦查
roleintfalsenone元素形状:0:默认,1:菱形,2:矩形,3:梅花,4:正方形
element_idstringtruenone元素id
typeinttruenone0 - pin点

map.Content

{
"geometry": {
"coordinates": [
113.9970776,
22.5958253
],
"type": "Point"
},
"properties": {
"clampToGround": false,
"color": "#03FEF4"
},
"type": "Feature"
}

Properties

NameTypeRequiredRestrictionsDescription
geometryobjectfalsenonegeojson属性
» coordinates[any]falsenonegeojson属性
» typestringfalsenonegeojson属性
propertiesobjectfalsenonegeojson属性
» clampToGroundbooleanfalsenone是否贴地
» colorstringfalse支持的元素颜色<br>* BLUE:0x2D8CF0<br>* GREEN - 0x19BE6B<br><br>* YELLOW - 0xFFBB00<br><br>* ORANGE - 0xB620E0<br><br>* RED - 0xE23C39<br>* PURPLE - 0x212121
typestringfalsenonegeojson属性

map.SwagUUIDResp

{
"code": 0,
"data": {
"id": "string"
},
"message": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
codeintegertruenone错误码
datamap.UUIDResptruenonenone
messagestringtruenone错误描述

map.UUIDResp

{
"id": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
idstringtruenone元素id