Merge remote-tracking branch 'origin/qa_merge_shunyi_vr_map' into qa_merge_shunyi_vr_map

This commit is contained in:
wangcongtao
2021-01-06 11:29:15 +08:00

View File

@@ -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();
}