imobile10i 初始化地图报错

0 投票

OGRE EXCEPTION(2:InvalidParametersException): NativeWindowType with name '00000000' already exists in GLES2RenderSystem::_createRenderWindow at E:\AR\OGRE1.9_ES3\RenderSystems\GLES2\src\OgreGLES2RenderSystem.cpp (line 526)

在进入包含sceneControl的主页面之后,调用

sceneControl.sceneControlInitedComplete(new SceneControl.SceneControlInitedCallBackListenner() {
    @Override
    public void onSuccess(String s) {
        String url = "http://10.0.1.127:8090/iserver/services/3D-hnQXJWmobile/rest/realspace/datas/buildAll@hnControl";
        String layerName = "buildAll@hnControl";
        Double lon = 112.87053960866461;
        Double lat = 28.19350587428454;
        sceneControl.getScene().getLayers().add(url, Layer3DType.OSGBFILE,layerName,true);
        sceneControl.getScene().flyToPoint(new Point3D(lon,lat,2000),1000);
    }
});

初次进入可以加载,退出activity之后,再进入这个activity,会在supermap的包里面报错:

OGRE EXCEPTION(2:InvalidParametersException): NativeWindowType with name '00000000' already exists in GLES2RenderSystem::_createRenderWindow at E:\AR\OGRE1.9_ES3\RenderSystems\GLES2\src\OgreGLES2RenderSystem.cpp (line 526)

请问如何解决

4月 15 分类:  43次浏览 | 用户: enbir 初出茅庐 (66 分)

1个回答

0 投票
您好,需要设置activity的启动模式为singleInstance,然后重写activity的finish方法,在方法中添加代码:moveTaskToBack(true);
4月 15 用户: 董懿鑫 登峰造极 (5,258 分)
...