解决小地图位置

This commit is contained in:
董宏宇
2021-04-15 16:22:25 +08:00
parent 5557ab7253
commit b399ea53af
2 changed files with 3 additions and 6 deletions

View File

@@ -5,6 +5,7 @@ import android.graphics.BitmapFactory;
import android.util.AttributeSet;
import android.util.Log;
import android.view.MotionEvent;
import android.view.ViewGroup;
import android.widget.RelativeLayout;
import androidx.annotation.Nullable;
@@ -17,7 +18,6 @@ import com.amap.api.navi.AMapNaviView;
import com.amap.api.navi.AMapNaviViewOptions;
import com.mogo.commons.AbsMogoApplication;
import com.mogo.module.common.MogoApisHandler;
import com.mogo.module.small.map.animation.DirectionRotateAnimation;
import com.mogo.utils.FileUtils;
import java.io.IOException;
@@ -32,8 +32,6 @@ public class SmallMapDirectionView extends RelativeLayout {
private String styleFilePath = "/mnt/sdcard/amap/small_map_style.data";
private AMapNaviView mAMapNaviView;
private DirectionRotateAnimation mRotateAnimation;
private int lastAngle = 0;
private int zoomLevel = 15;
public SmallMapDirectionView(Context context) {
@@ -54,9 +52,9 @@ public class SmallMapDirectionView extends RelativeLayout {
}
private void initView(Context context) {
mRotateAnimation = new DirectionRotateAnimation(context, null);
AbsMogoApplication.getLayoutInflaterNoSkin().inflate(R.layout.module_small_map_view, this);
mAMapNaviView = findViewById(R.id.aMapNaviView);
mAMapNaviView.onCreate(null);
@@ -164,7 +162,6 @@ public class SmallMapDirectionView extends RelativeLayout {
try {
// 判断是否有样式文件存在
//File styleExit = new File(styleFilePath);
FileUtils.copy(
context.getAssets().open("small_map_style.data"),
styleFilePath,