diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
index 663459aa50..0d156937bb 100644
--- a/.idea/codeStyles/Project.xml
+++ b/.idea/codeStyles/Project.xml
@@ -3,9 +3,18 @@
+
diff --git a/.idea/misc.xml b/.idea/misc.xml
index f4d5deeca6..e082ea7475 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -4,10 +4,7 @@
-
+
-
-
-
\ No newline at end of file
diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/animation/BezierAnimationView.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/animation/BezierAnimationView.java
new file mode 100644
index 0000000000..85ad93badb
--- /dev/null
+++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/animation/BezierAnimationView.java
@@ -0,0 +1,141 @@
+package com.mogo.module.common.animation;
+
+import android.animation.Animator;
+import android.animation.AnimatorListenerAdapter;
+import android.animation.AnimatorSet;
+import android.animation.ObjectAnimator;
+import android.animation.ValueAnimator;
+import android.content.Context;
+import android.graphics.PointF;
+import android.graphics.drawable.Drawable;
+import android.util.AttributeSet;
+import android.util.Log;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.animation.LinearInterpolator;
+import android.widget.ImageView;
+import android.widget.RelativeLayout;
+
+import androidx.core.content.ContextCompat;
+
+import com.mogo.module.common.R;
+
+import java.util.Random;
+
+public class BezierAnimationView extends RelativeLayout implements View.OnClickListener {
+ private String TAG = "BezierAnimationView";
+ private Context context;
+ private int[] animation_drawable = {
+ R.drawable.icon_common_heart_animation_vr00,
+ R.drawable.icon_heart_unchoose_other,
+ R.drawable.icon_map_marker_living};
+ private Random random = new Random();
+ private int width = 500, height = 210;
+ private int drawableWidth, drawableHeight;
+
+ public BezierAnimationView(Context context) {
+ this(context, null);
+ }
+
+ public BezierAnimationView(Context context, AttributeSet attributes) {
+ this(context, attributes, 0);
+ }
+
+ public BezierAnimationView(Context context, AttributeSet attributes, int defStyleAttr) {
+ super(context, attributes, defStyleAttr);
+ this.context = context;
+ //3、设置点击事件
+ setOnClickListener(this);
+ //4、获取点赞图片的宽高
+ Drawable drawable = ContextCompat.getDrawable(context, R.drawable.icon_common_heart_animation_vr02);
+ drawableWidth = drawable.getIntrinsicWidth();
+ drawableHeight = drawable.getIntrinsicHeight();
+ }
+
+ @Override
+ public void onClick(View view) {
+ Log.d("执行点赞动画", "ppp");
+ bezierAnimation();
+ }
+
+ private void bezierAnimation() {
+ final ImageView imageView = new ImageView(context);
+ imageView.setBackgroundResource(animation_drawable[random.nextInt(animation_drawable.length - 1)]);
+ RelativeLayout.LayoutParams params = new LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
+ params.addRule(ALIGN_BOTTOM);
+ params.addRule(CENTER_HORIZONTAL);
+ imageView.setLayoutParams(params);
+ addView(imageView);
+
+ /*
+ * 开始执行点赞效果
+ * */
+ AnimatorSet animatorSet = getAnimatorSet(imageView);
+ animatorSet.addListener(new AnimatorListenerAdapter() {
+ @Override
+ public void onAnimationEnd(Animator animation) {
+ //3、动画执行后移除View
+ removeView(imageView);
+ }
+ });
+ animatorSet.start();
+ }
+
+ private AnimatorSet getAnimatorSet(ImageView imageView) {
+ AnimatorSet enter = new AnimatorSet();
+ /*
+ * 缩放动画
+ * */
+ AnimatorSet scaleAnimator = new AnimatorSet();
+ ObjectAnimator alpha = ObjectAnimator.ofFloat(imageView, "alpha", 0.8f, 1f);
+ ObjectAnimator scaleX = ObjectAnimator.ofFloat(imageView, "scaleX", 0.8f, 1f);
+ ObjectAnimator scaleY = ObjectAnimator.ofFloat(imageView, "scaleY", 0.8f, 1f);
+ scaleAnimator.setDuration(500);
+ scaleAnimator.playTogether(alpha, scaleX, scaleY);
+
+ /*
+ * 贝塞尔动画
+ * */
+ ValueAnimator bezierAnimator = getBezierValueAnimator(imageView);
+ /*
+ * 两个动画按顺序播放
+ * */
+ enter.playSequentially(scaleAnimator, bezierAnimator);
+ return enter;
+ }
+
+ /**
+ * 获取贝塞尔曲线动画
+ *
+ * @param target
+ * @return
+ */
+ private ValueAnimator getBezierValueAnimator(View target) {
+
+ //初始化一个BezierEvaluator
+ BezierEvaluator evaluator = new BezierEvaluator(getPointF(1), getPointF(1));
+
+ // 起点固定,终点随机
+ ValueAnimator animator = ValueAnimator.ofObject(evaluator, new PointF((width - 40) / 2, height - 80),
+ new PointF(random.nextInt(getWidth()), 0));
+ animator.addUpdateListener(new BezierListener(target));
+ animator.setTarget(target);
+ animator.setDuration(3000);
+ return animator;
+ }
+
+ /**
+ * 获取一条路径的两个控制点
+ *
+ * @param scale
+ */
+ private PointF getPointF(int scale) {
+
+ PointF pointF = new PointF();
+ //减去100 是为了控制 x轴活动范围
+ pointF.x = random.nextInt((width));
+ //再Y轴上 为了确保第二个控制点 在第一个点之上,我把Y分成了上下两半
+ pointF.y = random.nextInt((height)) / scale;
+ return pointF;
+ }
+}
diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/animation/BezierEvaluator.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/animation/BezierEvaluator.java
new file mode 100644
index 0000000000..6effc925b1
--- /dev/null
+++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/animation/BezierEvaluator.java
@@ -0,0 +1,45 @@
+package com.mogo.module.common.animation;
+
+import android.animation.TypeEvaluator;
+import android.graphics.PointF;
+
+/**
+ * 贝塞尔曲线估值器:计算动画的执行轨迹
+ *
+ * @params 传入贝塞尔曲线需要的四个点
+ * @return 通过计算返回贝塞尔曲线的坐标
+ */
+public class BezierEvaluator implements TypeEvaluator {
+
+ private PointF pointF1;
+ private PointF pointF2;
+
+ public BezierEvaluator(PointF point1, PointF point2) {
+ this.pointF1 = point1;
+ this.pointF2 = point2;
+ }
+
+ @Override
+ public PointF evaluate(float time, PointF startValue, PointF endValue) {
+ float timeLeft = 1.0f - time;
+
+ //结果
+ PointF point = new PointF();
+
+ PointF point0 = (PointF)startValue;//起点
+ PointF point3 = (PointF)endValue;//终点
+
+ // 贝塞尔公式
+ point.x = timeLeft * timeLeft * timeLeft * (point0.x)
+ + 3 * timeLeft * timeLeft * time * (pointF1.x)
+ + 3 * timeLeft * time * time * (pointF2.x)
+ + time * time * time * (point3.x);
+
+ point.y = timeLeft * timeLeft * timeLeft * (point0.y)
+ + 3 * timeLeft * timeLeft * time * (pointF1.y)
+ + 3 * timeLeft * time * time * (pointF2.y)
+ + time * time * time * (point3.y);
+
+ return point;
+ }
+}
\ No newline at end of file
diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/animation/BezierListener.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/animation/BezierListener.java
new file mode 100644
index 0000000000..04ab1129c2
--- /dev/null
+++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/animation/BezierListener.java
@@ -0,0 +1,24 @@
+package com.mogo.module.common.animation;
+
+import android.animation.ValueAnimator;
+import android.graphics.PointF;
+import android.view.View;
+
+public class BezierListener implements ValueAnimator.AnimatorUpdateListener {
+
+ private View target;
+
+ public BezierListener(View target) {
+ this.target = target;
+ }
+
+ @Override
+ public void onAnimationUpdate(ValueAnimator animation) {
+ //这里获取到贝塞尔曲线计算出来的的x y值 赋值给view 这样就能让爱心随着曲线走啦
+ PointF pointF = (PointF) animation.getAnimatedValue();
+ target.setX(pointF.x);
+ target.setY(pointF.y);
+ // 这里偷个懒,顺便做一个alpha动画,这样alpha渐变也完成啦
+ target.setAlpha(1 - animation.getAnimatedFraction());
+ }
+}
\ No newline at end of file
diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/marker/MapCameraInfoView.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/marker/MapCameraInfoView.java
index d6f3990014..9d88d0b644 100644
--- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/marker/MapCameraInfoView.java
+++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/marker/MapCameraInfoView.java
@@ -3,6 +3,7 @@ package com.mogo.module.common.drawer.marker;
import android.content.Context;
import android.text.TextUtils;
import android.util.AttributeSet;
+import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;
diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/view/RoundLayout.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/view/RoundLayout.java
index 23418c8b9e..20150f4a19 100644
--- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/view/RoundLayout.java
+++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/view/RoundLayout.java
@@ -3,6 +3,8 @@ package com.mogo.module.common.view;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
+import android.graphics.Paint;
+import android.graphics.PaintFlagsDrawFilter;
import android.graphics.Path;
import android.graphics.RectF;
import android.util.AttributeSet;
@@ -19,11 +21,10 @@ import com.mogo.skin.support.helper.MogoSkinCompatBackgroundHelperDelegate;
* desc :
* version: 1.0
*/
-public class RoundLayout extends RelativeLayout implements IMogoSkinCompatSupportable {
+public class RoundLayout extends RelativeLayout {
private float roundLayoutRadius = 14f;
private Path roundPath;
private RectF rectF;
- private MogoSkinCompatBackgroundHelperDelegate mBackgroundTintHelper;
public RoundLayout(Context context) {
this(context, null);
@@ -41,9 +42,6 @@ public class RoundLayout extends RelativeLayout implements IMogoSkinCompatSuppor
typedArray.recycle();
init();
-
- mBackgroundTintHelper = new MogoSkinCompatBackgroundHelperDelegate(this);
- mBackgroundTintHelper.loadFromAttributes(attrs, defStyleAttr);
}
@@ -75,16 +73,10 @@ public class RoundLayout extends RelativeLayout implements IMogoSkinCompatSuppor
@Override
public void draw(Canvas canvas) {
if (roundLayoutRadius > 0f) {
+ canvas.setDrawFilter(new PaintFlagsDrawFilter(0, Paint.ANTI_ALIAS_FLAG | Paint.FILTER_BITMAP_FLAG));
canvas.clipPath(roundPath);
}
super.draw(canvas);
}
-
- @Override
- public void applySkin() {
- if (mBackgroundTintHelper != null) {
- mBackgroundTintHelper.applySkin();
- }
- }
}
diff --git a/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_common_heart_animation_vr00.png b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_common_heart_animation_vr00.png
new file mode 100644
index 0000000000..5246d61ccc
Binary files /dev/null and b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_common_heart_animation_vr00.png differ
diff --git a/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_common_heart_animation_vr01.png b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_common_heart_animation_vr01.png
new file mode 100644
index 0000000000..5246d61ccc
Binary files /dev/null and b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_common_heart_animation_vr01.png differ
diff --git a/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_common_heart_animation_vr02.png b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_common_heart_animation_vr02.png
new file mode 100644
index 0000000000..5246d61ccc
Binary files /dev/null and b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_common_heart_animation_vr02.png differ
diff --git a/modules/mogo-module-common/src/main/res/layout/modudle_camera_layout_info.xml b/modules/mogo-module-common/src/main/res/layout/modudle_camera_layout_info.xml
index 360fbb6d4a..39535e2391 100644
--- a/modules/mogo-module-common/src/main/res/layout/modudle_camera_layout_info.xml
+++ b/modules/mogo-module-common/src/main/res/layout/modudle_camera_layout_info.xml
@@ -15,8 +15,4 @@
android:layout_height="wrap_content"
android:src="@drawable/module_camera_real_time_traffic" />
-
-
\ No newline at end of file
diff --git a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/live/CameraLiveGSYVideoView.java b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/live/CameraLiveGSYVideoView.java
index 19c37173f7..2f39286ae9 100644
--- a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/live/CameraLiveGSYVideoView.java
+++ b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/live/CameraLiveGSYVideoView.java
@@ -113,7 +113,7 @@ public class CameraLiveGSYVideoView extends LiveRoundLayout implements IMogoSkin
private void playLiveVideo(String liveUrl) {
try {
if (mLivePlayer != null) {
- mLivePlayer.startPlay(liveUrl, TXLivePlayer.PLAY_TYPE_LIVE_RTMP);
+ mLivePlayer.startPlay(liveUrl, TXLivePlayer.PLAY_TYPE_LIVE_FLV);
mLivePlayer.setPlayListener(new ITXLivePlayListener() {
@Override
public void onPlayEvent(int event, Bundle bundle) {
diff --git a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/utils/CameraLiveNoticeHelper.java b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/utils/CameraLiveNoticeHelper.java
index cecf99c144..d796926105 100644
--- a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/utils/CameraLiveNoticeHelper.java
+++ b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/utils/CameraLiveNoticeHelper.java
@@ -34,7 +34,7 @@ public class CameraLiveNoticeHelper implements IMogoOnWebSocketMessageListener {
- mCloudRoadData = new CloudRoadData();
- mCloudRoadData.setRtmpUrl("rtmp://58.200.131.2:1935/livetv/hunantv");
- mCloudRoadData.setLat(40.200353);
- mCloudRoadData.setLon(116.745467);
-// CameraLiveManager.getInstance().init(mCloudRoadData);
- addCameraMarker(mCloudRoadData);
- }, 2_000);
+// if (!isFirst) {
+// isFirst = true;
+// UiThreadHandler.postDelayed(() -> {
+// mCloudRoadData = new CloudRoadData();
+//// mCloudRoadData.setRtmpUrl("rtmp://58.200.131.2:1935/livetv/hunantv");
+// mCloudRoadData.setRtmpUrl("http://video.zhidaozhixing.com/live/rec_12_22.flv");
+//
+// mCloudRoadData.setLat(39.969089);
+// mCloudRoadData.setLon(116.418009);
+//
+//// CameraLiveManager.getInstance().init(mCloudRoadData);
+// addCameraMarker(mCloudRoadData);
+// }, 2_000);
+// }
}
public void exitVrMode() {
Logger.d(TAG, "退出vr模式===");
+// removeCameraMarker();
+// isFirst = false;
MogoApisHandler.getInstance().getApis().getWebSocketManagerApi(mContext).unregisterOnWebSocketMessageListener(this);
}
@@ -90,15 +98,13 @@ public class CameraLiveNoticeHelper implements IMogoOnWebSocketMessageListener
diff --git a/modules/mogo-module-media/src/main/res/values/colors.xml b/modules/mogo-module-media/src/main/res/values/colors.xml
index b0944c76eb..b6ca26aca2 100644
--- a/modules/mogo-module-media/src/main/res/values/colors.xml
+++ b/modules/mogo-module-media/src/main/res/values/colors.xml
@@ -3,5 +3,5 @@
#fff
#7affffff
#444E6E
- #B63737
+ #80ffffff
diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/location/MogoRTKLocation.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/location/MogoRTKLocation.java
index 9ab2c99113..dba93d41c8 100644
--- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/location/MogoRTKLocation.java
+++ b/modules/mogo-module-service/src/main/java/com/mogo/module/service/location/MogoRTKLocation.java
@@ -11,6 +11,7 @@ import android.location.LocationManager;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
+import android.util.Log;
import com.mogo.commons.AbsMogoApplication;
import com.mogo.module.common.entity.CloudLocationInfo;
@@ -121,7 +122,11 @@ public class MogoRTKLocation {
cloudLocationInfo.setSpeed(location.getSpeed());
cloudLocationInfo.setSatelliteTime(location.getTime());
cloudLocationInfo.setSystemTime(System.currentTimeMillis());
+
+// Log.e("liyz", "lat = " + location.getLatitude() + ">>>>long = " + location.getLongitude());
cacheList.add(cloudLocationInfo);
+ } else {
+ Logger.e(TAG, "location == null");
}
}
diff --git a/modules/mogo-module-smp/build.gradle b/modules/mogo-module-smp/build.gradle
index e3a46f8dd8..888a054935 100644
--- a/modules/mogo-module-smp/build.gradle
+++ b/modules/mogo-module-smp/build.gradle
@@ -38,6 +38,9 @@ dependencies {
implementation rootProject.ext.dependencies.androidxappcompat
implementation rootProject.ext.dependencies.androidxconstraintlayout
implementation rootProject.ext.dependencies.arouter
+
+ implementation rootProject.ext.dependencies.amapnavi3dmap
+
annotationProcessor rootProject.ext.dependencies.aroutercompiler
if (Boolean.valueOf(RELEASE)) {
api rootProject.ext.dependencies.mogomap
diff --git a/modules/mogo-module-smp/src/main/AndroidManifest.xml b/modules/mogo-module-smp/src/main/AndroidManifest.xml
index 649a2f531a..3d0a81ab9f 100644
--- a/modules/mogo-module-smp/src/main/AndroidManifest.xml
+++ b/modules/mogo-module-smp/src/main/AndroidManifest.xml
@@ -6,6 +6,6 @@
+ />
\ No newline at end of file
diff --git a/modules/mogo-module-smp/src/main/assets/small_map_style.data b/modules/mogo-module-smp/src/main/assets/small_map_style.data
new file mode 100644
index 0000000000..75195b39a2
Binary files /dev/null and b/modules/mogo-module-smp/src/main/assets/small_map_style.data differ
diff --git a/modules/mogo-module-smp/src/main/assets/small_map_style_extra.data b/modules/mogo-module-smp/src/main/assets/small_map_style_extra.data
new file mode 100644
index 0000000000..6f65457911
Binary files /dev/null and b/modules/mogo-module-smp/src/main/assets/small_map_style_extra.data differ
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 0e5764968c..1eaedef6d3 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
@@ -8,9 +8,21 @@ import android.widget.ImageView;
import androidx.annotation.Nullable;
+import com.amap.api.maps.AMap;
+import com.amap.api.maps.CameraUpdate;
+import com.amap.api.maps.CameraUpdateFactory;
+import com.amap.api.maps.TextureMapView;
+import com.amap.api.maps.UiSettings;
+import com.amap.api.maps.model.BitmapDescriptor;
+import com.amap.api.maps.model.BitmapDescriptorFactory;
+import com.amap.api.maps.model.CustomMapStyleOptions;
+import com.amap.api.maps.model.MyLocationStyle;
import com.mogo.module.common.view.RoundLayout;
import com.mogo.module.small.map.animation.DirectionRotateAnimation;
+import java.io.InputStream;
+import java.net.URL;
+
/**
* 小地图的方向View
*
@@ -20,6 +32,12 @@ import com.mogo.module.small.map.animation.DirectionRotateAnimation;
public class SmallMapDirectionView extends RoundLayout {
private ImageView mIvMapBorder;
+ private TextureMapView mTextureMapView;
+ private AMap mAMap;
+ private UiSettings mUiSettings;
+ private CameraUpdate mCameraUpdate;
+ private MyLocationStyle myLocationStyle;
+
private DirectionRotateAnimation mRotateAnimation;
private int lastAngle = 0;
@@ -37,9 +55,46 @@ public class SmallMapDirectionView extends RoundLayout {
}
private void initView(Context context) {
+ mRotateAnimation = new DirectionRotateAnimation(context, null);
+
LayoutInflater.from(context).inflate(R.layout.module_small_map_view, this);
mIvMapBorder = findViewById(R.id.ivMapBorder);
- mRotateAnimation = new DirectionRotateAnimation(context, null);
+ mTextureMapView = findViewById(R.id.textureMapView);
+
+ mTextureMapView.onCreate(null);
+ mAMap = mTextureMapView.getMap();
+ mAMap.setMapType(AMap.MAP_TYPE_NIGHT);//夜景地图,aMap是地图控制器对象。
+
+ URL small_map_style = getClass().getResource("/assets/small_map_style.data");
+ URL small_map_style_extra = getClass().getResource("/assets/small_map_style_extra.data");
+
+ mAMap.setCustomMapStyle(new CustomMapStyleOptions()
+ .setEnable(true)
+ .setStyleDataPath(small_map_style.getPath())
+ .setStyleExtraPath(small_map_style_extra.getPath())
+ );
+
+ myLocationStyle = new MyLocationStyle();//初始化定位蓝点样式类myLocationStyle.myLocationType(MyLocationStyle.LOCATION_TYPE_LOCATION_ROTATE);//连续定位、且将视角移动到地图中心点,定位点依照设备方向旋转,并且会跟随设备移动。(1秒1次定位)如果不设置myLocationType,默认也会执行此种模式。
+ myLocationStyle.interval(2000); //设置连续定位模式下的定位间隔,只在连续定位模式下生效,单次定位模式下不会生效。单位为毫秒。
+ BitmapDescriptor location = BitmapDescriptorFactory.fromResource(R.drawable.module_small_map_view_my_location_logo);
+ myLocationStyle.myLocationIcon(location);
+ mAMap.setMyLocationStyle(myLocationStyle);//设置定位蓝点的Style
+ mAMap.setMyLocationEnabled(true);// 设置为true表示启动显示定位蓝点,false表示隐藏定位蓝点并不进行定位,默认是false。
+
+ //设置希望展示的地图缩放级别
+ mCameraUpdate = CameraUpdateFactory.zoomTo(12);
+ mAMap.moveCamera(mCameraUpdate);
+
+ mUiSettings = mAMap.getUiSettings();
+ mUiSettings.setZoomControlsEnabled(false);// 地图缩放级别的交换按钮
+// mUiSettings.setZoomGesturesEnabled(false);// 缩放手势
+// mUiSettings.setScrollGesturesEnabled(false);// 滑动手势
+// mUiSettings.setRotateGesturesEnabled(false);// 旋转手势
+// mUiSettings.setTiltGesturesEnabled(false);// 倾斜手势
+ mUiSettings.setAllGesturesEnabled(false);// 所有手势
+ mUiSettings.setMyLocationButtonEnabled(false); // 显示默认的定位按钮
+ mUiSettings.setLogoBottomMargin(-150); //设置Logo下边界距离屏幕底部的边距,设置为负值即可
+
}
diff --git a/modules/mogo-module-smp/src/main/java/com/mogo/module/small/map/SmallMapService.java b/modules/mogo-module-smp/src/main/java/com/mogo/module/small/map/SmallMapService.java
index de26ba6776..f50a457f25 100644
--- a/modules/mogo-module-smp/src/main/java/com/mogo/module/small/map/SmallMapService.java
+++ b/modules/mogo-module-smp/src/main/java/com/mogo/module/small/map/SmallMapService.java
@@ -32,7 +32,7 @@ public class SmallMapService extends Service {
public void onCreate() {
super.onCreate();
Logger.d(TAG, "onCreate");
- addMachineVisionMapView();
+ addSmallMapView();
}
@Nullable
@@ -46,7 +46,7 @@ public class SmallMapService extends Service {
@Override
public void onRebind(Intent intent) {
super.onRebind(intent);
- addMachineVisionMapView();
+ addSmallMapView();
Logger.d(TAG, "onRebind");
}
@@ -69,8 +69,8 @@ public class SmallMapService extends Service {
}
}
- private void addMachineVisionMapView() {
- Logger.d(TAG, "addMachineVisionMapView");
+ private void addSmallMapView() {
+ Logger.d(TAG, "addSmallMapView");
mWindowManagerView = new WindowManagerView.Builder(getApplicationContext())
.contentView(R.layout.module_small_map_direction_view)
@@ -79,8 +79,8 @@ public class SmallMapService extends Service {
WindowManager.LayoutParams.WRAP_CONTENT
)
.position(
- getResources().getDimensionPixelOffset(R.dimen.module_mvision_view_x),
- getResources().getDimensionPixelOffset(R.dimen.module_mvision_view_y)
+ getResources().getDimensionPixelOffset(R.dimen.module_small_map_view_x),
+ getResources().getDimensionPixelOffset(R.dimen.module_small_map_view_y)
)
.gravity(Gravity.TOP | Gravity.LEFT)
.showInWindowManager();
diff --git a/modules/mogo-module-smp/src/main/java/com/mogo/module/small/map/SmallMapView.java b/modules/mogo-module-smp/src/main/java/com/mogo/module/small/map/SmallMapView.java
deleted file mode 100644
index 62e75cdc07..0000000000
--- a/modules/mogo-module-smp/src/main/java/com/mogo/module/small/map/SmallMapView.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package com.mogo.module.small.map;
-
-import android.content.Context;
-import android.util.AttributeSet;
-
-import androidx.annotation.Nullable;
-
-import com.mogo.map.MogoBaseMapView;
-import com.mogo.utils.logger.Logger;
-
-/**
- * @author donghongyu
- * @date 12/10/20 1:35 PM
- */
-public class SmallMapView extends MogoBaseMapView {
-
- private static final String TAG = "SmallMapView";
-
- public SmallMapView(Context context) {
- this(context, null);
- }
-
- public SmallMapView(Context context, @Nullable AttributeSet attrs) {
- this(context, attrs, 0);
- }
-
- public SmallMapView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
- super(context, attrs, defStyleAttr);
- }
-
- @Override
- protected void addMapView(Context context) {
- Logger.d(TAG, "addMapView");
- }
-}
\ No newline at end of file
diff --git a/modules/mogo-module-smp/src/main/java/com/mogo/module/small/map/SmallVisionProvider.java b/modules/mogo-module-smp/src/main/java/com/mogo/module/small/map/SmallVisionProvider.java
index 0e3a5be274..6c18a05d75 100644
--- a/modules/mogo-module-smp/src/main/java/com/mogo/module/small/map/SmallVisionProvider.java
+++ b/modules/mogo-module-smp/src/main/java/com/mogo/module/small/map/SmallVisionProvider.java
@@ -73,15 +73,15 @@ public class SmallVisionProvider implements IMogoSmallMapProvider, IMogoStatusCh
@Override
public void showPanel() {
Log.d(TAG, "小地图模块触发展示……");
-
- mSmallMapServiceIntent = new Intent(mContext, SmallMapService.class);
- mContext.startService(mSmallMapServiceIntent);
+ if (MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode()) {
+ mSmallMapServiceIntent = new Intent(mContext, SmallMapService.class);
+ mContext.startService(mSmallMapServiceIntent);
+ }
}
@Override
public void hidePanel() {
Log.d(TAG, "小地图模块触发隐藏……");
-
if (mSmallMapServiceIntent != null) {
AbsMogoApplication.getApp().stopService(mSmallMapServiceIntent);
}
diff --git a/modules/mogo-module-smp/src/main/res/drawable-xhdpi/module_small_map_view_border.png b/modules/mogo-module-smp/src/main/res/drawable-xhdpi/module_small_map_view_border.png
index cc2c540c8b..1c4bf333ca 100644
Binary files a/modules/mogo-module-smp/src/main/res/drawable-xhdpi/module_small_map_view_border.png and b/modules/mogo-module-smp/src/main/res/drawable-xhdpi/module_small_map_view_border.png differ
diff --git a/modules/mogo-module-smp/src/main/res/drawable-xhdpi/module_small_map_view_my_location_logo.png b/modules/mogo-module-smp/src/main/res/drawable-xhdpi/module_small_map_view_my_location_logo.png
new file mode 100644
index 0000000000..e17d0c5eee
Binary files /dev/null and b/modules/mogo-module-smp/src/main/res/drawable-xhdpi/module_small_map_view_my_location_logo.png differ
diff --git a/modules/mogo-module-smp/src/main/res/drawable/bg_module_small_map_view_border.xml b/modules/mogo-module-smp/src/main/res/drawable/bg_module_small_map_view_border.xml
new file mode 100644
index 0000000000..46982d07c3
--- /dev/null
+++ b/modules/mogo-module-smp/src/main/res/drawable/bg_module_small_map_view_border.xml
@@ -0,0 +1,28 @@
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
\ No newline at end of file
diff --git a/modules/mogo-module-smp/src/main/res/layout/module_small_map_view.xml b/modules/mogo-module-smp/src/main/res/layout/module_small_map_view.xml
index e5d1dbfe79..59c74ffedd 100644
--- a/modules/mogo-module-smp/src/main/res/layout/module_small_map_view.xml
+++ b/modules/mogo-module-smp/src/main/res/layout/module_small_map_view.xml
@@ -1,16 +1,36 @@
-
+
+
+
+
+
+
+
+
+
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/modules/mogo-module-smp/src/main/res/values-xhdpi/dimens.xml b/modules/mogo-module-smp/src/main/res/values-xhdpi/dimens.xml
index 9910274622..461d5da465 100644
--- a/modules/mogo-module-smp/src/main/res/values-xhdpi/dimens.xml
+++ b/modules/mogo-module-smp/src/main/res/values-xhdpi/dimens.xml
@@ -1,12 +1,18 @@
- 400px
- 400px
- 1490px
- 650px
+ 400px
+ 400px
- 0px
- 0px
- 1920px
- 1080px
+ 260px
+ 260px
+
+ 250px
+ 250px
+ 1490px
+ 650px
+
+ 0px
+ 0px
+ 1920px
+ 1080px
\ No newline at end of file
diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/manager/impl/MoGoV2XMarkerManager.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/manager/impl/MoGoV2XMarkerManager.java
index 21e184ed1f..9e3b9b2ad7 100644
--- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/manager/impl/MoGoV2XMarkerManager.java
+++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/manager/impl/MoGoV2XMarkerManager.java
@@ -4,14 +4,17 @@ import android.content.Context;
import android.graphics.Bitmap;
import com.alibaba.android.arouter.facade.annotation.Route;
+import com.mogo.commons.AbsMogoApplication;
import com.mogo.map.MogoLatLng;
import com.mogo.map.location.MogoLocation;
import com.mogo.map.marker.IMogoMarker;
import com.mogo.map.marker.IMogoMarkerClickListener;
import com.mogo.map.marker.MogoMarkerOptions;
import com.mogo.map.uicontroller.EnumMapUI;
+import com.mogo.module.common.drawer.MarkerDrawer;
import com.mogo.module.common.drawer.marker.IMarkerView;
import com.mogo.module.common.drawer.marker.MapMarkerAdapter;
+import com.mogo.module.common.drawer.marker.RoadConditionInfoWindow3DAdapter;
import com.mogo.module.common.entity.MarkerCardResult;
import com.mogo.module.common.entity.MarkerExploreWay;
import com.mogo.module.common.entity.MarkerLocation;
@@ -532,6 +535,13 @@ public class MoGoV2XMarkerManager implements IMoGoV2XMarkerManager {
.longitude(roadEventEntity.getLocation().getLon());
optionsRipple.anchor(0.5f, 0.5f);
+ MarkerShowEntity markerShowEntity = new MarkerShowEntity();
+ MarkerExploreWay markerExploreWay = roadEventEntity.getNoveltyInfo();
+ markerShowEntity.setBindObj(markerExploreWay);
+ markerShowEntity.setMarkerLocation(markerExploreWay.getLocation());
+ markerShowEntity.setMarkerType(markerExploreWay.getPoiType());
+ markerShowEntity.setTextContent(markerExploreWay.getPoiType());
+
// 由于性能问题,D车机不使用事件扩散动画
if (!CarSeries.isF8xxSeries()) {
optionsRipple.icon(V2XMarkerAdapter.getV2XRoadEventViewPng(context, roadEventEntity));
@@ -539,8 +549,13 @@ public class MoGoV2XMarkerManager implements IMoGoV2XMarkerManager {
optionsRipple.icons(V2XMarkerAdapter.getV2XRoadEventViewGif(context, roadEventEntity));
optionsRipple.period(1);
}
-
- mAlarmInfoMarker = V2XServiceManager.getMarkerManager().addMarker(V2X_EVENT_ALARM_POI, optionsRipple);
+ if (V2XServiceManager.getMoGoStatusManager().isVrMode()) {
+ mAlarmInfoMarker = MarkerDrawer.getInstance().drawMapMarkerImpl(markerShowEntity, MarkerDrawer.MARKER_Z_INDEX_HIGH, clickListener);
+ mAlarmInfoMarker.setInfoWindowAdapter(new RoadConditionInfoWindow3DAdapter(markerShowEntity, AbsMogoApplication.getApp(), mAlarmInfoMarker.getMogoMarkerOptions()));
+ mAlarmInfoMarker.showInfoWindow();
+ } else {
+ mAlarmInfoMarker = V2XServiceManager.getMarkerManager().addMarker(V2X_EVENT_ALARM_POI, optionsRipple);
+ }
// 当前Marker设置为最上面
mAlarmInfoMarker.setToTop();
// 绘制连接线
diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/animation/V2XAnimationWindow.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/animation/V2XAnimationWindow.java
index c77d966c31..0a3fe0121c 100644
--- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/animation/V2XAnimationWindow.java
+++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/animation/V2XAnimationWindow.java
@@ -106,6 +106,9 @@ public class V2XAnimationWindow extends ConstraintLayout implements IV2XWindow