首页 / 浏览问题 / 三维GIS / 问题详情
非fpf飞行站点的添加和飞行路线的生成
3EXP 2019年04月11日
怎么生成非fpf文件的飞行路线,在web端用户自定义飞行路线

1个回答

http://ask.supermap.com/45167您参考一下这个示例,我把demo发到您邮箱

6,215EXP 2019年04月11日

谢谢你 demo已经收到 但是还有个问题初始化的routes必须是从fpf文件获取的吗 我下面的代码飞行路线还是不能就绪 麻烦你看看

function createRoute(){
    var points = [
        {
        x: -2171344.723338279,
        y: 4377959.80232244,
        z: 4098721.336955562,
        altitude: 12.1466047512367,
        duration: 11.623106459071682,
        heading: 6.260995919619558,
            index:0
        },
        {x: -2171169.8676460185,
            y: 4377629.486154237,
            z: 4099166.3742857995,
            altitude: 11.9067202266306,
            duration: 2.33481700746625,
            heading: 1.5032975505359112,
            index: 1
        },{
            x: -2171270.9222274018,
            y: 4377571.519001535,
            z: 4099173.8714142498,
            duration:27.964990729795865,
            altitude: 11.3402135549113,
            duration: 27.964990729795865,
            heading: 6.23512687249191,
            index: 2
        },
        {
            x: -2170826.2708207886,
            y: 4376790.892322471,
            z: 4100245.3231774312,
            duration:10.117379370970378,
            altitude: 12.9608774511144,
            duration: 10.117379370970378,
            heading: 4.708079892084067,
            index: 3
        },{
            x: -2170373.4830572223,
            y: 4377016.453704289,
            z: 4100242.370629808,
            duration:11.157674687612483,
            altitude: 11.7588377837092,
            duration: 11.157674687612483,
            heading: 3.205987951731911,
            index: 4
        },{
            altitude: 16.9397405888885,
            duration: 10,
            heading: 0.038466827467274554,
            index: 5,
            x: -2172484.643769956,
            y: 4376066.739786139,
            z: 4100146.0999029814
        }
    ]
    var routes = new Cesium.RouteCollection();
    var route = new Cesium.Route({
        isStopVisible:true,
        isFlyLoop:false,
        isLineVisible:true,
        routeName:"测试点1",
        speed:50,
        isAlongline:true,
        totalDuration:100,
        tiltfree:false
    });

    for(var k = 0; k < points.length ;k++){
            var position = Cesium.Cartesian3.fromDegrees(points[k].x, points[k].y, points[k].z);
            var name = "测试站" + k;
            var routeStop = new Cesium.RouteStop({
                point:position,
                heading:scene.camera.heading,
                tilt:0,
                stopName:name,
                speed:50,
                waitTime: 0,
                index:points[k].index,
                duration: points[k].duration,
                altitude:points[k].altitude
            })
        route.addStop(routeStop);
    }

    routes.addRoute(route);
    var flyManager = new Cesium.FlyManager({
        scene: scene,
        routes: routes
    });

    Cesium.when(flyManager.readyPromise, function() {
        var allStops = flyManager.getAllRouteStops();

    });
}
谢谢你 demo已经收到 但是还有个问题初始化的routes必须是从fpf文件获取的吗
您肯定要有一个fpf才可以,自己新建一个空的就行
谢谢 我试试
这个demo能发我一份吗?谢谢 lusunset@163.com
飞行的demo,可以发给我一份吗,谢谢812117994@qq.com
这个demo能发我一份吗,1178267909@qq.com 十分感谢
您好,请问这个demo能发我一份吗,365709348@qq.com 十分感谢
飞行demo能否发我一个,谢谢,877063572@qq.com
飞行demo可以发我一份吗,开发参考,谢谢,2446705230@qq.com
您好 这个飞行的demo 能不能也给我发一份呢 1337641939@qq.com 谢谢了
...