美文网首页skyline for mobile(android)
skyline移动端导航– 跳到指定位置

skyline移动端导航– 跳到指定位置

作者: Darshan | 来源:发表于2019-09-26 10:36 被阅读0次

例子演示如何跳到指定位置,使用了 ICreator701 (CreatePosition) 和 INavigate701 (JumpTo) 方法。

private void JumpTo() {
        UI.runOnRenderThread(new Runnable() {
            @Override
            public void run() {
                try {
                    // x,y,height, height type, yaw, pitch, roll, distance
                    IPosition newYork = ISGWorld.getInstance().getCreator().CreatePosition(-74, 40.717067, 1000, 0 /* AltitudeTypeCode.ATC_TERRAIN_RELATIVE*/, 0, -45, 0, 0);
                    // x,y,height, height type, yaw, pitch, roll, distance
                    IPosition losAngeles = ISGWorld.getInstance().getCreator().CreatePosition(-118.25, 34.05, 1000, 0 /*AltitudeTypeCode.ATC_TERRAIN_RELATIVE*/, 0, -45, 0, 0);
                    if (_evenCall) {

                        ISGWorld.getInstance().getNavigate().JumpTo(newYork);
                    } else {

                        ISGWorld.getInstance().getNavigate().JumpTo(losAngeles);
                    }
                    _evenCall = !_evenCall;
                } catch (Exception ex) {

                }
            }
        });
    }

相关文章

网友评论

    本文标题:skyline移动端导航– 跳到指定位置

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