首页 / 浏览问题 / 移动GIS / 问题详情
imobile10i 初始化地图报错
81EXP 2020年04月15日

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)

请问如何解决

1个回答

您好,需要设置activity的启动模式为singleInstance,然后重写activity的finish方法,在方法中添加代码:moveTaskToBack(true);
9,127EXP 2020年04月15日
...