com.supermap.realspace
类 Layer3DMap
- java.lang.Object
-
- com.supermap.data.InternalHandle
-
- com.supermap.realspace.Layer3D
-
- com.supermap.realspace.Layer3DMap
-
public class Layer3DMap extends Layer3D
三维地图图层类,继承于Layer3D
类型。该图层可以使二维地图在三维场景中直接显示,展示二维与三维的一体化。可以通过
Layer3Ds.add(String dataName, Layer3Dtype layerType, boolean addToHead)
相关方法添加该类型图层到三维场景中。上面的方法需要传入三个参数,dataName对应的是在工作空间中地图的名称,这个工作空间与三维场景所关联的工作空间是同一个对象;layerType 对应的是三维图层的类型,对于三维地图图层应当选择 Layer3DType.Map 类型;addToHead 表示是否将新添加的三维图层加到最上面。
-
-
方法概要
所有方法 实例方法 具体方法 限定符和类型 方法和说明 long
getCacheCapacity()
返回该三维地图图层的缓存容量,单位为B。String
getCacheDirectory()
返回该三维地图图层浏览过程中存放生成缓存文件的路径。Map
getMap()
返回三维地图图层对象相关联的地图对象。Color
getTransparentColor()
返回透明色。int
getTransparentColorTolerance()
返回透明色容限,容限范围是(0~255)。boolean
isBackgroundTransparent()
返回添加到三维场景中的二维地图的背景是否透明。boolean
isCacheAutoCleared()
返回该三维地图图层使用的缓存是否在程序退出时清空生成的缓存文件。boolean
isCacheEnabled()
返回该三维地图图层是否使用缓存。boolean
isRenderingWithMultiResolution()
返回是否多分辨率渲染。boolean
isTransparent()
返回是否使透明色及其容限范围内的颜色透明显示。void
setBackgroundTransparent(boolean value)
设置添加到三维场景中的二维地图的背景是否透明。void
setCacheAutoCleared(boolean value)
设置该三维地图图层使用的缓存是否在程序退出时清空生成的缓存文件。void
setCacheCapacity(long value)
设置该三维地图图层的缓存容量,单位为 B。void
setCacheDirectory(String value)
设置该三维地图图层浏览过程中存放生成缓存文件的路径。void
setCacheEnabled(boolean value)
设置该三维地图图层是否使用缓存。void
setRenderingWithMultiResolution(boolean renderingWithMultiResolution)
设置是否多分辨率渲染。void
setTransparent(boolean value)
设置是否使透明色及其容限范围内的颜色透明显示。void
setTransparentColor(Color value)
设置透明色。void
setTransparentColorTolerance(int value)
设置透明色容限,容限范围是(0~255)。-
从类继承的方法 com.supermap.realspace.Layer3D
clearCustomClipPlane, clipByBox, fromXML, getAlphaReject, getBounds, getBoxClipPart, getCaption, getClipBox, getClipLineColor, getCustomClipCross, getCustomClipPlane, getDataName, getDescription, getEditFeature, getExtendXML, getFeatures, getFilterPixelSize, getMapServiceType, getMaxObjectVisibleDistance, getMaxVisibleAltitude, getMinObjectVisibleDistance, getMinVisibleAltitude, getMixColorType, getName, getParentGroup, getParentLayer, getPassword, getReceiveSunLight, getReleaseWhenInvisible, getSelection, getShdowType, getSnap, getSwipeRegion, getType, getVisibleDistance, getVisibleInViewport, hasLocalCache, isAlwaysRender, isChangedToLayerStyle, isDisposed, isEditable, isSelectable, isShadowEnable, isSketchMode, isSwipeEnable, isVertexColorLinear, isVisible, isWebDatasource, setAlphaReject, setAlwaysRender, setCaption, setChangedToLayerStyle, setClipLineColor, setCustomClipCross, setCustomClipPlane, setDescription, setEditable, setFilterPixelSize, setLocalCache, setMaxObjectVisibleDistance, setMaxVisibleAltitude, setMinObjectVisibleDistance, setMinVisibleAltitude, setMixColorType, setParentGroup, setParentLayer, setReceiveSunLight, setReleaseWhenInvisible, setSelectable, setSelection, setShadowEnable, setShadowType, setSkecthMode, setSketchMode, setSnap, setSwipeEnable, setSwipeRegion, setVertexColorLinear, setVisible, setVisibleDistance, setVisibleInViewport, toXML, updateData
-
-
-
-
方法详细资料
-
getMap
public Map getMap()
返回三维地图图层对象相关联的地图对象。- 返回:
- 三维地图图层对象相关联的地图对象。
-
getCacheDirectory
public String getCacheDirectory()
返回该三维地图图层浏览过程中存放生成缓存文件的路径。- 返回:
- 该三维地图图层浏览过程中存放生成缓存文件的路径。
- 默认值:
- 默认值为临时文件夹。
-
setCacheDirectory
public void setCacheDirectory(String value)
设置该三维地图图层浏览过程中存放生成缓存文件的路径。- 参数:
value
- 该三维地图图层浏览过程中存放生成缓存文件的路径。
-
getCacheCapacity
public long getCacheCapacity()
返回该三维地图图层的缓存容量,单位为B。- 返回:
- 该三维地图图层的缓存容量。
- 默认值:
- 默认大小为 2GB。
-
setCacheCapacity
public void setCacheCapacity(long value)
设置该三维地图图层的缓存容量,单位为 B。- 参数:
value
- 该三维地图图层的缓存容量,单位为 B。
-
isCacheAutoCleared
public boolean isCacheAutoCleared()
返回该三维地图图层使用的缓存是否在程序退出时清空生成的缓存文件。- 返回:
- 该三维地图图层使用的缓存是否在程序退出时清空生成的缓存文件。
-
setCacheAutoCleared
public void setCacheAutoCleared(boolean value)
设置该三维地图图层使用的缓存是否在程序退出时清空生成的缓存文件。- 参数:
value
- 该三维地图图层使用的缓存是否在程序退出时清空生成的缓存文件。
-
isCacheEnabled
public boolean isCacheEnabled()
返回该三维地图图层是否使用缓存。- 返回:
- 该三维地图图层是否使用缓存。
-
setCacheEnabled
public void setCacheEnabled(boolean value)
设置该三维地图图层是否使用缓存。- 参数:
value
- 该三维地图图层是否使用缓存。
-
isTransparent
public boolean isTransparent()
返回是否使透明色及其容限范围内的颜色透明显示。- 返回:
- 是否使透明色及其容限范围内的颜色透明显示。
-
setTransparent
public void setTransparent(boolean value)
设置是否使透明色及其容限范围内的颜色透明显示。- 参数:
value
- 是否使透明色及其容限范围内的颜色透明显示。
-
getTransparentColor
public Color getTransparentColor()
返回透明色。- 返回:
- 透明色。
-
setTransparentColor
public void setTransparentColor(Color value)
设置透明色。- 参数:
value
- 透明色
-
getTransparentColorTolerance
public int getTransparentColorTolerance()
返回透明色容限,容限范围是(0~255)。- 返回:
- 透明色容限,容限范围是(0~255)。
-
setTransparentColorTolerance
public void setTransparentColorTolerance(int value)
设置透明色容限,容限范围是(0~255)。- 参数:
value
- 透明色容限,容限范围是(0~255)。
-
isRenderingWithMultiResolution
public boolean isRenderingWithMultiResolution()
返回是否多分辨率渲染。- 返回:
- 一个布尔值,表示是否多分辨率渲染。
-
setRenderingWithMultiResolution
public void setRenderingWithMultiResolution(boolean renderingWithMultiResolution)
设置是否多分辨率渲染。- 参数:
renderingWithMultiResolution
- 是否多分辨率渲染。参数设置为 true 时,以多分辨率渲染,效果图如下:
参数设置为 false 时,以一种分辨率渲染,效果图如下:
-
isBackgroundTransparent
public boolean isBackgroundTransparent()
返回添加到三维场景中的二维地图的背景是否透明。- 返回:
- 一个布尔值,返回值为 true,表示地图背景透明,返回值为 false,表示地图背景不透明。
- 默认值:
- 默认值为 true,表示三维地图图层的背景透明。
-
setBackgroundTransparent
public void setBackgroundTransparent(boolean value)
设置添加到三维场景中的二维地图的背景是否透明。二维地图配图时,经常为了地图的整体美观设置地图背景色,将设置了背景色的二维地图添加到三维场景中时,半个三维球的范围都会被地图覆盖,如下图所示,等同于该方法设置 false 时的效果。
设置三维地图背景透明后,即该方法设置为 true 时,可以直观查看地图数据范围以外的区域三维球,使得在三维场景中有较好的视角效果,如下图所示。
- 参数:
value
- 三维地图图层背景是否透明。
-
-
Copyright © 2021–2024 SuperMap. All rights reserved.