[飞行区域]创建区域
POST
/openapi/v0.9/map/api/v1/project/{proj_uuid}/flight-areas
es-geo-service
请求参数
Path 参数
proj_uuid
string
必需
Header 参数
x-user-token
string
必需
默认值:
{{x-user-token}}
X-Request-Id
string
可选
默认值:
{% mock 'uuid' %}
Body 参数application/json
name
string
区域名称
示例值:
测试区域
content
string
区域内容
示例值:
{"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": "测试区域",
"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 POST '/openapi/v0.9/map/api/v1/project//flight-areas' \
--header 'x-user-token;' \
--header 'X-Request-Id: {% mock '\''uuid'\'' %}' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "测试区域",
"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.AreaCreateResp
id
string
可选
required: false
example: "area_123"
name
string
可选
required: false
example: "区域名称"
示例
{
"code": 0,
"message": "string",
"data": {
"id": "string",
"name": "string"
}
}
修改于 2025-06-23 07:40:18