//添加到场景中
Layer3DSettingVector layer3dSetting = new Layer3DSettingVector();
GeoStyle3D geoStyle3D = new GeoStyle3D();
geoStyle3D.AltitudeMode = AltitudeMode.Absolute;
geoStyle3D.FillMode = FillMode3D.LineAndFill;
geoStyle3D.LineColor = Color.Red;
geoStyle3D.LineWidth = 2;
layer3dSetting.Style = geoStyle3D;
m_sceneControl.Scene.Layers.Add(m_datasetVector, layer3dSetting, true);
Theme3DLabel theme = new Theme3DLabel();
theme.LabelExpression = "SmID";
//设置标签文本风格
TextStyle style = new TextStyle();
style.ForeColor = Color.Yellow;
style.FontName = "微软雅黑"; // Times New Roman
style.Outline = true;
style.Weight = 18;
style.FontHeight = 7;
style.Alignment = TextAlignment.BaselineRight;
theme.UniformStyle = style;
//添加到场景中
m_sceneControl.Scene.Layers.Add(m_datasetVector, theme, true);
如上代码,
标签专题图,添加到场景后,标注的文字没显示在线的旁边,而是显示在海拔为0处了