[飞行区域]更新区域
PUT
/openapi/v0.9/map/api/v1/project/{proj_uuid}/flight-areas/{id}
es-geo-service
请求参数
Path 参数
proj_uuid
string
必需
id
string
区域ID
示例值:
area-123456
Header 参数
x-user-token
string
必需
默认值:
{{x-user-token}}
X-Request-Id
string
可选
默认值:
{% mock 'uuid' %}
Body 参数application/application/json
name
string
区域名称
示例值:
更新后的区域
status
enum<string>
区域状态
枚举值:
enabledisable
示例值:
enable
content
object
区域内容
示例值:
{"type":"Feature","properties":{"color":"#FF0000","width":50,"clampToGround":true},"geometry":{"type":"Polygon","coordinates":[[[114.05294391845892,22.545987950176738],[114.05346732054439,22.544997673245454],[114.05180186016695,22.544867393234725],[114.05294391845892,22.545987950176738]]]}}
示例
{
"name": "更新后的区域",
"status": "enable",
"content": {
"type": "Feature",
"properties": {
"color": "#FF0000",
"width": 50,
"clampToGround": true
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
114.05294391845892,
22.545987950176738
],
[
114.05346732054439,
22.544997673245454
],
[
114.05180186016695,
22.544867393234725
],
[
114.05294391845892,
22.545987950176738
]
]
]
}
}
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request PUT '/openapi/v0.9/map/api/v1/project//flight-areas/area-123456' \
--header 'x-user-token;' \
--header 'X-Request-Id: {% mock '\''uuid'\'' %}' \
--header 'Content-Type: application/application/json' \
--data-raw '{
"name": "更新后的区域",
"status": "enable",
"content": {
"type": "Feature",
"properties": {
"color": "#FF0000",
"width": 50,
"clampToGround": true
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
114.05294391845892,
22.545987950176738
],
[
114.05346732054439,
22.544997673245454
],
[
114.05180186016695,
22.544867393234725
],
[
114.05294391845892,
22.545987950176738
]
]
]
}
}
}'
返回响应
🟢200成功
application/json
Body
HTTP响应模板
code
integer
响应码
message
string
响应消息
data
object
resp.AreaUpdateResp
area_hash
string
可选
required: false
example: "hash_123"
id
string
可选
required: false
example: "area_123"
updated_area
object
可选
required: false
示例
{
"code": 0,
"message": "string",
"data": {
"area_hash": "string",
"id": "string",
"updated_area": {
"area_hash": "string",
"content": [
0
],
"created_by": "string",
"created_nickname": "string",
"created_time": 0,
"id": "string",
"name": "string",
"status": "string",
"type": "string",
"updated_by": "string",
"updated_nickname": "string",
"updated_time": 0
}
}
}
修改于 2025-06-23 07:40:18