图层组(已过时,还请参见专题)
# 图层组说明
对接的时候给你们提供的可操作图层列表 通过一个parentId进行获取到所有的可操作图层,这个图层组通过现场运维给你们进行分配产生的.
# 获取图层组下所有的图层信息列表
接口地址:/one-map-server/om/OmCatalog/getLayerGroupLayers
请求方式:GET
请求数据类型:application/x-www-form-urlencoded
响应数据类型:*/*
接口描述:
请求参数:
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
|---|---|---|---|---|---|
| parentId | 图层组id | query | false | string | |
| queryName | 图层名称过滤条件 | query | false | string |
响应状态:
| 状态码 | 说明 | schema |
|---|---|---|
| 200 | Success | NodeVo |
| 499 | Error | NodeVo |
响应参数:
| 参数名称 | 参数说明 | 类型 | schema |
|---|---|---|---|
| bizType | 图层在一张图的业务分类 | string | |
| childNode | 子节点对象 | array | ICatalogNode |
| customParam | 图层对象详细信息 | object | |
| id | 关联对象的id(并不重要) | string | |
| name | 图层名称 | string | |
| parentId | string | ||
| reId | 图层Id(非常重要) | string | |
| sysType | string |
响应示例:
{
"code": 200,
"alertType": 0,
"alertMsg": null,
"data": [
{
"childNode": [],
"nodeType": "layer",
"parentId": "1805497405451374592", //图层组ID
"style": {},
"bizType": "point",
"slots": {
"icon": "point"
},
"reId": "l_1683687472063119360", //图层id
"customParam": { //这是一整个图层对象
"districtsName": "新疆维吾尔自治区", //图层所属的行政区
"maxLat": "44.5597827608", // 图层的bbox
"minLat": "-1.7976931348623157E308",
"id": "l_1683687472063119360",
"childIs": "NO",
"layerUrl": "/sys/geom/rest/t_1683687472063119360/{z}/{x}/{y}",// 图层矢量瓦片的地址
"fenceGtcId": null,
"childLayerType": null,
"appointId": null,
"showIs": "是",
"extAttribute": {
"auth": { // 整个对象,你们不用关注,这是描述你们对该图层具有的权限的一个描述,一般情况下都会给你们全部设置为true
"hasAddRole": true,
"hasFindRole": true,
"hasDelRole": true,
"hasAllRole": true,
"hasRole": true,
"hasUpdateRole": true
}
},
"elementCount": 21, //图层里面有多少数据(理解成表里面有多少行)
"childCountNum": null,
"layerName": "接口文档演示图层", // 图层名称
"bizType": "测试",// ----------------------------------以下字段不用关注----------------------------------------
"districtCode": "650000",
"maxLon": "85.0987899997441",
"orderNum": 29,
"startendLayerId": null,
"tagLayerId": null,
"allowEdit": "YES",
"signpostLayerId": null,
"layerTypeSys": "业务图层",
"var2": null,
"var1": null,
"parentLayerId": null,
"layerType": "point",
"minLon": "75.025154897",
"queryRoleRoleId": null,// ----------------------------------以上字段不用关注----------------------------------------
"simpleShowField": "名称", //simpleShowField 的value指向的是 字段列表中的 表示名称的字段名称
"queryRoleUserId": null,
"tableId": "t_1683687472063119360", //表id 也非常重要
"cacheIs": "NO",
"tagsString": "测试"// ----------------------------------以下字段不用关注----------------------------------------
},
"catalogParam": {
"queryIs": "YES",
"expandIs": "NO"
},
"scopedSlots": {
"title": "name"
},
"name": "接口文档演示图层",
"id": "1805497443850227712",
"orderNum": 1,
"title": "接口文档演示图层",
"isLeaf": true,
"selectable": true,
"key": "1805497443850227712"// ----------------------------------以上字段不用关注----------------------------------------
}
],
"location": null
}
postman示范 
# 对图层组内部所有内容进行全要素搜索
这个接口的作用,就是类似于图层组里面所有的图层(可以理解成数据库表)来了一个UNION合并,再进行了模糊查询.现在第一版本
暂时只是支持了文本查询,暂时不支持文本模糊加上空间范围搜索.
这个接口由于跨表进行UNION合并,所以当要素多了之后,或者表多了之后,就非常卡顿
这个卡顿是非常明显的,如果对性能有要求,最好不要选择该接口,后期会考虑进行切换方式到ES中进行实现快速搜索.但是现在工作繁忙,无暇兼顾.还望见谅
接口地址:/one-map-server/sys/geom/vector/layerGroupSimpleQuery
请求方式:POST
请求数据类型:application/json
响应数据类型:*/*
请求参数:
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
|---|---|---|---|---|---|
| layerGroupId | 图层组ID或者专题ID(上面的那个接口的parentId也是他) | query | false | string | |
| queryStr | 模糊查询的字符串 | query | false | string | |
| queryType | 查询类型(模糊查询 like ,精确查询 equals) | query | false | string | |
| page | 分页条件(默认为1) | query | false | string | |
| limit | 分页条件(默认25) | query | false | string |
响应参数:
| 参数名称 | 参数说明 | 类型 | schema |
|---|---|---|---|
| alertMsg | 提示消息 | string | |
| alertType | 提示消息类型 | integer(int32) | integer(int32) |
| code | 状态码 | integer(int32) | integer(int32) |
| data | 业务数据 | GtcPager«Map«string,object»» | GtcPager«Map«string,object»» |
| list | 业务数据 | Iterable«Map«string,object»» | Iterable«Map«string,object»» |
| pageNum | 当前页码 | integer(int32) | |
| pageParam | 分页参数 | GtcPageParam | GtcPageParam |
| pageNum | 当前页码 | integer | |
| pageSize | 总页数 | integer | |
| startRow | 游标开始行 | integer | |
| pageSize | 总页数 | integer(int32) | |
| startRow | 游标开始行 | integer(int64) | |
| total | 总条数 | integer(int64) | |
| location | 跳转地址 | string |
响应示例:
{
"code": 200,
"alertType": 0,
"alertMsg": null,
"data": {
"pageSize": 10,
"startRow": 10,
"pageNum": 1,
"pageParam": {
"pageSize": 10,
"startRow": 10,
"pageNum": 1
},
"total": 2,//返回总条数
"list": [
{
"type": "layer", //表示图层 名称命中了模糊查询条件
"layer_meta": { //图层对象
"layerType": "point",
"simpleShowField": "名称",
"bizType": "测试",
"layerUrl": "/sys/geom/rest/t_1683687472063119360/{z}/{x}/{y}",
"crs": "4326",
"districtsName": "新疆维吾尔自治区",
"tableId": "t_1683687472063119360",
"elementCount": 22,
"id": "l_1683687472063119360",
"layerName": "接口文档演示图层",
"styleDefaultId": "point_df"
},
"highlightStr": "接口文档演示图层", // 高亮字符串(模糊查询命中的内容)
"layerName": "layerName"
},
{
"type": "element", //表示图层 里面的要素 名称命中了模糊查询条件
"layer_meta": {
"layerType": "point",
"simpleShowField": "名称",
"bizType": "测试",
"layerUrl": "/sys/geom/rest/t_1683687472063119360/{z}/{x}/{y}",
"crs": "4326",
"districtsName": "新疆维吾尔自治区",
"tableId": "t_1683687472063119360",
"elementCount": 22,
"id": "l_1683687472063119360",
"layerName": "接口文档演示图层",
"styleDefaultId": "point_df"
},
"simpleShowField": "名称",
"showFieldValue": "文档",
"highlightStr": "文档",
"highlightField": "名称",
"vactor_data": { //被命中的要素的 详细信息
"gtc_id": "1805501386261106688", //通过图层对象的tableId和这个gtcId 可以查询的要素的详细信息
"名称": "文档"
}
}
]
},
"location": null
}
postman效果

使用方式

上次更新: 2025/02/11, 15:11:04