首页 / 浏览问题 / 移动GIS / 问题详情
态势标绘功能模块问题
12EXP 2017年04月16日
在态势标绘功能模块中,点标绘和箭头标绘都可以使用,都能在地图上标绘出来,但是编辑功能和定位不能用,在mainactivity里我用的百度定位是可以在线与离线定位的,在态势标绘的activity里定位就不能用,在刚进入Activity的时候有报两个异常:
1.GPS模块不可用!
2. Exception locking surface
                                                                         java.lang.IllegalStateException: Surface was already locked
                                                                             at android.view.Surface.lockCanvas(Surface.java:242)
                                                                             at android.view.SurfaceView$4.internalLockCanvas(SurfaceView.java:819)
                                                                             at android.view.SurfaceView$4.lockCanvas(SurfaceView.java:787)
                                                                             at com.supermap.mapping.MapControl1.c(MapControl1.java:332)
                                                                             at com.supermap.mapping.MapControl1.refreshCallback(MapControl1.java:1027)
                                                                             at com.supermap.mapping.MapControlNative.jni_SetSize(Native Method)
                                                                             at com.supermap.mapping.MapControl1.a(MapControl1.java:1173)
                                                                             at com.supermap.mapping.MapControl1.c(MapControl1.java:342)
                                                                             at com.supermap.mapping.MapControl1$3.surfaceCreated(MapControl1.java:305)
                                                                             at android.view.SurfaceView.updateWindow(SurfaceView.java:577)
                                                                             at android.view.SurfaceView.access$000(SurfaceView.java:86)
                                                                             at android.view.SurfaceView$3.onPreDraw(SurfaceView.java:176)
                                                                             at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:847)
                                                                             at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2012)
                                                                             at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1125)
                                                                             at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5813)
                                                                             at android.view.Choreographer$CallbackRecord.run(Choreographer.java:762)
                                                                             at android.view.Choreographer.doCallbacks(Choreographer.java:575)
                                                                             at android.view.Choreographer.doFrame(Choreographer.java:545)
                                                                             at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:748)
                                                                             at android.os.Handler.handleCallback(Handler.java:733)
                                                                             at android.os.Handler.dispatchMessage(Handler.java:95)
                                                                             at android.os.Looper.loop(Looper.java:136)
                                                                             at android.app.ActivityThread.main(ActivityThread.java:5028)
                                                                             at java.lang.reflect.Method.invokeNative(Native Method)
                                                                             at java.lang.reflect.Method.invoke(Method.java:515)
                                                                             at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
                                                                             at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:607)
                                                                             at dalvik.system.NativeStart.main(Native Method)

1个回答

你好,根据报错信息可以从以下排查问题:

1、确认开启了测试机的GPS;

2、地图加载在地图窗口上显示有问题,调试一下是运行哪一句有问题;

3、在environment.setlicensepath()前添加一句environment.setOpenGLmode(false);

4、换一个设备测试是否还有这个问题?
2,042EXP 2017年04月17日
...