# 渲染图层
# 配置渲染参数
# 请求 URL:
http://host:port/heycloud/api/render/layer
# 请求方式:
- POST
# 请求 Header:
字段 | 类型 | 是否必选 | 说明 |
---|---|---|---|
x-heycloud-admin-session | String | 否 | 通过 session 提供管理权限 |
x-heycloud-account-id | String | 否 | 帐号的唯一标识符 |
x-heycloud-render-expire | String | 否 | 渲染配置的过期时间,单位秒 |
# 请求参数:
# Content type: application/json
字段 | 可选值 | 类型 | 是否必选 | 说明 |
---|---|---|---|---|
datasource | - | Object | 是 | |
├ type | vdataset | String | 是 | 类型为矢量数据集 |
├ attrFields | 通过 meta 接口获取 | Array | 否(style.type 为非 simple 时必选) | 渲染的字段 |
├ where | - | String | 否 | 查询数据的语句,SQL 格式 |
├ sortField | - | String | 否 | 用于排序的字段,渲染时排序目的在于让跨瓦片渲染的对象显示效果保持一致 |
├ sortType | desc | asc | String | 否 | 排序的顺序,默认为 desc |
└ source | - | String | 是 | 矢量数据集的唯一标识 |
style | 参考详细的样式说明 | Object | 是 | 样式设置 |
字段 | 可选值 | 类型 | 是否必选 | 说明 |
---|---|---|---|---|
datasource | - | Object | 是 | |
├ type | vdatastream | String | 是 | 类型为矢量数据流 |
├ attrFields | 通过 meta 接口获取 | Array | 否(style.type 为非 simple 时必选) | 渲染的字段 |
├ where | - | String | 否 | 查询数据的语句,SQL 格式 |
├ sortField | - | String | 否 | 用于排序的字段,渲染时排序目的在于让跨瓦片渲染的对象显示效果保持一致 |
├ sortType | desc | asc | String | 否 | 排序的顺序,默认为 desc |
└ source | - | String | 是 | 矢量数据流的唯一标识 |
style | 参考详细的样式说明 | Object | 是 | 样式设置 |
字段 | 可选值 | 类型 | 是否必选 | 说明 |
---|---|---|---|---|
datasource | - | Object | 是 | |
├ type | vdataconnector | String | 是 | 类型为矢量数据连接 |
└ source | - | Object | 是 | 矢量数据连接的唯一标识 |
style | 参考详细的样式说明 | Object | 是 | 样式设置 |
字段 | 可选值 | 类型 | 是否必选 | 说明 |
---|---|---|---|---|
datasource | - | Object | 是 | |
├ type | idataset | String | 是 | 类型为影像数据集 |
└ source | - | String | 是 | 影像数据集的唯一标识 |
style | 参考详细的样式说明 | Object | 是 | 样式设置 |
# 请求示例:
POST http://host:port/heycloud/api/render/layer
{
"datasource": {
"type": "vdataset",
"source": "2662558d-5ea0-4862-945c-76856ec4f092"
},
"style": {
"type": "polygon-simple",
"fillOpacity": 1,
"outlineColor": "#fff",
"outlineWidth": 0.5,
"outlineDashArray": "6,2"
}
}
# 正确响应示例:
{
"result": {
"uid": "xxx",
"updatedAt": "2021-10-14T02:50:18.115Z"
}
}
# 错误响应示例:
{
"error": "ERROR",
"message": "错误信息"
}
# 获取渲染参数
# 请求 URL:
http://host:port/heycloud/api/render/layer/:uid
# 请求方式:
- GET
# 请求 Header:
字段 | 类型 | 是否必选 | 说明 |
---|---|---|---|
x-heycloud-admin-session | String | 否 | 通过 session 提供管理权限 |
x-heycloud-account-id | String | 否 | 帐号的唯一标识符 |
# 请求参数:
# Content type: application/json
字段 | 可选值 | 类型 | 是否必选 | 说明 |
---|---|---|---|---|
uid | - | String | 是 |
# 请求示例:
GET http://host:port/heycloud/api/render/layer/xxxxx
# 正确响应示例:
{
"result": {...}
}
# 错误响应示例:
{
"error": "ERROR",
"message": "错误信息"
}
# 更新渲染配置的过期时间
# 请求 URL:
http://host:port/heycloud/api/render/layer/:uid
# 请求方式:
- POST
# 请求 Header:
字段 | 类型 | 是否必选 | 说明 |
---|---|---|---|
x-heycloud-admin-session | String | 否 | 通过 session 提供管理权限 |
x-heycloud-account-id | String | 否 | 帐号的唯一标识符 |
x-heycloud-render-expire | String | 否 | 渲染配置的过期时间,单位秒 |
# 请求参数:
# Content type: application/json
字段 | 可选值 | 类型 | 是否必选 | 说明 |
---|---|---|---|---|
uid | - | String | 是 |
# 请求示例:
POST http://host:port/heycloud/api/render/layer/xxxxx
# 正确响应示例:
{
"result": {
"ok": true
}
}
# 错误响应示例:
{
"error": "UPDATE_EXPIRE_FAILED",
"message": "更新过期时间失败"
}
# 按瓦片索引渲染为图片
# 请求 URL:
http://host:port/heycloud/api/render/layer/:uid/tile/:z/:x/:y/:scale/image.:format
# 请求方式:
- GET
# 请求 Header:
字段 | 类型 | 是否必选 | 说明 |
---|---|---|---|
x-heycloud-admin-session | String | 否 | 通过 session 提供管理权限 |
x-heycloud-account-id | String | 否 | 帐号的唯一标识符 |
x-heycloud-render-disable-cache | String | 否 | 如为字符串'true'则不使用缓存数据,确保为最新的渲染效果 |
x-heycloud-render-cache | String | 否 | 渲染结果的缓存时间,单位秒 |
x-heycloud-render-timeout | String | 否 | 渲染的超时时间,单位秒 |
x-heycloud-render-limit | String | 否 | 渲染的对象数量限制,<0 即不作限制,该值只对数据库有效 |
# 请求参数:
# Params&Query:
字段 | 类型 | 说明 |
---|---|---|
uid | String | 渲染配置的唯一标识,配置的变化会导致 uid 的变化 |
z | String | 瓦片的层级 |
x | String | 瓦片 x 方向的索引 |
y | String | 瓦片 y 方向的索引 |
scale | String | 渲染的缩放比例,用于高清出图 |
format | String | 图片格式,支持 png/jpeg/webp |
# 请求示例:
GET http://host:port/heycloud/api/render/layer/:uid/tile/:z/:x/:y/:scale/image.:format
# 正确响应示例:
{image/*}
# 错误响应示例:
{
"error": "ERROR",
"message": "错误信息"
}
# 按地图范围渲染为图片
# 请求 URL:
http://host:port/heycloud/api/render/layer/:uid/:bbox/:width/:height/:scale/image.:format
# 请求方式:
- GET
# 请求 Header:
字段 | 类型 | 是否必选 | 说明 |
---|---|---|---|
x-heycloud-admin-session | String | 否 | 通过 session 提供管理权限 |
x-heycloud-account-id | String | 否 | 帐号的唯一标识符 |
x-heycloud-render-disable-cache | String | 否 | 如为字符串'true'则不使用缓存数据,确保为最新的渲染效果 |
x-heycloud-render-cache | String | 否 | 渲染结果的缓存时间,单位秒 |
x-heycloud-render-timeout | String | 否 | 渲染的超时时间,单位秒 |
x-heycloud-render-limit | String | 否 | 渲染的对象数量限制,<=0 即不作限制,该值只对数据库有效 |
# 请求参数:
# Params&Query:
字段 | 类型 | 说明 |
---|---|---|
uid | String | 渲染配置的唯一标识,配置的变化会导致 uid 的变化 |
bbox | String | 逗号分隔的地图范围,格式为 xmin,ymin,xmax,ymax |
width | Number | 渲染结果的宽度,单位像素 |
height | Number | 渲染结果的高度,单位像素 |
scale | Number | 渲染的缩放比例,用于高清出图 |
format | String | 图片格式,支持 png/jpeg/webp |
# 请求示例:
GET http://host:port/heycloud/api/render/layer/:uid/:bbox/:width/:height/:scale/image.:format
# 正确响应示例:
{image/*}
# 错误响应示例:
{
"error": "ERROR",
"message": "错误信息"
}
# 按瓦片索引渲染为 UTFGrid
# 请求 URL:
http://host:port/heycloud/api/render/layer/:uid/tile/:z/:x/:y/utfgrid
# 请求方式:
- GET
# 请求 Header:
字段 | 类型 | 是否必选 | 说明 |
---|---|---|---|
x-heycloud-admin-session | String | 否 | 通过 session 提供管理权限 |
x-heycloud-account-id | String | 否 | 帐号的唯一标识符 |
x-heycloud-render-disable-cache | String | 否 | 如为字符串'true'则不使用缓存数据,确保为最新的渲染效果 |
x-heycloud-render-cache | String | 否 | 渲染结果的缓存时间,单位秒 |
x-heycloud-render-timeout | String | 否 | 渲染的超时时间,单位秒 |
x-heycloud-render-limit | String | 否 | 渲染的对象数量限制,<=0 即不作限制,该值只对数据库有效 |
# 请求参数:
# Params&Query:
字段 | 类型 | 说明 |
---|---|---|
uid | String | 渲染配置的唯一标识,配置的变化会导致 uid 的变化 |
z | String | 瓦片的层级 |
x | String | 瓦片 x 方向的索引 |
y | String | 瓦片 y 方向的索引 |
fields | String | 逗号分隔的字段列表,如 "name,center" |
# 请求示例:
GET http://host:port/heycloud/api/render/layer/:uid/tile/:z/:x/:y/utfgrid
# 正确响应示例:
{
"grid":[xxx],
...
}
# 错误响应示例:
{
"error": "ERROR",
"message": "错误信息"
}
# 按地图范围渲染为 UTFGrid
# 请求 URL:
http://host:port/heycloud/api/render/layer/:uid/:bbox/:width/:height/utfgrid
# 请求方式:
- GET
# 请求 Header:
字段 | 类型 | 是否必选 | 说明 |
---|---|---|---|
x-heycloud-admin-session | String | 否 | 通过 session 提供管理权限 |
x-heycloud-account-id | String | 否 | 帐号的唯一标识符 |
x-heycloud-render-disable-cache | String | 否 | 如为字符串'true'则不使用缓存数据,确保为最新的渲染效果 |
x-heycloud-render-cache | String | 否 | 渲染结果的缓存时间,单位秒 |
x-heycloud-render-timeout | String | 否 | 渲染的超时时间,单位秒 |
x-heycloud-render-limit | String | 否 | 渲染的对象数量限制,<=0 即不作限制,该值只对数据库有效 |
# 请求参数:
# Params&Query:
字段 | 类型 | 说明 |
---|---|---|
uid | String | 渲染配置的唯一标识,配置的变化会导致 uid 的变化 |
bbox | String | 逗号分隔的地图范围,格式为 xmin,ymin,xmax,ymax |
width | Number | 渲染结果的宽度,单位像素 |
height | Number | 渲染结果的高度,单位像素 |
fields | String | 逗号分隔的字段列表,如 "name,center" |
# 请求示例:
GET http://host:port/heycloud/api/render/layer/:uid/:bbox/:width/:height/utfgrid
# 正确响应示例:
{
"grid":[xxx],
...
}
# 错误响应示例:
{
"error": "ERROR",
"message": "错误信息"
}
# 按瓦片索引渲染为热力数据
# 请求 URL:
http://host:port/heycloud/api/render/layer/:uid/tile/:z/:x/:y/heat
# 请求方式:
- GET
# 请求 Header:
字段 | 类型 | 是否必选 | 说明 |
---|---|---|---|
x-heycloud-admin-session | String | 否 | 通过 session 提供管理权限 |
x-heycloud-account-id | String | 否 | 帐号的唯一标识符 |
x-heycloud-render-disable-cache | String | 否 | 如为字符串'true'则不使用缓存数据,确保为最新的渲染效果 |
x-heycloud-render-cache | String | 否 | 渲染结果的缓存时间,单位秒 |
x-heycloud-render-timeout | String | 否 | 渲染的超时时间,单位秒 |
x-heycloud-render-limit | String | 否 | 渲染的对象数量限制,<=0 即不作限制,该值只对数据库有效 |
# 请求参数:
# Params&Query:
字段 | 类型 | 说明 |
---|---|---|
uid | String | 渲染配置的唯一标识,配置的变化会导致 uid 的变化 |
z | String | 瓦片的层级 |
x | String | 瓦片 x 方向的索引 |
y | String | 瓦片 y 方向的索引 |
field | String | 指定用于计算热度的字段,默认不指定时使用点数量计算热度 |
# 请求示例:
GET http://host:port/heycloud/api/render/layer/:uid/tile/:z/:x/:y/heat
# 正确响应示例:
{
"type": "FeatureCollection",
"features": []
}
# 错误响应示例:
{
"error": "ERROR",
"message": "错误信息"
}
# 按地图范围渲染为热力数据
# 请求 URL:
http://host:port/heycloud/api/render/layer/:uid/:bbox/:width/:height/heat
# 请求方式:
- GET
# 请求 Header:
字段 | 类型 | 是否必选 | 说明 |
---|---|---|---|
x-heycloud-admin-session | String | 否 | 通过 session 提供管理权限 |
x-heycloud-account-id | String | 否 | 帐号的唯一标识符 |
x-heycloud-render-disable-cache | String | 否 | 如为字符串'true'则不使用缓存数据,确保为最新的渲染效果 |
x-heycloud-render-cache | String | 否 | 渲染结果的缓存时间,单位秒 |
x-heycloud-render-timeout | String | 否 | 渲染的超时时间,单位秒 |
x-heycloud-render-limit | String | 否 | 渲染的对象数量限制,<=0 即不作限制,该值只对数据库有效 |
# 请求参数:
# Params&Query:
字段 | 类型 | 说明 |
---|---|---|
uid | String | 渲染配置的唯一标识,配置的变化会导致 uid 的变化 |
bbox | String | 逗号分隔的地图范围,格式为 xmin,ymin,xmax,ymax |
width | Number | 渲染结果的宽度,单位像素 |
height | Number | 渲染结果的高度,单位像素 |
field | String | 指定用于计算热度的字段,默认不指定时使用点数量计算热度 |
# 请求示例:
GET http://host:port/heycloud/api/render/layer/:uid/:bbox/:width/:height/heat
# 正确响应示
{
"type": "FeatureCollection",
"features": []
}
# 错误响应示例:
{
"error": "ERROR",
"message": "错误信息"
}
# 进行识别操作
# 请求 URL:
http://host:port/heycloud/api/render/layer/:uid/identify
# 请求方式:
- POST
# 请求 Header:
字段 | 类型 | 是否必选 | 说明 |
---|---|---|---|
x-heycloud-admin-session | String | 否 | 通过 session 提供管理权限 |
x-heycloud-account-id | String | 否 | 帐号的唯一标识符 |
x-heycloud-render-disable-cache | String | 否 | 如为字符串'true'则不使用缓存数据,确保为最新的渲染效果 |
x-heycloud-render-cache | String | 否 | 渲染结果的缓存时间,单位秒 |
x-heycloud-render-timeout | String | 否 | 渲染的超时时间,单位秒 |
# 请求参数:
属性名称 | 可选值 | 类型 | 是否必须 | 默认值 | 说明 |
---|---|---|---|---|---|
uid | - | String | 是 | - | 渲染配置的唯一标识,配置的变化会导致 uid 的变化 |
point | - | Array | 是 | - | 识别的坐标点,通常应该是客户端点击的位置 |
res | - | Number | 是 | - | 当前的地图分辨率 |
tolerance | - | Number | 否 | 2 | 识别的容差,单位为像素 |
limit | - | Number | 否 | 5 | 最大返回的结果数量 |
fields | - | Array | 否 | [] | 返回的字段 |
# 请求示例:
POST http://host:port/heycloud/api/render/layer/:uid/identify
{
"point": [15638404.490920784,4380147.46885374],
"res": 611.4962262814088,
"fields": ["id", "nl_name"]
}
# 正确响应示例:
[{"id": "14", "nl_name": "茨城県"}]
# 错误响应示例:
{
"error": "ERROR",
"message": "错误信息"
}
# WMS 接口
# 请求 URL:
http://host:port/heycloud/api/render/layer/:uid/wms
# 请求方式:
- GET
# 请求 Header:
字段 | 类型 | 是否必选 | 说明 |
---|---|---|---|
x-heycloud-admin-session | String | 否 | 通过 session 提供管理权限 |
x-heycloud-account-id | String | 否 | 帐号的唯一标识符 |
x-heycloud-render-disable-cache | String | 否 | 如为字符串'true'则不使用缓存数据,确保为最新的渲染效果 |
x-heycloud-render-cache | String | 否 | 渲染结果的缓存时间,单位秒 |
x-heycloud-render-timeout | String | 否 | 渲染的超时时间,单位秒 |
x-heycloud-render-limit | String | 否 | 渲染的对象数量限制,<0 即不作限制,该值只对数据库有效 |
# 请求参数:
# Params:
字段 | 类型 | 说明 |
---|---|---|
uid | String | 渲染配置的唯一标识,配置的变化会导致 uid 的变化 |
# Query:
字段 | 类型 | 说明 |
---|---|---|
request | String | 操作,可选 GetCapabilities/GetMap |
bbox | String | 逗号分隔的渲染范围 |
width | Number | 图片的像素宽度 |
height | Number | 图片的像素高度 |
format | String | 图片格式,image/png image/jpeg image/webp |
format_options | String | WMS 的格式选项,如 dpi:140 |
# 请求示例:
GET http://host:port/heycloud/api/render/layer/:uid/wms?request=GetMap&bbox=15654303,4696291,15967389,5009377&width=256&height=256&format=image/png
# WMTS GetCapabilities/GetTile KVP 接口
# 请求 URL:
http://host:port/heycloud/api/render/layer/:uid/wmts
# 请求方式:
- GET
# 请求 Header:
字段 | 类型 | 是否必选 | 说明 |
---|---|---|---|
x-heycloud-admin-session | String | 否 | 通过 session 提供管理权限 |
x-heycloud-account-id | String | 否 | 帐号的唯一标识符 |
x-heycloud-render-disable-cache | String | 否 | 如为字符串'true'则不使用缓存数据,确保为最新的渲染效果 |
x-heycloud-render-cache | String | 否 | 渲染结果的缓存时间,单位秒 |
x-heycloud-render-timeout | String | 否 | 渲染的超时时间,单位秒 |
x-heycloud-render-limit | String | 否 | 渲染的对象数量限制,<0 即不作限制,该值只对数据库有效 |
# 请求参数:
# Params:
字段 | 类型 | 说明 |
---|---|---|
uid | String | 渲染配置的唯一标识,配置的变化会导致 uid 的变化 |
# Query:
字段 | 类型 | 说明 |
---|---|---|
request | String | 操作,可选 GetCapabilities/GetTile |
style | String | 样式,可选 defaultStyle/retinaStyle |
tileMatrix | Number | 瓦片的层级 |
tileCol | Number | 瓦片 x 方向的索引 |
tileRow | Number | 瓦片 y 方向的索引 |
format | String | 图片格式,支持 png/jpeg/webp |
# 请求示例:
GET http://host:port/heycloud/api/render/layer/:uid/wmts?request=GetTile&tileMatrix=0&tileRow=0&tileCol=0&format=png
# WMTS GetCapabilities RESTful 接口
# 请求 URL:
http://host:port/heycloud/api/render/layer/:uid/wmts/:version/WMTSCapabilities.xml
# 请求方式:
- GET
# 请求参数:
# Params:
字段 | 类型 | 说明 |
---|---|---|
uid | String | 渲染配置的唯一标识,配置的变化会导致 uid 的变化 |
version | String | WMTS 版本,前只应为 1.0.0 |
# 请求示例:
GET http://host:port/heycloud/api/render/layer/:uid/wmts/1.0.0/WMTSCapabilities.xml
# WMTS GetTile RESTful 接口
# 请求 URL:
http://host:port/heycloud/api/render/layer/:uid/wmts/tile/:version/:layer/:style/:tileMatrixSet/:tileMatrix/:tileRow/:tileCol.:format
# 请求方式:
- GET
# 请求 Header:
字段 | 类型 | 是否必选 | 说明 |
---|---|---|---|
x-heycloud-admin-session | String | 否 | 通过 session 提供管理权限 |
x-heycloud-account-id | String | 否 | 帐号的唯一标识符 |
x-heycloud-render-disable-cache | String | 否 | 如为字符串'true'则不使用缓存数据,确保为最新的渲染效果 |
x-heycloud-render-cache | String | 否 | 渲染结果的缓存时间,单位秒 |
x-heycloud-render-timeout | String | 否 | 渲染的超时时间,单位秒 |
x-heycloud-render-limit | String | 否 | 渲染的对象数量限制,<0 即不作限制,该值只对数据库有效 |
# 请求参数:
# Params:
字段 | 类型 | 说明 |
---|---|---|
uid | String | 渲染配置的唯一标识,配置的变化会导致 uid 的变化 |
version | String | WMTS 版本,目前只应为 1.0.0 |
layer | String | 图层,目前只应为 defaultLayer |
style | String | 样式,可选 defaultStyle/retinaStyle |
tileMatrixSet | String | 瓦片层级定义,目前只应为 defaultTileMatrixSet |
tileMatrix | String | 瓦片的层级 |
tileCol | String | 瓦片 x 方向的索引 |
tileRow | String | 瓦片 y 方向的索引 |
format | String | 图片格式,支持 png/jpeg/webp |
# 请求示例:
GET http://host:port/heycloud/api/render/layer/:uid/wmts/tile/1.0.0/defaultLayer/retinaStyle/defaultTileMatrixSet/0/0/0.png
← 基础功能 渲染多个图层组成的地图 →