1. FlightHub
FlightHub Sync
  • FlightHub
    • FlightFub Webhook
    • ENV
    • Error Code
    • Live stream forwarding
      • Start Stream Forwarding
      • Stop Stream Forwarding
      • Get Stream Forwarding Channel Transcoder
    • Task distribution
      • Get Flight Task Files List
      • Create Flight Task
      • Commands During the Flight Task
      • Flight Task Trajectory Acquisition
      • Project Equipment Topology
      • Get Flight Task Details
    • Get Organization Project List
      GET
    • Get Project Device List
      GET
    • Push Event Notification and Map Annotation
      POST
    • Get Temporary Upload Token
      POST
    • Notify of Route File Upload
      POST
    • Get File Information and Download Address
      GET
  1. FlightHub

Push Event Notification and Map Annotation

POST
/map/api/v1.0/projects/{project_uuid}/elements
Through this interface, third-party cloud platforms can send key event information to FlightHub 2, including location, description, etc.
The element format can be referenced at: https://geojson.org/

Request

Path Params

Header Params

Body Params application/json

Example
// pin点
{
  "name": "元素名称",
  "desc": "描述",
  "resource": {
    "type": 0,
    "content": {
      "type": "Feature",
      "properties": {
        "color": "#2D8CF0",
        "clampToGround": true
      },
      "geometry": {
        "type": "Point",
        "coordinates": [
          108.42625652534299,
          30.59263023356542,
          0
        ]
      }
    }
  }
}

//线
{
  "name": "元素名称",
  "desc": "描述",
  "resource": {
    "type": 1,
    "content": {
      "type": "Feature",
      "properties": {
        "color": "#2D8CF0"
      },
      "geometry": {
        "type": "LineString",
        "coordinates": [
          [
            110.78912343493995,
            28.7786761289101
          ],
          [
            110.78980969315512,
            28.777435625158603
          ]
        ]
      }
    }
  }
}

//多边形
{
  "name": "元素名称",
  "desc": "描述",
  "resource": {
    "type": 2,
    "content": {
      "type": "Feature",
      "properties": {
        "color": "#2D8CF0"
      },
      "geometry": {
        "type": "Polygon",
        "coordinates": [
          [
            [
              110.79093322779515,
              28.78036215346328
            ],
            [
              110.7908800891774,
              28.777869391788467
            ],
            [
              110.7942962561357,
              28.7796971945124
            ]
          ]
        ]
      }
    }
  }
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --globoff '/map/api/v1.0/projects/{{project_uuid}}/elements' \
--header 'X-Organization-Key: {{orgnazation_key}}' \
--header 'X-Organization-Key: {{organization_key}}' \
--header 'Content-Type: application/json' \
--data '// pin点
{
  "name": "元素名称",
  "desc": "描述",
  "resource": {
    "type": 0,
    "content": {
      "type": "Feature",
      "properties": {
        "color": "#2D8CF0",
        "clampToGround": true
      },
      "geometry": {
        "type": "Point",
        "coordinates": [
          108.42625652534299,
          30.59263023356542,
          0
        ]
      }
    }
  }
}

//线
{
  "name": "元素名称",
  "desc": "描述",
  "resource": {
    "type": 1,
    "content": {
      "type": "Feature",
      "properties": {
        "color": "#2D8CF0"
      },
      "geometry": {
        "type": "LineString",
        "coordinates": [
          [
            110.78912343493995,
            28.7786761289101
          ],
          [
            110.78980969315512,
            28.777435625158603
          ]
        ]
      }
    }
  }
}

//多边形
{
  "name": "元素名称",
  "desc": "描述",
  "resource": {
    "type": 2,
    "content": {
      "type": "Feature",
      "properties": {
        "color": "#2D8CF0"
      },
      "geometry": {
        "type": "Polygon",
        "coordinates": [
          [
            [
              110.79093322779515,
              28.78036215346328
            ],
            [
              110.7908800891774,
              28.777869391788467
            ],
            [
              110.7942962561357,
              28.7796971945124
            ]
          ]
        ]
      }
    }
  }
}'

Responses

🟢200成功
application/json
Bodyapplication/json

Example
{
    "code": 0,
    "message": "success",
    "data": {
        "id": "cdb6f644-8925-463d-8977-564e866d7e86"
    }
}
🟠401未授权
Modified at 2024-12-17 02:48:40
Previous
Get Project Device List
Next
Get Temporary Upload Token
Built with