# 矢量瓦片集

# 创建矢量瓦片集

# 请求 URL:

  • http://host:port/heycloud/api/io/vtileset/create

# 请求方式:

  • POST

# 请求 Header:

字段 类型 是否必选 说明
x-heycloud-admin-session String 通过 session 提供管理权限
x-heycloud-account-id String 帐号的唯一标识符

# 请求参数:

参数名称 可选值 类型 是否必须 默认值 说明
title - String - 标题
sr web-mercator | wgs-84 | cgcs-2000 | gcj-02 | bd-09 String web-mercator 坐标系统

# 请求示例:

POST http://host:port/heycloud/api/io/vtileset/create

{
  "title": "北京建筑面2021年矢量瓦片",
}

# 正确响应示例:

{
  "result": {
    "id": "3108a604-3a69-4c40-ae3f-f449d6fe4ca9",
    "title": "北京建筑面2021年矢量瓦片",
    "createdAt": "2021-03-10T08:42:22.120Z"
  }
}

# 错误响应示例:

{
  "error": "Error",
  "message": "错误信息"
}

# 通过渲染配置生成矢量瓦片集

# 请求 URL:

  • http://host:port/heycloud/api/io/vtileset/:vtilesetId/generate

# 请求方式:

  • POST

# 请求 Header:

字段 类型 是否必选 说明
x-heycloud-admin-session String 通过 session 提供管理权限
x-heycloud-account-id String 帐号的唯一标识符

# 请求参数:

参数名称 类型 是否必须 默认值 说明
renderConfig Object - 渲染配置
bbox Array [-20037508.342789244, -20037508.342789244, 20037508.342789244, 20037508.342789244] 生成的范围
concurrent Number 2 并发数
replaceExists Boolean false 如瓦片已存在,是否需要重新生成结果进行替换
minZoom Number 0 生成的最小 zoom 级别
maxZoom Number 10 生成的最大 zoom 级别

# 请求示例:

POST http://host:port/heycloud/api/io/vtileset/xxxxx/generate

{
  "renderConfig": {
    "type": "layer",
    "config": {...}
  }
}

# 正确响应示例:

{
  "result": {
    "notifyAt": "2021-03-10T08:42:22.120Z"
  }
}

# 错误响应示例:

{
  "error": "NOTIFY_GENERATE_TILES_FAILED",
  "message": "通知生成瓦片失败"
}

# 查询生成状态

# 请求 URL:

  • http://host:port/heycloud/api/io/vtileset/:vtilesetId/generating

# 请求方式:

  • GET

# 请求 Header:

字段 类型 是否必选 说明
x-heycloud-admin-session String 通过 session 提供管理权限
x-heycloud-account-id String 帐号的唯一标识符

# 请求参数:

参数名称 类型 是否必须 默认值 说明
vtilesetId String - 矢量瓦片集的 ID

# 请求示例:

GET http://host:port/heycloud/api/io/vtileset/xxxxx/generating

# 正确响应示例:

{
  "result": {
    "generateId": "f94cbe0f-0e6c-4e61-8e59-9a8b3b2126c2",
    "vtilesetId": "68ee1874-0a86-47dd-befa-8b2328d3f64b",
    "accountId": "",
    "startAt": "2021-03-10T08:42:22.120Z",
    "totalCount": "20876",
    "generatedCount": "0",
  }
}

# 错误响应示例:

{
  "error": "ERROR",
  "message": "错误信息"
}

# 取消生成操作

# 请求 URL:

  • http://host:port/heycloud/api/io/vtileset/:vtilesetId/cancelGenerating

# 请求方式:

  • POST

# 请求 Header:

字段 类型 是否必选 说明
x-heycloud-admin-session String 通过 session 提供管理权限
x-heycloud-account-id String 帐号的唯一标识符

# 请求参数:

参数名称 类型 是否必须 默认值 说明
vtilesetId String - 矢量瓦片集的 ID
accountId String - 账号

# 请求示例:

POST http://host:port/heycloud/api/io/vtileset/xxxxx/cancelGenerating

{
  "accountId":""
}

# 正确响应示例:

{
  "result": {
    "id": "68ee1874-0a86-47dd-befa-8b2328d3f64b",
    "cancelledAt": "2021-02-04T09:46:34.465Z"
  }
}

# 错误响应示例:

{
  "error": "Error",
  "message": "错误信息"
}

# 将无主数据分配给某个帐号

# 请求 URL:

  • http://host:port/heycloud/api/io/vtileset/:vtilesetId/assign

# 请求方式:

  • POST

# 请求 Header:

字段 类型 是否必选 说明
x-heycloud-admin-session String 通过 session 提供管理权限

# 请求参数:

参数名称 类型 是否必须 默认值 说明
vtilesetId String - 矢量瓦片集的 ID
accountId String - 账号

# 请求示例:

POST http://host:port/heycloud/api/io/vtileset/xxxxx/assign

{
  accountId: 'xxxxxx';
}

# 正确响应示例:

{
  "result": {
    "id": "68ee1874-0a86-47dd-befa-8b2328d3f64b",
    "assingnedAt": "2021-02-04T09:46:34.465Z"
  }
}

# 错误响应示例:

{
  "error": "Error",
  "message": "错误信息"
}

# 删除矢量瓦片集

# 请求 URL:

  • http://host:port/heycloud/api/io/vtileset/:vtilesetId

# 请求方式:

  • DELETE

# 请求 Header:

字段 类型 是否必选 说明
x-heycloud-admin-session String 通过 session 提供管理权限
x-heycloud-account-id String 帐号的唯一标识符

# 请求参数:

参数名称 类型 是否必须 默认值 说明
vtilesetId String - 矢量瓦片集的 ID

# 请求示例:

DELETE http://host:port/heycloud/api/io/vtileset/xxxxx

# 正确响应示例:

{
  "result": {
    "id": "68ee1874-0a86-47dd-befa-8b2328d3f64b",
    "deletedAt": "2021-02-04T09:46:34.465Z"
  }
}

# 错误响应示例:

{
  "error": "Error",
  "message": "错误信息"
}