Obtain Map Elements

2022-06-23
No Rating

Get Map Elements

GET /map/api/v1/workspaces/{workspace_id}/element-groups

Parameters

NameInTypeRequiredDescription
group_idquerystringfalseelement group id
is_distributedquerybooleanfalseelement group distributed status (default value: true)
workspace_idpathstringtrueworkspace id
x-auth-tokenheaderstringtrueaccess token

Responses

StatusMeaningDescriptionSchema
200OKopen in new windowOKmap.SwagTree

Example responses

{
    "code":0,
    "message":"success",
    "data":[
        {
            "id":"d275c4e1-d864-4736-8b5d-5f5882ee9bdd",
            "type":1,
            "name":"string",
            "is_lock":false,
            "create_time":1637158501230,
            "elements":[
                {
                    "id":"6d5da7b4-ac39-42bf-9580-4c8a94c11989",
                    "name":"string",
                    "create_time":1637158501230,
                    "update_time":1637158501230,
                    "resource":{
                        "type":0,
                        "user_name":"name",
                        "content":{
                            "type":"Feature",
                            "properties":{
                                "color":"#0091FF",
                                "clampToGround":false
                            },
                            "geometry":{
                                "type":"Point",
                                "coordinates":[
                                    -112.49344909640939,
                                    48.18734850103778,
                                    40.2
                                ]
                            }
                        }
                    }
                },
                {
                    "id":"6d5da7b4-ac39-42bf-9580-4c8a94c11988",
                    "name":"string",
                    "create_time":1637158501230,
                    "update_time":1637158501230,
                    "resource":{
                        "type":0,
                        "user_name":"string",
                        "content":{
                            "type":"Feature",
                            "properties":{
                                "color":"#0091FF",
                                "clampToGround":false
                            },
                            "geometry":{
                                "type":"LineString",
                                "coordinates":[
                                    [
                                        -112.49344909640939,
                                        48.18734850103778
                                    ],
                                    [
                                        -104.47267952618783,
                                        46.60029335386577
                                    ],
                                    [
                                        -109.20285386177949,
                                        42.63945392538244
                                    ],
                                    [
                                        -113.51847222524307,
                                        43.059268439796575
                                    ]
                                ]
                            }
                        }
                    }
                },
                {
                    "id":"6d5da7b4-ac39-42bf-9580-4c8a94c11987",
                    "name":"string",
                    "create_time":1637158501230,
                    "update_time":1637158501230,
                    "resource":{
                        "type":0,
                        "user_name":"string",
                        "content":{
                            "type":"Feature",
                            "properties":{
                                "color":"#0091FF",
                                "clampToGround":false
                            },
                            "geometry":{
                                "type":"Polygon",
                                "coordinates":[
                                    [
                                        [
                                            -112.49344909640939,
                                            48.18734850103778
                                        ],
                                        [
                                            -104.47267952618783,
                                            46.60029335386577
                                        ],
                                        [
                                            -109.20285386177949,
                                            42.63945392538244
                                        ],
                                        [
                                            -113.51847222524307,
                                            43.059268439796575
                                        ]
                                    ]
                                ]
                            }
                        }
                    }
                }
            ]
        }
    ]
}

Schemas

map.SwagTree

{
  "code": 0,
  "data": [
    {
      "create_time": 0,
      "elements": [
        {
          "create_time": 0,
          "id": "string",
          "name": "string",
          "resource": {
            "content": {
              "geometry": {
                "coordinates": [
                  null
                ],
                "type": "string"
              },
              "properties": {
                "clampToGround": true,
                "color": "string"
              },
              "type": "string"
            },
            "type": 0
          },
          "update_time": 0
        }
      ],
      "id": "string",
      "is_lock": true,
      "name": "string",
      "type": 0
    }
  ],
  "message": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
codeintegerfalsenoneerror code
data[map.ElementGroupOutput]falsenonenone
messagestringfalsenoneerror description

map.ElementGroupOutput

{
  "create_time": 0,
  "elements": [
    {
      "create_time": 0,
      "id": "string",
      "name": "string",
      "resource": {
        "content": {
          "geometry": {
            "coordinates": [
              null
            ],
            "type": "string"
          },
          "properties": {
            "clampToGround": true,
            "color": "string"
          },
          "type": "string"
        },
        "type": 0
      },
      "update_time": 0
    }
  ],
  "id": "string",
  "is_lock": true,
  "name": "string",
  "type": 0
}

Properties

NameTypeRequiredRestrictionsDescription
create_timeintegerfalsenoneelement group create time(millisecond)
elements[map.ElementItem]falsenonecollection of elements
idstringfalsenoneelement group id
is_lockbooleanfalsenoneWhether to lock (if locked, the elements under this element group cannot be deleted and modified)
namestringfalsenoneelement group name
typeintegerfalsenoneelement group type * 0 - custom element group * 1 - default element group * 2 - APP shared element group (type=2 is an APP element group, PILOT will add map elements to this element group by default, and there must be an APP shared element group. It is recommended that in the same workspace, there are And there is only one APP shared element group)

map.ElementItem

{
  "create_time": 0,
  "id": "string",
  "name": "string",
  "resource": {
    "content": {
      "geometry": {
        "coordinates": [
          null
        ],
        "type": "string"
      },
      "properties": {
        "clampToGround": true,
        "color": "string"
      },
      "type": "string"
    },
    "type": 0
  },
  "update_time": 0
}

Properties

NameTypeRequiredRestrictionsDescription
create_timeintegerfalsenoneelement create time(millisecond)
idstringfalsenoneelement id
namestringfalsenoneelement name
resourcemap.ResourceItemfalsenoneresource object
update_timeintegerfalsenoneelement update time(millisecond)

map.ResourceItem

{
  "content": {
    "geometry": {
      "coordinates": [
        null
      ],
      "type": "string"
    },
    "properties": {
      "clampToGround": true,
      "color": "string"
    },
    "type": "string"
  },
  "type": 0
}

Properties

NameTypeRequiredRestrictionsDescription
contentmap.Contentfalsenoneresource content object
typeintegerfalsenoneresource type
* 0 - pin point
* 1 - line
* 2 - polygon

map.Content

{
  "geometry": {
    "coordinates": [
      null
    ],
    "type": "string"
  },
  "properties": {
    "clampToGround": true,
    "color": "string"
  },
  "type": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
geometryobjectfalsenonegeojson attribute
» coordinates[any]falsenonegeojson attribute
» typestringfalsenonegeojson attribute
propertiesobjectfalsenonegeojson attribute
» clampToGroundbooleanfalsenonewhether it is on the ground
» colorstringfalsenonesupported colors
* BLUE:0x2D8CF0
* GREEN - 0x19BE6B

* YELLOW - 0xFFBB00

* ORANGE - 0xB620E0

* RED - 0xE23C39
* PURPLE - 0x212121
typestringfalsenonegeojson attribute