<scene_uri>/layers[.<format>]
layers 资源对应一个三维场景中的三维图层集合。通过它可以获取当前三维场景中,三维图层的列表。
支持的方法:
支持的表述格式:RJSON、JSON、JSONP、HTML、XML。
对如下 URI 执行 HTTP 请求,以 rjson 输出格式为例加以说明
http://supermapiserver:8090/iserver/services/3D-sample/rest/realspace/scenes/scene/layers.rjson
获取当前三维场景中的三维图层列表。
名称 | 类型 | 含义 |
_cache | boolean | 【可选参数】 是否使用缓存,默认为 true。如果为 false,则关闭所有缓存。 |
对 layers (三维图层集)资源执行 GET 请求,返回的响应是一个三维图层集,其中单个三维图层的描述结构如下:
字段 | 类型 | 说明 |
alwaysRender | boolean | 图层是否始终渲染。 |
bounds | Rectangle2D | 图层范围。 |
cachePassword | String | 三维图层的密码。 |
caption | String | 图层的标题。 默认情况下图层的标题与图层的名称一致,用户可以根据具体情况修改图层的标题。 |
dataConfigPath | String | 三维图层所使用的数据的路径。 |
dataName | String | 三维图层名称。 |
description | String | 图层的描述信息。 |
editable | boolean | 图层是否可被编辑。 |
layer3DType | Layer3DType | 图层的类型。 |
level | int | 缓存层号。 |
maxVisibleAltitude | double | 最大可见高度。 |
minVisibleAltitude | double | 最低可见高度。 |
name | String | 图层的名称。 图层的名称在图层所在的地图中唯一标识此图层,区分大小写。 |
oldCache | boolean | 是否使用旧缓存。 |
queryable | boolean | 图层中的对象是否可以查询。 |
style | String | 图层的渲染风格。 |
subLayers | String | 子图层信息。 |
visible | boolean | 图层是否可见。 |
visibleDistance | double | 三维图层中对象的可见距离。 |
对示例 layers 资源(scene 场景中的三维图层集 )执行 GET 请求,返回的 rjson 格式的表述如下:
[
{
"alwaysRender": true,
"bounds": null,
"cachePassword": "",
"caption": "OlympicGreen",
"dataConfigPath": "C:/SuperMap/SuperMapiServerJava6R/samples/data/Realspace/olympicgreen/OlympicGreen.scv",
"dataName": "OlympicGreen_705273881",
"description": "",
"editable": false,
"layer3DType": "VectorLayer",
"level": -1,
"maxVisibleAltitude": 0,
"minVisibleAltitude": 0,
"name": "OlympicGreen",
"oldCache": false,
"queryable": false,
"style": null,
"subLayers": {},
"type": null,
"visible": true,
"visibleDistance": -1
},
{
"alwaysRender": true,
"bounds": null,
"cachePassword": null,
"caption": "flyRoute2",
"dataConfigPath": "C:/SuperMap/SuperMapiServerJava6R/samples/data/Realspace/flyRoute2.kml",
"dataName": "flyRoute2_3725315",
"description": "",
"editable": false,
"layer3DType": "KMLLayer",
"level": -1,
"maxVisibleAltitude": 0,
"minVisibleAltitude": 0,
"name": "flyRoute2",
"oldCache": false,
"queryable": false,
"subLayers": {},
"type": null,
"visible": true,
"visibleDistance": -1
},
{
"alwaysRender": true,
"bounds": null,
"cachePassword": null,
"caption": "flyRoute1",
"dataConfigPath": "C:/SuperMap/SuperMapiServerJava6R/samples/data/Realspace/flyRoute1.kml",
"dataName": "flyRoute1_4648836",
"description": "",
"editable": false,
"layer3DType": "KMLLayer",
"level": -1,
"maxVisibleAltitude": 0,
"minVisibleAltitude": 0,
"name": "flyRoute1",
"oldCache": false,
"queryable": false,
"subLayers": {},
"type": null,
"visible": true,
"visibleDistance": -1
},
{
"alwaysRender": true,
"bounds": null,
"cachePassword": null,
"caption": "BirdNestRoad",
"dataConfigPath": "C:/SuperMap/SuperMapiServerJava6R/samples/data/Realspace/BirdNestRoad.kml",
"dataName": "BirdNestRoad_1014015224",
"description": "",
"editable": false,
"layer3DType": "KMLLayer",
"level": -1,
"maxVisibleAltitude": 2934.295784,
"minVisibleAltitude": 0,
"name": "BirdNestRoad",
"oldCache": false,
"queryable": false,
"subLayers": {},
"type": null,
"visible": true,
"visibleDistance": -1
},
{
"alwaysRender": true,
"bounds": null,
"cachePassword": null,
"caption": "SubwayPoint@RealspaceSample",
"dataConfigPath": "SubwayPoint@RealspaceSample",
"dataName": "SubwayPoint@RealspaceSample",
"dataset": null,
"description": "",
"displayFilter": null,
"editable": false,
"layer3DSetting": {
"bottomAltitudeField": "",
"extendedHeightField": "",
"layer3DDatasetType": "GRID",
"sideTextureField": "",
"style": {
"altitudeMode": "CLAMP_TO_GROUND",
"bottomAltitude": 0,
"extendedHeight": 0,
"fillForeColor": {
"blue": 229,
"green": 255,
"red": 178
},
"fillMode": "LINE_AND_FILL",
"getMarkerColor": {
"blue": 102,
"green": 178,
"red": 51
},
"lineColor": {
"blue": 51,
"green": 204,
"red": 153
},
"lineWidth": 3,
"markerIconFile": null,
"markerIconScale": 0,
"markerSize": 6,
"sideTextureFiles": [],
"tilingU": 1,
"tilingV": 1,
"topTextureFile": "",
"xml": "<sml:Style>\r\n<sml:PointSize>6.0<\/sml:PointSize>\r\n<sml:ColorPoint>RGBA(0.2,0.7,0.4,1.0))<\/sml:ColorPoint>\r\n<sml:LineWidth>3<\/sml:LineWidth>\r\n<sml:Fill3DMode>FILL_FACEANDLINE<\/sml:Fill3DMode>\r\n<sml:ColorFill>RGBA(0.7,1.0,0.9,0.9))<\/sml:ColorFill>\r\n<sml:LineColor>RGBA(0.6,0.8,0.2,1.0))<\/sml:LineColor>\r\n<sml:IconScale>1.0<\/sml:IconScale>\r\n<sml:TilingU>1.0<\/sml:TilingU>\r\n<sml:TilingV>1.0<\/sml:TilingV>\r\n<sml:IconName/>\r\n<sml:SideTextureName/>\r\n<sml:TopTextureName/>\r\n<sml:BottomAltitude>0<\/sml:BottomAltitude>\r\n<sml:ExtendHeight>0<\/sml:ExtendHeight>\r\n<sml:AltitudeMode>ClampToGround<\/sml:AltitudeMode>\r\n<\/sml:Style>\r\n"
},
"tilingUField": "",
"tilingVField": "",
"topTextureField": ""
},
"layer3DType": "VectorLayer",
"level": -1,
"maxVisibleAltitude": 2934.295784,
"minVisibleAltitude": 0,
"name": "SubwayPoint@RealspaceSample",
"oldCache": false,
"queryable": false,
"subLayers": {},
"theme": null,
"type": null,
"visible": true,
"visibleDistance": -1
},
{
"alwaysRender": true,
"bounds": null,
"cachePassword": null,
"caption": "GasPoint@RealspaceSample",
"dataConfigPath": "GasPoint@RealspaceSample",
"dataName": "GasPoint@RealspaceSample",
"dataset": null,
"description": "",
"displayFilter": null,
"editable": false,
"layer3DSetting": {
"bottomAltitudeField": "",
"extendedHeightField": "",
"layer3DDatasetType": "GRID",
"sideTextureField": "",
"style": {
"altitudeMode": "CLAMP_TO_GROUND",
"bottomAltitude": 0,
"extendedHeight": 0,
"fillForeColor": {
"blue": 229,
"green": 255,
"red": 178
},
"fillMode": "LINE_AND_FILL",
"getMarkerColor": {
"blue": 102,
"green": 178,
"red": 51
},
"lineColor": {
"blue": 51,
"green": 204,
"red": 153
},
"lineWidth": 3,
"markerIconFile": null,
"markerIconScale": 0,
"markerSize": 6,
"sideTextureFiles": [],
"tilingU": 1,
"tilingV": 1,
"topTextureFile": "",
"xml": "<sml:Style>\r\n<sml:PointSize>6.0<\/sml:PointSize>\r\n<sml:ColorPoint>RGBA(0.2,0.7,0.4,1.0))<\/sml:ColorPoint>\r\n<sml:LineWidth>3<\/sml:LineWidth>\r\n<sml:Fill3DMode>FILL_FACEANDLINE<\/sml:Fill3DMode>\r\n<sml:ColorFill>RGBA(0.7,1.0,0.9,0.9))<\/sml:ColorFill>\r\n<sml:LineColor>RGBA(0.6,0.8,0.2,1.0))<\/sml:LineColor>\r\n<sml:IconScale>1.0<\/sml:IconScale>\r\n<sml:TilingU>1.0<\/sml:TilingU>\r\n<sml:TilingV>1.0<\/sml:TilingV>\r\n<sml:IconName/>\r\n<sml:SideTextureName/>\r\n<sml:TopTextureName/>\r\n<sml:BottomAltitude>0<\/sml:BottomAltitude>\r\n<sml:ExtendHeight>0<\/sml:ExtendHeight>\r\n<sml:AltitudeMode>ClampToGround<\/sml:AltitudeMode>\r\n<\/sml:Style>\r\n"
},
"tilingUField": "",
"tilingVField": "",
"topTextureField": ""
},
"layer3DType": "VectorLayer",
"level": -1,
"maxVisibleAltitude": 2934.295784,
"minVisibleAltitude": 0,
"name": "GasPoint@RealspaceSample",
"oldCache": false,
"queryable": false,
"subLayers": {},
"theme": null,
"type": null,
"visible": true,
"visibleDistance": -1
},
{
"alwaysRender": true,
"bounds": null,
"cachePassword": null,
"caption": "BusPoint@RealspaceSample",
"dataConfigPath": "BusPoint@RealspaceSample",
"dataName": "BusPoint@RealspaceSample",
"dataset": null,
"description": "",
"displayFilter": null,
"editable": false,
"layer3DSetting": {
"bottomAltitudeField": "",
"extendedHeightField": "",
"layer3DDatasetType": "GRID",
"sideTextureField": "",
"style": {
"altitudeMode": "CLAMP_TO_GROUND",
"bottomAltitude": 0,
"extendedHeight": 0,
"fillForeColor": {
"blue": 229,
"green": 255,
"red": 178
},
"fillMode": "LINE_AND_FILL",
"getMarkerColor": {
"blue": 102,
"green": 178,
"red": 51
},
"lineColor": {
"blue": 51,
"green": 204,
"red": 153
},
"lineWidth": 3,
"markerIconFile": null,
"markerIconScale": 0,
"markerSize": 6,
"sideTextureFiles": [],
"tilingU": 1,
"tilingV": 1,
"topTextureFile": "",
"xml": "<sml:Style>\r\n<sml:PointSize>6.0<\/sml:PointSize>\r\n<sml:ColorPoint>RGBA(0.2,0.7,0.4,1.0))<\/sml:ColorPoint>\r\n<sml:LineWidth>3<\/sml:LineWidth>\r\n<sml:Fill3DMode>FILL_FACEANDLINE<\/sml:Fill3DMode>\r\n<sml:ColorFill>RGBA(0.7,1.0,0.9,0.9))<\/sml:ColorFill>\r\n<sml:LineColor>RGBA(0.6,0.8,0.2,1.0))<\/sml:LineColor>\r\n<sml:IconScale>1.0<\/sml:IconScale>\r\n<sml:TilingU>1.0<\/sml:TilingU>\r\n<sml:TilingV>1.0<\/sml:TilingV>\r\n<sml:IconName/>\r\n<sml:SideTextureName/>\r\n<sml:TopTextureName/>\r\n<sml:BottomAltitude>0<\/sml:BottomAltitude>\r\n<sml:ExtendHeight>0<\/sml:ExtendHeight>\r\n<sml:AltitudeMode>ClampToGround<\/sml:AltitudeMode>\r\n<\/sml:Style>\r\n"
},
"tilingUField": "",
"tilingVField": "",
"topTextureField": ""
},
"layer3DType": "VectorLayer",
"level": -1,
"maxVisibleAltitude": 2934.295784,
"minVisibleAltitude": 0,
"name": "BusPoint@RealspaceSample",
"oldCache": false,
"queryable": false,
"subLayers": {},
"theme": null,
"type": null,
"visible": true,
"visibleDistance": -1
},
{
"alwaysRender": true,
"bounds": null,
"cachePassword": null,
"caption": "RoadA@RealspaceSample",
"dataConfigPath": "RoadA@RealspaceSample",
"dataName": "RoadA@RealspaceSample",
"dataset": null,
"description": "",
"displayFilter": null,
"editable": false,
"layer3DSetting": {
"bottomAltitudeField": "",
"extendedHeightField": "",
"layer3DDatasetType": "GRID",
"sideTextureField": "",
"style": {
"altitudeMode": "CLAMP_TO_GROUND",
"bottomAltitude": 0,
"extendedHeight": 0,
"fillForeColor": {
"blue": 229,
"green": 255,
"red": 178
},
"fillMode": "LINE_AND_FILL",
"getMarkerColor": {
"blue": 102,
"green": 178,
"red": 51
},
"lineColor": {
"blue": 51,
"green": 204,
"red": 153
},
"lineWidth": 3,
"markerIconFile": null,
"markerIconScale": 0,
"markerSize": 6,
"sideTextureFiles": [],
"tilingU": 1,
"tilingV": 1,
"topTextureFile": "",
"xml": "<sml:Style>\r\n<sml:PointSize>6.0<\/sml:PointSize>\r\n<sml:ColorPoint>RGBA(0.2,0.7,0.4,1.0))<\/sml:ColorPoint>\r\n<sml:LineWidth>3<\/sml:LineWidth>\r\n<sml:Fill3DMode>FILL_FACEANDLINE<\/sml:Fill3DMode>\r\n<sml:ColorFill>RGBA(0.7,1.0,0.9,0.9))<\/sml:ColorFill>\r\n<sml:LineColor>RGBA(0.6,0.8,0.2,1.0))<\/sml:LineColor>\r\n<sml:IconScale>1.0<\/sml:IconScale>\r\n<sml:TilingU>1.0<\/sml:TilingU>\r\n<sml:TilingV>1.0<\/sml:TilingV>\r\n<sml:IconName/>\r\n<sml:SideTextureName/>\r\n<sml:TopTextureName/>\r\n<sml:BottomAltitude>0<\/sml:BottomAltitude>\r\n<sml:ExtendHeight>0<\/sml:ExtendHeight>\r\n<sml:AltitudeMode>ClampToGround<\/sml:AltitudeMode>\r\n<\/sml:Style>\r\n"
},
"tilingUField": "",
"tilingVField": "",
"topTextureField": ""
},
"layer3DType": "VectorLayer",
"level": -1,
"maxVisibleAltitude": 2934.295784,
"minVisibleAltitude": 0,
"name": "RoadA@RealspaceSample",
"oldCache": false,
"queryable": false,
"subLayers": {},
"theme": null,
"type": null,
"visible": true,
"visibleDistance": -1
},
{
"alwaysRender": true,
"bounds": null,
"cachePassword": null,
"caption": "lawn@RealspaceSample",
"dataConfigPath": "lawn@RealspaceSample",
"dataName": "lawn@RealspaceSample",
"dataset": null,
"description": "",
"displayFilter": null,
"editable": false,
"layer3DSetting": {
"bottomAltitudeField": "",
"extendedHeightField": "",
"layer3DDatasetType": "GRID",
"sideTextureField": "",
"style": {
"altitudeMode": "CLAMP_TO_GROUND",
"bottomAltitude": 0,
"extendedHeight": 0,
"fillForeColor": {
"blue": 229,
"green": 255,
"red": 178
},
"fillMode": "LINE_AND_FILL",
"getMarkerColor": {
"blue": 102,
"green": 178,
"red": 51
},
"lineColor": {
"blue": 229,
"green": 229,
"red": 229
},
"lineWidth": 1,
"markerIconFile": null,
"markerIconScale": 0,
"markerSize": 6,
"sideTextureFiles": [],
"tilingU": 1,
"tilingV": 1,
"topTextureFile": "",
"xml": "<sml:Style>\r\n<sml:PointSize>6.0<\/sml:PointSize>\r\n<sml:ColorPoint>RGBA(0.2,0.7,0.4,1.0))<\/sml:ColorPoint>\r\n<sml:LineWidth>1<\/sml:LineWidth>\r\n<sml:Fill3DMode>FILL_FACEANDLINE<\/sml:Fill3DMode>\r\n<sml:ColorFill>RGBA(0.7,1.0,0.9,0.9))<\/sml:ColorFill>\r\n<sml:LineColor>RGBA(0.9,0.9,0.9,1.0))<\/sml:LineColor>\r\n<sml:IconScale>1.0<\/sml:IconScale>\r\n<sml:TilingU>1.0<\/sml:TilingU>\r\n<sml:TilingV>1.0<\/sml:TilingV>\r\n<sml:IconName/>\r\n<sml:SideTextureName/>\r\n<sml:TopTextureName/>\r\n<sml:BottomAltitude>0<\/sml:BottomAltitude>\r\n<sml:ExtendHeight>0<\/sml:ExtendHeight>\r\n<sml:AltitudeMode>ClampToGround<\/sml:AltitudeMode>\r\n<\/sml:Style>\r\n"
},
"tilingUField": "",
"tilingVField": "",
"topTextureField": ""
},
"layer3DType": "VectorLayer",
"level": -1,
"maxVisibleAltitude": 2934.295784,
"minVisibleAltitude": 0,
"name": "lawn@RealspaceSample",
"oldCache": false,
"queryable": false,
"subLayers": {},
"theme": null,
"type": null,
"visible": true,
"visibleDistance": -1
},
{
"alwaysRender": true,
"bounds": null,
"cachePassword": null,
"caption": "buildings@RealspaceSample",
"dataConfigPath": "buildings@RealspaceSample",
"dataName": "buildings@RealspaceSample",
"dataset": null,
"description": "",
"displayFilter": null,
"editable": false,
"layer3DSetting": {
"bottomAltitudeField": "",
"extendedHeightField": "",
"layer3DDatasetType": "GRID",
"sideTextureField": "",
"style": {
"altitudeMode": "CLAMP_TO_GROUND",
"bottomAltitude": 0,
"extendedHeight": 0,
"fillForeColor": {
"blue": 229,
"green": 255,
"red": 178
},
"fillMode": "LINE_AND_FILL",
"getMarkerColor": {
"blue": 102,
"green": 178,
"red": 51
},
"lineColor": {
"blue": 229,
"green": 229,
"red": 229
},
"lineWidth": 1,
"markerIconFile": null,
"markerIconScale": 0,
"markerSize": 6,
"sideTextureFiles": [],
"tilingU": 1,
"tilingV": 1,
"topTextureFile": "",
"xml": "<sml:Style>\r\n<sml:PointSize>6.0<\/sml:PointSize>\r\n<sml:ColorPoint>RGBA(0.2,0.7,0.4,1.0))<\/sml:ColorPoint>\r\n<sml:LineWidth>1<\/sml:LineWidth>\r\n<sml:Fill3DMode>FILL_FACEANDLINE<\/sml:Fill3DMode>\r\n<sml:ColorFill>RGBA(0.7,1.0,0.9,0.9))<\/sml:ColorFill>\r\n<sml:LineColor>RGBA(0.9,0.9,0.9,1.0))<\/sml:LineColor>\r\n<sml:IconScale>1.0<\/sml:IconScale>\r\n<sml:TilingU>1.0<\/sml:TilingU>\r\n<sml:TilingV>1.0<\/sml:TilingV>\r\n<sml:IconName/>\r\n<sml:SideTextureName/>\r\n<sml:TopTextureName/>\r\n<sml:BottomAltitude>0<\/sml:BottomAltitude>\r\n<sml:ExtendHeight>0<\/sml:ExtendHeight>\r\n<sml:AltitudeMode>ClampToGround<\/sml:AltitudeMode>\r\n<\/sml:Style>\r\n"
},
"tilingUField": "",
"tilingVField": "",
"topTextureField": ""
},
"layer3DType": "VectorLayer",
"level": -1,
"maxVisibleAltitude": 2934.295784,
"minVisibleAltitude": 0,
"name": "buildings@RealspaceSample",
"oldCache": false,
"queryable": false,
"subLayers": {},
"theme": null,
"type": null,
"visible": true,
"visibleDistance": -1
},
{
"alwaysRender": true,
"bounds": null,
"cachePassword": null,
"caption": "2015beijingsubway",
"dataConfigPath": "C:/SuperMap/SuperMapiServerJava6R/samples/data/Realspace/2015beijingsubway.kmz",
"dataName": "2015beijingsubway_1906626426",
"description": "",
"editable": false,
"layer3DType": "KMZLayer",
"level": -1,
"maxVisibleAltitude": 4143.914692,
"minVisibleAltitude": 0,
"name": "2015beijingsubway",
"oldCache": false,
"queryable": false,
"subLayers": {},
"type": null,
"visible": true,
"visibleDistance": -1
},
{
"alwaysRender": true,
"bounds": null,
"cachePassword": null,
"caption": "bridge_beijing",
"dataConfigPath": "C:/SuperMap/SuperMapiServerJava6R/samples/data/Realspace/bridge_beijing.kml",
"dataName": "bridge_beijing_1477437759",
"description": "",
"editable": false,
"layer3DType": "KMLLayer",
"level": -1,
"maxVisibleAltitude": 601.746247,
"minVisibleAltitude": 0,
"name": "bridge_beijing",
"oldCache": false,
"queryable": false,
"subLayers": {},
"type": null,
"visible": true,
"visibleDistance": -1
},
{
"alwaysRender": true,
"bounds": null,
"cachePassword": null,
"caption": "beijing@beijing",
"dataConfigPath": "beijing@beijing",
"dataName": "beijing@beijing",
"dataset": null,
"description": "",
"displayFilter": null,
"editable": false,
"layer3DSetting": null,
"layer3DType": "ImageFileLayer",
"level": -1,
"maxVisibleAltitude": 0,
"minVisibleAltitude": 0,
"name": "beijing@beijing",
"oldCache": false,
"queryable": false,
"subLayers": {},
"theme": null,
"type": null,
"visible": true,
"visibleDistance": -1
},
{
"alwaysRender": true,
"bounds": null,
"cacheAutoCleared": false,
"cacheCapacity": -2147483648,
"cacheEnabled": false,
"cachePassword": null,
"caption": "WorldMap",
"dataConfigPath": "WorldMap",
"dataName": "WorldMap",
"description": "",
"editable": false,
"layer3DType": "ImageFileLayer",
"level": -1,
"map": null,
"maxVisibleAltitude": 0,
"minVisibleAltitude": 3145967.927476,
"name": "WorldMap",
"oldCache": false,
"queryable": false,
"subLayers": {},
"type": null,
"visible": true,
"visibleDistance": -1
},
{
"alwaysRender": false,
"bounds": null,
"cachePassword": "",
"caption": "Beijing@RealspaceSample",
"dataConfigPath": "Beijing@RealspaceSample",
"dataName": "Beijing@RealspaceSample_Terrain",
"datasetGrid": null,
"description": "",
"editable": false,
"layer3DType": "TerrainFileLayer",
"level": -1,
"maxVisibleAltitude": 0,
"minVisibleAltitude": 0,
"name": "Beijing@RealspaceSample_Terrain",
"oldCache": false,
"queryable": false,
"subLayers": {},
"type": null,
"visible": true,
"visibleDistance": 0
}
]
返回跟 GET 请求一样的 HTTP 响应头,但是没有响应实体。可以在不必传输整个响应内容的情况下,获取包含在响应消息头中的元数据信息。元数据信息包括媒体类型,字符编码,压缩编码,实体内容长度等。
HEAD 请求可以用来判断三维图层集资源是否存在,或者客户端是否有权限访问 layers 资源。通过对加.<format>的 URI 执行 HEAD 请求,还可以快速判断 layers 资源是否支持<format>格式的表述。