PandaGIS的SkyLine开发教程(1)__三维场景下的矢量数据的属性查询方法和对象闪烁

PandaGIS的SkyLine开发教程(1)截图.JPG (120.46 KB)
2009-4-29 10:18

   通常我们把Shp格式的数据导入三维场景中,无论直接导入还是以流的方式导入,都能够进行对象查询。对于线型对象,只要能够捕捉到线对象,就能进行属性查询,而导入的面对象,则要注意对于面的透明度这一属性进行设置,不能为零,否则无法捕捉到面对象。
      对于线闪烁和面闪烁则通过改变其线宽,边界颜色,填充颜色和透明度来实现。以下是线闪烁和面闪烁的相关代码,以供学习
            if (tempObj.ObjectType == TerraExplorerX.ObjectTypeCode.OT_POLYLINE)
            {
               //保存原有属性
                FgColor = tempObj.FgColor;
                FgAlpha = tempObj.FgAlpha;
                LineWidth = tempObj.LineWidth;

                tempObj.LineWidth = LineWidth + 3;
                tempObj.FgColor = 255;
                tempObj.FgAlpha = 1;
            }
            if (tempObj.ObjectType == TerraExplorerX.ObjectTypeCode.OT_POLYGON)
            {
                //保存原有属性
                FgColor = tempObj.FgColor;
                FgAlpha = tempObj.FgAlpha;
                LineWidth = tempObj.LineWidth;
                BgColor = tempObj.BgColor;
                BgAlpha = tempObj.BgAlpha;

                tempObj.LineWidth = LineWidth + 3;
                tempObj.BgColor = 65535;
                tempObj.BgAlpha = 0.36;
                tempObj.FgColor = 255;
                tempObj.FgAlpha = 1;
            }

        private void timer1_Tick(object sender, EventArgs e)
        {
            if (bVisable)
            {
                //隐藏对象
                tempObj.Visible = 0;
            }
            else
            {
                //显示对象
                tempObj.Visible = 1;
            }
            bVisable = !bVisable;
        }

相关文章:

  • 2021-11-18
  • 2021-04-22
  • 2022-12-23
  • 2021-11-02
  • 2021-08-07
  • 2021-11-28
  • 2021-04-06
  • 2021-12-09
猜你喜欢
  • 2021-11-26
  • 2021-11-22
  • 2021-06-09
  • 2021-11-20
  • 2021-10-26
  • 2021-08-18
  • 2021-10-17
相关资源
相似解决方案