将三维线加载到三维场景,贴对象显示,贴附于倾斜摄影模型。之后,改变图层的Style为绝对高程模式,但没有反应。当再次触发该事件时,打断点,可以看到该图层的Style确实已经为Absolulte模式,但是显示还是贴地模式。代码如下。
if (nodeBase.Nodes[i].IsSelected)
{
layerName = nodeBase.Nodes[i].Name;
Layer3D currentLayer = mSceneControl.Scene.Layers[layerName];
Layer3DSettingVector setting = (currentLayer as Layer3DDataset).AdditionalSetting as
Layer3DSettingVector;
GeoStyle3D geoStyle3D = setting.Style; // 线的风格
geoStyle3D.AltitudeMode = AltitudeMode.Absolute;
(currentLayer as Layer3DDataset).AdditionalSetting = setting;
mSceneControl.Update();
mLayersControl.Refresh();
mSceneControl.Scene.Refresh();
}