diff --git a/modules/mogo-module-smp/src/main/java/com/mogo/module/small/map/SmallMapDirectionView.java b/modules/mogo-module-smp/src/main/java/com/mogo/module/small/map/SmallMapDirectionView.java index 64e56eb087..f0b81e2222 100644 --- a/modules/mogo-module-smp/src/main/java/com/mogo/module/small/map/SmallMapDirectionView.java +++ b/modules/mogo-module-smp/src/main/java/com/mogo/module/small/map/SmallMapDirectionView.java @@ -183,48 +183,46 @@ public class SmallMapDirectionView extends RelativeLayout { try { // 判断是否有样式文件存在 - File styleExit = new File(styleFilePath); - if (!styleExit.exists()) { - FileUtils.copy( - context.getAssets().open("small_map_style.data"), - styleFilePath, - new FileUtils.FileCopyListener() { + //File styleExit = new File(styleFilePath); + FileUtils.copy( + context.getAssets().open("small_map_style.data"), + styleFilePath, + new FileUtils.FileCopyListener() { - @Override - public void onStart() { - Log.w("FileCopyListener", "onStart="); + @Override + public void onStart() { + Log.w("FileCopyListener", "onStart="); - } - - @Override - public void onFail(Exception e) { - Log.w("FileCopyListener", "onFail="); - e.printStackTrace(); - } - - @Override - public void onProcess(int process) { - Log.w("FileCopyListener", "onProcess=" + process); - - } - - @Override - public void onFinish(String toPath) { - Log.w("FileCopyListener", "onFinish toPath=" + toPath); - - // 高德地图有bug,所以需要多次调用设置皮肤才能成功 - if (options != null) { - options.setCustomMapStylePath(styleFilePath); - mAMapNaviView.setViewOptions(options); - } - - //设置希望展示的地图缩放级别 - CameraUpdate cameraUpdate = CameraUpdateFactory.zoomTo(zoomLevel); - aMap.moveCamera(cameraUpdate); - } } - ); - } + + @Override + public void onFail(Exception e) { + Log.w("FileCopyListener", "onFail="); + e.printStackTrace(); + } + + @Override + public void onProcess(int process) { + Log.w("FileCopyListener", "onProcess=" + process); + + } + + @Override + public void onFinish(String toPath) { + Log.w("FileCopyListener", "onFinish toPath=" + toPath); + + // 高德地图有bug,所以需要多次调用设置皮肤才能成功 + if (options != null) { + options.setCustomMapStylePath(styleFilePath); + mAMapNaviView.setViewOptions(options); + } + + //设置希望展示的地图缩放级别 + CameraUpdate cameraUpdate = CameraUpdateFactory.zoomTo(zoomLevel); + aMap.moveCamera(cameraUpdate); + } + } + ); } catch (IOException e) { e.printStackTrace(); }