三维图层类。该类提供了三维图层显示和控制等便于三维地图管理的一系列属性。
命名空间:
SuperMap.Realspace程序集: SuperMap.Realspace (in SuperMap.Realspace)
版本: dll
语法
C# |
---|
public class Layer3D |
备注
三维图层种类有以下几种:数据集类型三维图层、地图类型三维图层、KML类型三维图层、影像文件类型三维图层、模型缓存类型三维图层和矢量文件图层。各种类型三维图层可以叠加在一起显示。
三维图层类提供了对三维图层的显示、选择等状态的控制,可以实现控制图层是否可选择,是否显示,还可以利用该类提供的属性获取图层中被选择的对象集合等。
示例
以下代码示范了三维图层的一些操作。
假设已经存在一个KML文件(KML.kml)。
CopyC#
public void TestLayer3D(Scene sceneObject) { //将已有的KML文件添加到三维场景中,作为KML图层显示在三维场景窗口中 Layer3D layerKML = sceneObject.Layers.Add("G:\\Data\\KML.kml",Layer3DType.KML, true); //对KML类型的三维图层进行设置 layerKML.Caption = "KMLlayer3D"; layerKML.Description = "示范三维图层的相关操作"; layerKML.IsEditable = false; layerKML.IsSelectable = false; layerKML.IsVisible = true; String layerName = layerKML.Name; Console.WriteLine("该三维图层的名称为:"+layerName); //向该三维图层中添加三维要素 Point3D point3D = new Point3D(102, 31, 0); GeoCone geoCone = new GeoCone(point3D, 800, 800); GeoModel geoModel = geoCone.GetGeoModel(80, 80); GeoPlacemark geoPlacemark = new GeoPlacemark("圆锥体", geoModel); layerKML.Features.Add(geoPlacemark); //根据指定的飞行模式,飞行到目标对象 sceneObject.Fly(geoPlacemark, FlyingMode.FlyingTo); sceneObject.Refresh(); }
继承层次
System..::.Object
SuperMap.Realspace..::.Layer3D
SuperMap.Realspace..::.Layer3DDataset
SuperMap.Realspace..::.Layer3DDynamicObject
SuperMap.Realspace..::.Layer3DField
SuperMap.Realspace..::.Layer3DFieldFile
SuperMap.Realspace..::.Layer3DGrid
SuperMap.Realspace..::.Layer3DGroup
SuperMap.Realspace..::.Layer3DImageFile
SuperMap.Realspace..::.Layer3DKML
SuperMap.Realspace..::.Layer3DMap
SuperMap.Realspace..::.Layer3DModel
SuperMap.Realspace..::.Layer3DOSGBFile
SuperMap.Realspace..::.Layer3DOSGBGroup
SuperMap.Realspace..::.Layer3DVectorFile
SuperMap.Realspace..::.Layer3DVolumeFile
SuperMap.Realspace..::.Layer3DWMS
SuperMap.Realspace..::.Layer3DWMTS
SuperMap.Realspace..::.Layer3D
SuperMap.Realspace..::.Layer3DDataset
SuperMap.Realspace..::.Layer3DDynamicObject
SuperMap.Realspace..::.Layer3DField
SuperMap.Realspace..::.Layer3DFieldFile
SuperMap.Realspace..::.Layer3DGrid
SuperMap.Realspace..::.Layer3DGroup
SuperMap.Realspace..::.Layer3DImageFile
SuperMap.Realspace..::.Layer3DKML
SuperMap.Realspace..::.Layer3DMap
SuperMap.Realspace..::.Layer3DModel
SuperMap.Realspace..::.Layer3DOSGBFile
SuperMap.Realspace..::.Layer3DOSGBGroup
SuperMap.Realspace..::.Layer3DVectorFile
SuperMap.Realspace..::.Layer3DVolumeFile
SuperMap.Realspace..::.Layer3DWMS
SuperMap.Realspace..::.Layer3DWMTS