Create Map Elements
Create Elements
POST /map/api/v1/workspaces/{workspace_id}/element-groups/{group_id}/elements
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
group_id | path | string | true | Element group ID |
workspace_id | path | string | true | Workspace ID |
x-auth-token | header | string | true | Access token |
body param | body | map.ElementCreateInput | true | Body parameters |
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.ElementCreateInput
{
"create_time": 1718075395953,
"description": "",
"element_id": "ff568a5e-d2d0-4306-89c1-233c4f3dc564",
"flag": "1",
"group_id": "e3dea0f5-37f2-4d79-ae58-490af3228060",
"id": "ff568a5e-d2d0-4306-89c1-233c4f3dc564",
"name": "D.11.11095594",
"obj_type": 0,
"oper_type": 0,
"resource": {
"content": {
"geometry": {
"coordinates": [
113.99759525641423,
22.595198811591644
],
"type": "Point"
},
"properties": {
"clampToGround": false,
"color": "#03FEF4"
},
"type": "Feature"
},
"type": 0,
"user_name": ""
},
"role": 0,
"update_time": 0,
"workspace_id": ""
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | true | none | Element ID |
name | string | true | none | Element name |
resource | map.ResourceItem | true | none | Resource object |
create_time | Long | true | none | Timestamp in milliseconds |
group_id | String | true | none | Group ID |
obj_type | Int | false | none | Element type: 0: Default, 1: UAV, 2: Human, 3: Remote Control, 4: Drone Nest, 5: Sentry Tower, 6: Radar Camera, 7: Radar, 8: PTZ, 10: Background, 11: Animal, 12: Boat, 13: Small Car, 15: Cyclist, 16: Large Car, 35: Smoke, 36: Fire, 99: Undetected Target |
oper_type | Int | false | none | Map element operation type: 0: Information Sharing (Default), 1: Reconnaissance, 2: UAV Reconnaissance |
role | Int | false | none | Element shape: 0: Default, 1: Diamond, 2: Rectangle, 3: Plum Blossom, 4: Square |
map.ResourceItem
{
"content": {
"geometry": {
"coordinates": [
113.99759525641423,
22.595198811591644
],
"type": "Point"
},
"properties": {
"clampToGround": false,
"color": "#03FEF4"
},
"type": "Feature"
},
"type": 0
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
content | map.Content | false | none | Resource content object |
type | integer | false | none | Resource type * 0 - pin点 |
map.Content
{
"geometry": {
"coordinates": [
113.99759525641423,
22.595198811591644
],
"type": "Point"
},
"properties": {
"clampToGround": false,
"color": "#03FEF4"
},
"type": "Feature"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
geometry | object | false | none | GeoJSON properties |
» coordinates | [any] | false | none | GeoJSON coordinates |
» type | string | false | none | GeoJSON type |
properties | object | false | none | GeoJSON properties |
» clampToGround | boolean | false | none | Clamp to ground |
» color | string | false | none | Supported element colors: * BLUE: 0x2D8CF0 * GREEN: 0x19BE6B * YELLOW: 0xFFBB00 * ORANGE: 0xB620E0 * RED: 0xE23C39 * PURPLE: 0x212121 |
type | string | false | none | GeoJSON type |
map.SwagUUIDResp
{
"code": 0,
"message": "success",
"data": {
"id": "107653f6-4032-4485-aa91-ed89454cceff"
}
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
code | integer | true | none | Error code |
data | map.UUIDResp | true | none | none |
message | string | true | none | Error description |
map.UUIDResp
{
"id": "string"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | true | none | Element ID |