首页 / 浏览问题 / 移动GIS / 问题详情
使用超图911截图功能,截图后地图不可动,变黑
21EXP 2020年05月28日
@Override
                public void active() {

//             TODO Auto-generated method stub
                    int result = -1;
                    final MapControl mapControl = SMEnvironmentManager.getInstance().getMapView().getMapControl();
                    if (mapControl != null) {
                        Bitmap screenshotBmp = Bitmap.createBitmap(mapControl.getMapWidth(), mapControl.getMapHeight(), Config.ARGB_8888);
                        if (mapControl.outputMap(screenshotBmp)) {
                            FileOutputStream out;
                            try {
                                out = new FileOutputStream(mCacheMediaFile);
                                if (out != null) {
                                    screenshotBmp.compress(Bitmap.CompressFormat.JPEG, 100, out);
                                    out.flush();
                                    out.close();
                                    result = 0;// 成功
                                }
                            } catch (FileNotFoundException e) {
//                                // TODO Auto-generated catch block
                                e.printStackTrace();
                            } catch (IOException e) {
//                                // TODO Auto-generated catch block
                                e.printStackTrace();
                            }
                        }
                    }
                    final int successed = result;
                    new Handler(Looper.getMainLooper()).post(new Runnable() {
                        @Override
                        public void run() {
                            if (successed >= 0) {
                                Toast.makeText(AppEngine.getInstance().getCurrentContext(), "截图成功!", Toast.LENGTH_SHORT).show();
                            } else {
                                Toast.makeText(AppEngine.getInstance().getCurrentContext(), "截图失败!", Toast.LENGTH_SHORT).show();
                            }
                            dismissProgressView();
                        }
                    });
                }
            });

使用imobile9D 操作系统win10 AndroidStudio3.0

1个回答

您好,我这边使用911版本测试没有重现,您那边能否提供一个能重现该问题的demo给我,可以私信我地址,谢谢
9,127EXP 2020年05月28日
这边程序太大了,这是其中一个功能,我这边使用adb截图指令解决了,感谢您的帮助
...