美文网首页
沿线飞行

沿线飞行

作者: 46c039090c91 | 来源:发表于2019-04-16 14:04 被阅读0次

    沿线飞行可以分为两种,一种其实是视角在沿线飞行,还有一种就是沿线飞行。在开发文档上面已经有了区分。

    视角的

    1.FlyAlongWithLine

    private void button4_Click(object sender, EventArgs e)

            {

                GSOFeature feature = globeControl1.Globe.SelectedObject;

                if (feature != null)

                {

                    if (feature.Geometry.Type == EnumGeometryType.GeoPolyline3D)

                    {

                        GSOGeoPolyline3D flyline = feature.Geometry as GSOGeoPolyline3D;

                        globeControl1.Globe.FlyAlongLineRotateSpeed = 2000; //过弯速度

                        globeControl1.Globe.FlyAlongLineSpeed = 500;

                        double higherthanline = 100; //高于线

                        double eyedegree = 0; //视角夹角

                        double intersectionangle = 80;//水平夹角

                        globeControl1.Globe.FlyAlongWithLine(flyline, higherthanline, eyedegree, intersectionangle);

                    }

                }

            }

    FlyAlongWithLine

    2.FlyEyeAlongWithLine

    private void flyeyealongline_Click(object sender, EventArgs e)

            {

                GSOFeature feature = globeControl1.Globe.SelectedObject;

                if (feature != null)

                {

                    if (feature.Geometry.Type == EnumGeometryType.GeoPolyline3D)

                    {

                        GSOGeoPolyline3D flyline = feature.Geometry as GSOGeoPolyline3D;


                        double higherthanline = 100; //高于线

                        double eyedegree = 0; //视角夹角

                        double intersectionangle = 80;//水平夹角

                        globeControl1.Globe.FlyEyeAlongWithLine(flyline, higherthanline, 0, true,0,false);

                    }

                }

            }

    FlyEyeAlongWithLine

    3.FlyEyeAlongWithLine与FlyAlongWithLine相比,设置的部分的数值并没有实际用到,浏览的时候,FlyEyeAlongWithLine也比较死板。

    4.在上面的示例中,所有的线都是选中的,在实际的应用的中不是很方便,在学习SDK中的绘制模式和事件回调后,可以直接在绘制线后,实现沿线飞行的效果。

    5.其他飞行模式参考开发文档

    相关文章

      网友评论

          本文标题:沿线飞行

          本文链接:https://www.haomeiwen.com/subject/wphbwqtx.html