首页 / 浏览问题 / 组件GIS / 问题详情
object.net 标签专题图中的文字高程为0
4EXP 2021年01月14日
//添加到场景中
                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处了

1个回答

同样需要设置专题图图层的高度模式,

  geoStyle3D.AltitudeMode = AltitudeMode.Absolute;
4,620EXP 2021年01月14日
谢谢,我也想的是设置一下高度模式,但是一直没找到在那些属性是高度模型

拿到专题图层的AdditionalSetting属性,强制转换为SuperMap.Realspace..::.Layer3DSettingVector

 然后再Layer3DSettingVector里面去设置高度模式

可以了,谢谢
...