首页 / 浏览问题 / 移动GIS / 问题详情
android端打不开在线场景
1EXP 2021年12月02日
使用产品:supermap-imobile-10.2.0-227-android  操作系统:win11 
问题描述: 使用如下代码加载在线示例场景,app异常退出
public class MainActivity extends Activity {

    private SceneControl sceneControl;
    private String realspaceUrl = "http://support.supermap.com.cn:8090/iserver/services/3D-CBD/rest/realspace";
    private String sceneName="CBD";

    private Layer3Ds layer3Ds;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        String sdcard = android.os.Environment.getExternalStorageDirectory().getAbsolutePath().toString();
        Environment.setLicensePath(sdcard + "/SuperMap/license/");
        Environment.setTemporaryPath(sdcard+"/SuperMap/temp");
        Environment.initialization(this);
        setContentView(R.layout.activity_main);
        sceneControl=findViewById(R.id.SceneControl);
        SceneServicesList sceneServicesList = new SceneServicesList();
        boolean load = sceneServicesList.load(realspaceUrl);
        Log.w("加载在线场景数据",load+"");
        sceneControl.sceneControlInitedComplete(new SceneControl.SceneControlInitedCallBackListenner() {
            @Override
            public void onSuccess(String success) {
                Scene scene = sceneControl.getScene();
                boolean result = scene.open(realspaceUrl, sceneName);
                Log.w("打开场景结果",result+"");
                scene.refresh();
            }
        });
    }
}

错误log 如下:

2021-12-01 21:10:56|      4| EGf001| 3614709036|   error| 查找Graphics类型为9的UGGraphicsManager失败| jni/JB/32/Graphics/../../../Src/Graphics/UGGraphicsManager.cpp(282)
2021-12-01 21:10:56|      6| EAg031| 3614709036|   error| 查找Graphics类型为9的UGGraphicsManager失败| jni/JB/32/Graphics/../../../Src/Graphics/UGGraphicsManager.cpp(90)
2021-12-01 21:10:57|    368| EAg020| 3614709036|   error| 文件(%s)打开失败| jni/JB/32/NetToolkit/../../../Src/NetToolkit/UGHttpHelper.cpp(115)
2021-12-01 21:10:57|      2| EAg022| 3614709036|   error| 文件(%s)写入失败| jni/JB/32/NetToolkit/../../../Src/NetToolkit/UGHttpHelper.cpp(116)
2021-12-01 21:10:57|      2| EAg034| 3614709036|   error| 从网络上得到文件错误default/config/139_224_236_190_8090_iserver_services_3D-CBD/Scenes.xml.temp| jni/JB/32/NetToolkit/../../../Src/NetToolkit/UGHttpHelper.cpp(709)
2021-12-01 21:10:57|      2| EAg034| 3614709036|   error| 从网络上得到文件错误http://139.224.236.190:8090/iserver/services/3D-CBD/rest/realspace/scenes.xml?userName=&userPassword=&serviceVersion=1.00&jsessionID=| jni/JB/32/Scene/../../../Src/Scene/UGSceneServicesList.cpp(75)
2021-12-01 21:11:01|   3998| EJc002| 3614709036|   error| 所请求的服务端资源不存在 HTTP Status Code 404http://139.224.236.190:8090/UserData/CBD.fpf| jni/JB/32/NetToolkit/../../../Src/NetToolkit/UGHttpHelper.cpp(2364)
2021-12-01 21:11:01|      5| EAc003| 3614709036|   error| 从网络上得到的文件为空| jni/JB/32/NetToolkit/../../../Src/NetToolkit/UGHttpHelper.cpp(697)
2021-12-01 21:11:02|    784| EAa001| 2998409504|   error| 输出缓存没有足够的空间| jni/JB/32/Toolkit/../../../Src/Toolkit/UGCompress.cpp(155)
2021-12-01 21:11:02|     37| EAe001| 3032983840|   error| 不支持的文件类型| jni/JB/32/FileParserGDAL/../../../Src/FileParserGDAL/UGFileRasterPng.cpp(190)
2021-12-01 21:11:02|    310| EAa001| 2998409504|   error| 输出缓存没有足够的空间| jni/JB/32/Toolkit/../../../Src/Toolkit/UGCompress.cpp(155)

1个回答

您好,示范url中的场景不是Android纹理或者webp纹理格式的缓存,在移动端打开三维场景需要在iDesktop桌面软件切Android纹理或者webp格式的缓存。新版本的桌面切缓存时需要注意缓存选择S3M1.0版本。
9,242EXP 2021年12月02日
...