Merge remote-tracking branch 'origin/dev_merge_shunyi_vr_map' into dev_merge_shunyi_vr_map
@@ -8,6 +8,7 @@ import android.animation.ValueAnimator;
|
||||
import android.content.Context;
|
||||
import android.graphics.PointF;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Handler;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
@@ -27,11 +28,14 @@ public class BezierAnimationView extends RelativeLayout implements View.OnClickL
|
||||
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_pondingl2,
|
||||
R.drawable.icon_map_marker_living};
|
||||
private Random random = new Random();
|
||||
private int width = 500, height = 210;
|
||||
private int width = 180, height = 140;
|
||||
private int drawableWidth, drawableHeight;
|
||||
private int resource = 0;
|
||||
private Handler handler = new Handler();
|
||||
private Runnable runnable;
|
||||
|
||||
public BezierAnimationView(Context context) {
|
||||
this(context, null);
|
||||
@@ -54,13 +58,24 @@ public class BezierAnimationView extends RelativeLayout implements View.OnClickL
|
||||
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
Log.d("执行点赞动画", "ppp");
|
||||
bezierAnimation();
|
||||
runnable = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
Log.d("点赞--", "");
|
||||
bezierAnimation(resource);
|
||||
handler.postDelayed(this, 500);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
};
|
||||
runnable.run();
|
||||
}
|
||||
|
||||
private void bezierAnimation() {
|
||||
private void bezierAnimation(int resource) {
|
||||
final ImageView imageView = new ImageView(context);
|
||||
imageView.setBackgroundResource(animation_drawable[random.nextInt(animation_drawable.length - 1)]);
|
||||
imageView.setBackgroundResource(animation_drawable[resource]);
|
||||
RelativeLayout.LayoutParams params = new LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
|
||||
params.addRule(ALIGN_BOTTOM);
|
||||
params.addRule(CENTER_HORIZONTAL);
|
||||
@@ -79,63 +94,66 @@ public class BezierAnimationView extends RelativeLayout implements View.OnClickL
|
||||
}
|
||||
});
|
||||
animatorSet.start();
|
||||
Log.d(TAG, "动画执行到--" + String.valueOf(resource));
|
||||
}
|
||||
|
||||
private AnimatorSet getAnimatorSet(ImageView imageView) {
|
||||
AnimatorSet enter = new AnimatorSet();
|
||||
/*
|
||||
* 缩放动画
|
||||
* */
|
||||
|
||||
//1、缩放动画
|
||||
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);
|
||||
ObjectAnimator alpha = ObjectAnimator.ofFloat(imageView, "alpha", 0.3f, 1f);
|
||||
ObjectAnimator scaleX = ObjectAnimator.ofFloat(imageView, "scaleX", 0.3f, 1f);
|
||||
ObjectAnimator scaleY = ObjectAnimator.ofFloat(imageView, "scaleY", 0.3f, 1f);
|
||||
scaleAnimator.setDuration(1000);
|
||||
scaleAnimator.playTogether(alpha, scaleX, scaleY);
|
||||
|
||||
/*
|
||||
* 贝塞尔动画
|
||||
* */
|
||||
ValueAnimator bezierAnimator = getBezierValueAnimator(imageView);
|
||||
/*
|
||||
* 两个动画按顺序播放
|
||||
* */
|
||||
//2、贝塞尔动画
|
||||
ValueAnimator bezierAnimator = getBezierAnimator(imageView);
|
||||
|
||||
//3、两个动画按顺序播放
|
||||
enter.playSequentially(scaleAnimator, bezierAnimator);
|
||||
return enter;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取贝塞尔曲线动画
|
||||
* 贝塞尔动画
|
||||
*
|
||||
* @param target
|
||||
* @return
|
||||
*/
|
||||
private ValueAnimator getBezierValueAnimator(View target) {
|
||||
private ValueAnimator getBezierAnimator(final ImageView imageView) {
|
||||
|
||||
//初始化一个BezierEvaluator
|
||||
BezierEvaluator evaluator = new BezierEvaluator(getPointF(1), getPointF(1));
|
||||
//1、构建贝塞尔曲线的四个点
|
||||
PointF point0 = new PointF((width - drawableWidth) / 2, height - drawableHeight);
|
||||
PointF point1 = new PointF(random.nextInt(width), random.nextInt(height / 2));
|
||||
PointF point2 = new PointF(random.nextInt(width), random.nextInt(height / 2) + height / 2);
|
||||
PointF point3 = new PointF(random.nextInt(width - drawableWidth), 0);
|
||||
|
||||
// 起点固定,终点随机
|
||||
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;
|
||||
//2、创建贝塞尔属性动画
|
||||
BezierEvaluator evaluator = new BezierEvaluator(point0, point1);
|
||||
final ValueAnimator valueAnimator = ObjectAnimator.ofObject(evaluator, point2, point3);
|
||||
valueAnimator.setInterpolator(new LinearInterpolator());
|
||||
valueAnimator.setDuration(1000);
|
||||
//3、监听贝塞尔曲线估值器返回值
|
||||
valueAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
|
||||
@Override
|
||||
public void onAnimationUpdate(ValueAnimator animation) {
|
||||
//4、获取BezierEvaluator中evaluate()返回的运行轨迹坐标点,设置点赞图片路线
|
||||
PointF pointF = (PointF) animation.getAnimatedValue();
|
||||
imageView.setX(pointF.x);
|
||||
imageView.setY(pointF.y);
|
||||
//6、获取BezierEvaluator中evaluate()返回的参数t,设置消失动画
|
||||
float t = animation.getAnimatedFraction();
|
||||
imageView.setAlpha(1 - t + 0.2f);
|
||||
}
|
||||
});
|
||||
if (resource >= 3) {
|
||||
handler.removeCallbacks(runnable);
|
||||
return null;
|
||||
} else {
|
||||
resource += 1;
|
||||
}
|
||||
return valueAnimator;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取一条路径的两个控制点
|
||||
*
|
||||
* @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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,34 +11,44 @@ import android.graphics.PointF;
|
||||
*/
|
||||
public class BezierEvaluator implements TypeEvaluator<PointF> {
|
||||
|
||||
private PointF pointF1;
|
||||
private PointF pointF2;
|
||||
private PointF point1;
|
||||
private PointF point2;
|
||||
|
||||
public BezierEvaluator(PointF point1, PointF point2) {
|
||||
this.pointF1 = point1;
|
||||
this.pointF2 = point2;
|
||||
this.point1 = point1;
|
||||
this.point2 = point2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PointF evaluate(float time, PointF startValue, PointF endValue) {
|
||||
float timeLeft = 1.0f - time;
|
||||
|
||||
//结果
|
||||
public PointF evaluate(float t, PointF point0, PointF point3) {
|
||||
PointF point = new PointF();
|
||||
//t 取值为 [0,1]
|
||||
|
||||
PointF point0 = (PointF)startValue;//起点
|
||||
PointF point3 = (PointF)endValue;//终点
|
||||
/**
|
||||
* 三阶贝塞尔公式
|
||||
*
|
||||
* B(t)=(1 - t)^3 P0
|
||||
* + 3 t (1 - t)^2 P1
|
||||
* + 3 t^2 (1 - t) P2
|
||||
* + t^3 P3
|
||||
*/
|
||||
point.x = point0.x * (1 - t) * (1 - t) * (1 - t)
|
||||
+ 3 * point1.x * t * (1 - t) * (1 - t)
|
||||
+ 3 * point2.x * t * t * (1 - t)
|
||||
+ point3.x * t * t * t;
|
||||
|
||||
// 贝塞尔公式
|
||||
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);
|
||||
/**
|
||||
* 三阶贝塞尔公式
|
||||
*
|
||||
* B(t)=(1 - t)^3 P0
|
||||
* + 3 t (1 - t)^2 P1
|
||||
* + 3 t^2 (1 - t) P2
|
||||
* + t^3 P3
|
||||
*/
|
||||
point.y = point0.y * (1 - t) * (1 - t) * (1 - t)
|
||||
+ 3 * point1.y * t * (1 - t) * (1 - t)
|
||||
+ 3 * point2.y * t * t * (1 - t)
|
||||
+ point3.y * t * t * t;
|
||||
|
||||
return point;
|
||||
}
|
||||
|
||||
|
After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 15 KiB |
@@ -676,6 +676,7 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
TopViewNoLinkageAnimHelper.getInstance().clear();
|
||||
NoMapTopViewShaderHelper.getInstance().release();
|
||||
EntranceViewHolder.getInstance().release();
|
||||
mCameraLiveNoticeHelper.release();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -91,7 +91,6 @@ public class CameraLiveGSYVideoView extends LiveRoundLayout implements IMogoSkin
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 开始直播
|
||||
*
|
||||
@@ -113,7 +112,7 @@ public class CameraLiveGSYVideoView extends LiveRoundLayout implements IMogoSkin
|
||||
private void playLiveVideo(String liveUrl) {
|
||||
try {
|
||||
if (mLivePlayer != null) {
|
||||
mLivePlayer.startPlay(liveUrl, TXLivePlayer.PLAY_TYPE_LIVE_FLV);
|
||||
mLivePlayer.startPlay(liveUrl, TXLivePlayer.PLAY_TYPE_LIVE_RTMP);
|
||||
mLivePlayer.setPlayListener(new ITXLivePlayListener() {
|
||||
@Override
|
||||
public void onPlayEvent(int event, Bundle bundle) {
|
||||
@@ -129,16 +128,9 @@ public class CameraLiveGSYVideoView extends LiveRoundLayout implements IMogoSkin
|
||||
mLoading.setVisibility(GONE);
|
||||
mClLoadError.setVisibility(GONE);
|
||||
} else if (event < 0) {
|
||||
// AIAssist.getInstance(V2XUtils.getApp()).speakTTSVoice("直播获取失败,可以对我说重试", null);
|
||||
stopLive(mLiveUrl);
|
||||
mLoading.setVisibility(GONE);
|
||||
mClLoadError.setVisibility(VISIBLE);
|
||||
// // 注册语音交互
|
||||
// V2XVoiceManager.INSTANCE
|
||||
// .registerWakeCmd(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_REFRESH_CAR_LIVE,
|
||||
// v2XVoiceCallbackRefreshListener)
|
||||
// .registerUnWakeVoice(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_REFRESH_LIVE_UN_WAKEUP,
|
||||
// v2XVoiceCallbackRefreshListener);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -164,21 +156,6 @@ public class CameraLiveGSYVideoView extends LiveRoundLayout implements IMogoSkin
|
||||
// true 代表清除最后一帧画面
|
||||
mLivePlayer.stopPlay(true);
|
||||
mTxcVideoView.onDestroy();
|
||||
// 停止推流
|
||||
// V2XServiceManager
|
||||
// .getV2XRefreshModel()
|
||||
// .livePush(new V2XRefreshCallback<V2XLivePushVoRes>() {
|
||||
// @Override
|
||||
// public void onSuccess(V2XLivePushVoRes result) {
|
||||
// Logger.d(TAG, "播放器:" + result);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onFail(String msg) {
|
||||
// Logger.e(TAG, "播放器:" + msg);
|
||||
// }
|
||||
// }, carLiveInfo.getVideoSn(), 1);
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -196,10 +173,6 @@ public class CameraLiveGSYVideoView extends LiveRoundLayout implements IMogoSkin
|
||||
protected void onDetachedFromWindow() {
|
||||
stopLive(mLiveUrl);
|
||||
mLoading.setVisibility(VISIBLE);
|
||||
// 反注册语音交互
|
||||
// V2XVoiceManager.INSTANCE
|
||||
// .unRegisterWakeCmd(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_REFRESH_CAR_LIVE)
|
||||
// .unRegisterUnWakeVoice(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_REFRESH_LIVE_UN_WAKEUP);
|
||||
super.onDetachedFromWindow();
|
||||
}
|
||||
|
||||
|
||||
@@ -22,6 +22,8 @@ import com.mogo.module.extensions.live.ExtensionServiceManager;
|
||||
import com.mogo.module.extensions.live.PushDataType;
|
||||
import com.mogo.service.connection.IMogoOnWebSocketMessageListener;
|
||||
import com.mogo.service.connection.WebSocketMsgType;
|
||||
import com.mogo.service.statusmanager.IMogoStatusChangedListener;
|
||||
import com.mogo.service.statusmanager.StatusDescriptor;
|
||||
import com.mogo.utils.UiThreadHandler;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
|
||||
@@ -34,17 +36,15 @@ public class CameraLiveNoticeHelper implements IMogoOnWebSocketMessageListener<M
|
||||
private Context mContext;
|
||||
private static IMogoMarker mMogoMarker;
|
||||
private CloudRoadData mCloudRoadData;
|
||||
private boolean isFirst;
|
||||
private boolean isVrMode;
|
||||
|
||||
|
||||
public void init(Context context) {
|
||||
Logger.d(TAG, "init ======= ");
|
||||
mContext = context;
|
||||
|
||||
}
|
||||
|
||||
public void enterVrMode() {
|
||||
Logger.d(TAG, "enterVrMode===");
|
||||
MogoApisHandler.getInstance().getApis().getWebSocketManagerApi(mContext).registerOnWebSocketMessageListener(this);
|
||||
|
||||
ExtensionServiceManager
|
||||
.getMogoRegisterCenter().registerMogoMarkerClickListener(PushDataType.TYPE_PUSH_CAMERA_DATA, new IMogoMarkerClickListener() {
|
||||
@Override
|
||||
@@ -59,39 +59,32 @@ public class CameraLiveNoticeHelper implements IMogoOnWebSocketMessageListener<M
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 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 release() {
|
||||
MogoApisHandler.getInstance().getApis().getWebSocketManagerApi(mContext).unregisterOnWebSocketMessageListener(this);
|
||||
}
|
||||
|
||||
public void enterVrMode() {
|
||||
Logger.d(TAG, "enterVrMode===");
|
||||
isVrMode = true;
|
||||
}
|
||||
|
||||
|
||||
public void exitVrMode() {
|
||||
Logger.d(TAG, "退出vr模式===");
|
||||
// removeCameraMarker();
|
||||
// isFirst = false;
|
||||
MogoApisHandler.getInstance().getApis().getWebSocketManagerApi(mContext).unregisterOnWebSocketMessageListener(this);
|
||||
isVrMode = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* PushRoadConditionDrawer
|
||||
* vr模式
|
||||
*
|
||||
* @param roadData
|
||||
*/
|
||||
private void addCameraMarker(CloudRoadData roadData) {
|
||||
Logger.d(TAG, "addCameraMarker --lat = " + roadData.getLat() + "--lon =" + roadData.getLon());
|
||||
private void addVrCameraMarker(CloudRoadData roadData) {
|
||||
Logger.d(TAG, "addVrCameraMarker --lat = " + roadData.getLat() + "--lon =" + roadData.getLon());
|
||||
removeCameraMarker();
|
||||
MogoMarkerOptions options = new MogoMarkerOptions()
|
||||
.object(roadData)
|
||||
.latitude(roadData.getLat())
|
||||
@@ -109,6 +102,29 @@ public class CameraLiveNoticeHelper implements IMogoOnWebSocketMessageListener<M
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 普通模式
|
||||
*
|
||||
* @param roadData
|
||||
*/
|
||||
private void addNormalCameraMarker(CloudRoadData roadData) {
|
||||
Logger.d(TAG, "addNormalCameraMarker --lat = " + roadData.getLat() + " --lon =" + roadData.getLon());
|
||||
removeCameraMarker();
|
||||
MogoMarkerOptions options = new MogoMarkerOptions()
|
||||
.object(roadData)
|
||||
.latitude(roadData.getLat())
|
||||
.longitude(roadData.getLon());
|
||||
options.anchor(0.5f, 0.5f);
|
||||
|
||||
Bitmap bitmap = BitmapFactory.decodeResource(mContext.getResources(), R.drawable.module_camera_normal_traffic, null);
|
||||
options.icon(bitmap);
|
||||
mMogoMarker = ExtensionServiceManager.getMapService().getMarkerManager(mContext)
|
||||
.addMarker(PushDataType.TYPE_PUSH_CAMERA_DATA, options);
|
||||
if (mMogoMarker != null) {
|
||||
mMogoMarker.setInfoWindowAdapter(new CameraWindow3DAdapter(AbsMogoApplication.getApp(), mMogoMarker.getMogoMarkerOptions()));
|
||||
}
|
||||
}
|
||||
|
||||
private void removeCameraMarker() {
|
||||
if (mMogoMarker != null) {
|
||||
mMogoMarker.remove();
|
||||
@@ -125,37 +141,55 @@ public class CameraLiveNoticeHelper implements IMogoOnWebSocketMessageListener<M
|
||||
return MogoSnapshotSetData.class;
|
||||
}
|
||||
|
||||
private double mCurrentlat;
|
||||
private double mCurrentlon;
|
||||
private volatile boolean isLoadVr;
|
||||
private volatile boolean isLoadNormal;
|
||||
|
||||
private String mCurretnUuid;
|
||||
|
||||
/**
|
||||
* @param obj
|
||||
*/
|
||||
@Override
|
||||
public void onMsgReceived(MogoSnapshotSetData obj) {
|
||||
// Logger.d(TAG, "onMsgReceived cameralive : " + obj);
|
||||
if (obj != null) { //如果多个点,如何处理,点击的时候
|
||||
Logger.d(TAG, "onMsgReceived cameralive : " + obj);
|
||||
if (obj != null) {
|
||||
mCloudRoadData = obj.getCamera();
|
||||
if (mCloudRoadData != null) {
|
||||
Log.d(TAG, "onMsgReceived getRtmpUrl = " + mCloudRoadData.getRtmpUrl());
|
||||
Log.d(TAG, "mCurrentlat = " + mCurrentlat + "--mCurrentlon = " + mCurrentlon + "---mCloudRoadData.getLat() = " + mCloudRoadData.getLat() + "--mCloudRoadData.getLon() = " + mCloudRoadData.getLon());
|
||||
if (mCurrentlat == mCloudRoadData.getLat() && mCurrentlon == mCloudRoadData.getLon()) {
|
||||
//TODO
|
||||
Log.e(TAG, "onMsgReceived getRtmpUrl = " + mCloudRoadData.getRtmpUrl() + "--- isVrMode = " + isVrMode + ">>>>mCurretnUuid = " + mCurretnUuid + ">>>mCloudRoadData.getUuid() = " + mCloudRoadData.getUuid());
|
||||
if (mCurretnUuid != null && mCurretnUuid.equals(mCloudRoadData.getUuid())) {
|
||||
Log.d(TAG, "isLoadVr = " + isLoadVr + "....isLoadNormal = " + isLoadNormal);
|
||||
if (isVrMode) {
|
||||
if (!isLoadVr) {
|
||||
addVrCameraMarker(mCloudRoadData);
|
||||
isLoadVr = true;
|
||||
isLoadNormal = false;
|
||||
}
|
||||
} else {
|
||||
if (!isLoadNormal) {
|
||||
addNormalCameraMarker(mCloudRoadData);
|
||||
isLoadNormal = true;
|
||||
isLoadVr = false;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
removeCameraMarker();
|
||||
addCameraMarker(mCloudRoadData);
|
||||
mCurrentlat = mCloudRoadData.getLat();
|
||||
mCurrentlon = mCloudRoadData.getLon();
|
||||
if (isVrMode) {
|
||||
addVrCameraMarker(mCloudRoadData);
|
||||
} else {
|
||||
addNormalCameraMarker(mCloudRoadData);
|
||||
}
|
||||
mCurretnUuid = mCloudRoadData.getUuid();
|
||||
}
|
||||
} else {
|
||||
//删除marker
|
||||
Logger.e(TAG, "onMsgReceived mCloudRoadData == null ");
|
||||
UiThreadHandler.postDelayed(() -> {
|
||||
removeCameraMarker();
|
||||
}, 1_000);
|
||||
removeCameraMarker();
|
||||
|
||||
// Log.e(TAG, "onMsgReceived mCloudRoadData == null ");
|
||||
// UiThreadHandler.postDelayed(() -> {
|
||||
//
|
||||
// }, 1_000);
|
||||
}
|
||||
} else {
|
||||
Log.e(TAG, "onMsgReceived obj == null ");
|
||||
Logger.e(TAG, "onMsgReceived obj == null ");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
After Width: | Height: | Size: 5.1 KiB |
|
After Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 14 KiB |
@@ -40,6 +40,7 @@ dependencies {
|
||||
implementation rootProject.ext.dependencies.arouter
|
||||
|
||||
implementation rootProject.ext.dependencies.amapnavi3dmap
|
||||
implementation rootProject.ext.dependencies.amaplocation
|
||||
|
||||
annotationProcessor rootProject.ext.dependencies.aroutercompiler
|
||||
if (Boolean.valueOf(RELEASE)) {
|
||||
|
||||
@@ -6,6 +6,6 @@
|
||||
<service
|
||||
android:name=".SmallMapService"
|
||||
android:exported="false"
|
||||
/>
|
||||
android:process=":smallMap"/>
|
||||
</application>
|
||||
</manifest>
|
||||
@@ -1,13 +1,17 @@
|
||||
package com.mogo.module.small.map;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.animation.LinearInterpolator;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.amap.api.location.AMapLocationClient;
|
||||
import com.amap.api.location.AMapLocationClientOption;
|
||||
import com.amap.api.maps.AMap;
|
||||
import com.amap.api.maps.CameraUpdate;
|
||||
import com.amap.api.maps.CameraUpdateFactory;
|
||||
@@ -15,13 +19,17 @@ 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.CameraPosition;
|
||||
import com.amap.api.maps.model.CustomMapStyleOptions;
|
||||
import com.amap.api.maps.model.MyLocationStyle;
|
||||
import com.amap.api.navi.AMapNaviView;
|
||||
import com.amap.api.navi.AMapNaviViewOptions;
|
||||
import com.mogo.module.common.view.RoundLayout;
|
||||
import com.mogo.module.small.map.animation.DirectionRotateAnimation;
|
||||
import com.mogo.module.small.map.utils.MapAssetStyleUtils;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.URL;
|
||||
|
||||
/**
|
||||
* 小地图的方向View
|
||||
@@ -32,11 +40,13 @@ import java.net.URL;
|
||||
public class SmallMapDirectionView extends RoundLayout {
|
||||
|
||||
private ImageView mIvMapBorder;
|
||||
private TextureMapView mTextureMapView;
|
||||
private AMapNaviView mAMapNaviView;
|
||||
private AMap mAMap;
|
||||
private UiSettings mUiSettings;
|
||||
private CameraUpdate mCameraUpdate;
|
||||
private MyLocationStyle myLocationStyle;
|
||||
private AMapLocationClient mLocationClient;
|
||||
private AMapLocationClientOption mLocationClientOption;
|
||||
|
||||
private DirectionRotateAnimation mRotateAnimation;
|
||||
private int lastAngle = 0;
|
||||
@@ -59,42 +69,127 @@ public class SmallMapDirectionView extends RoundLayout {
|
||||
|
||||
LayoutInflater.from(context).inflate(R.layout.module_small_map_view, this);
|
||||
mIvMapBorder = findViewById(R.id.ivMapBorder);
|
||||
mTextureMapView = findViewById(R.id.textureMapView);
|
||||
mAMapNaviView = findViewById(R.id.aMapNaviView);
|
||||
mAMapNaviView.onCreate(null);
|
||||
// 车头朝上
|
||||
mAMapNaviView.setNaviMode(AMapNaviView.CAR_UP_MODE);
|
||||
mAMap = mAMapNaviView.getMap();
|
||||
|
||||
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。
|
||||
// 导航地图
|
||||
AMapNaviViewOptions options = mAMapNaviView.getViewOptions();
|
||||
//设置导航界面UI是否显示。
|
||||
if (options != null) {
|
||||
// 设置是否开启自动黑夜模式切换,默认为false,不自动切换
|
||||
options.setAutoNaviViewNightMode(false);
|
||||
// 设置6秒后是否自动锁车
|
||||
options.setAutoLockCar(true);
|
||||
// 设置路线上的摄像头气泡是否显示
|
||||
options.setCameraBubbleShow(false);
|
||||
// 设置路线相关的配置属性,如:路线的路况颜色,路线上是否显示摄像头气泡等。
|
||||
// options.setRouteOverlayOptions( MapStyleUtils.getRouteOverlayOptions() );
|
||||
// 设置自车的图片对象
|
||||
options.setCarBitmap(BitmapFactory.decodeResource(getContext().getResources(),
|
||||
R.drawable.module_small_map_view_my_location_logo));
|
||||
// 设置罗盘位图对象
|
||||
options.setFourCornersBitmap(BitmapFactory.decodeResource(getContext().getResources(),
|
||||
R.drawable.icon_module_small_map_four_corners));
|
||||
// 设置指南针图标否在导航界面显示,默认显示。true,显示;false,隐藏。
|
||||
options.setCompassEnabled(false);
|
||||
// 黑夜模式
|
||||
options.setNaviNight(true);
|
||||
//设置路况光柱条是否显示(只适用于驾车导航,需要联网)。
|
||||
options.setTrafficBarEnabled(false);
|
||||
// 设置[实时交通图层开关按钮]是否显示(只适用于驾车导航,需要联网)。
|
||||
options.setTrafficLayerEnabled(false);
|
||||
// 设置导航界面是否显示路线全览按钮。
|
||||
options.setRouteListButtonShow(false);
|
||||
// 设置屏幕是否常亮,默认开启
|
||||
options.setScreenAlwaysBright(false);
|
||||
// 设置交通播报是否打开(只适用于驾车导航,需要联网)。
|
||||
options.setTrafficInfoUpdateEnabled(false);
|
||||
// 设置摄像头播报是否打开(只适用于驾车导航)。
|
||||
options.setCameraInfoUpdateEnabled(false);
|
||||
// 设置菜单按钮是否在导航界面显示。
|
||||
options.setSettingMenuEnabled(false);
|
||||
// 设置是否绘制显示交通路况的线路(彩虹线),拥堵-红色,畅通-绿色,缓慢-黄色,未知-蓝色。默认不绘制彩虹线。
|
||||
options.setTrafficLine(false);
|
||||
// 设置是否绘制牵引线(当前位置到目的地的指引线)。默认不绘制牵引线。
|
||||
options.setLeaderLineEnabled(-1);
|
||||
// 设置导航界面UI是否显示。
|
||||
options.setLayoutVisible(false);
|
||||
// 设置是否自动画路
|
||||
options.setAutoDrawRoute(false);
|
||||
// 设置是否显示路口放大图(实景图)
|
||||
options.setRealCrossDisplayShow(false);
|
||||
// 设置是否显示路口放大图(路口模型图)
|
||||
options.setModeCrossDisplayShow(false);
|
||||
// 设置是否显示道路信息view
|
||||
options.setLaneInfoShow(false);
|
||||
// 设置是否自动改变缩放等级
|
||||
options.setAutoChangeZoom(false);
|
||||
// 设置是否自动全览模式,即在算路成功后自动进入全览模式
|
||||
options.setAutoDisplayOverview(false);
|
||||
// 设置路线转向箭头隐藏和显示
|
||||
options.setNaviArrowVisible(false);
|
||||
// 通过路线是否自动置灰,仅支持驾车导航
|
||||
options.setAfterRouteAutoGray(false);
|
||||
//options.setZoom(((int) 9));
|
||||
//options.setPointToCenter(0.7D, 0.5D);
|
||||
// 2D模式
|
||||
options.setTilt(0);
|
||||
mAMapNaviView.setViewOptions(options);
|
||||
}
|
||||
// 设置电子眼所在路线的可见性
|
||||
mAMapNaviView.setRouteOverlayVisible(false);
|
||||
// 设置是否隐藏AMapNaviView上的CarOverlay,包括自车、罗盘
|
||||
mAMapNaviView.setCarOverlayVisible(true);
|
||||
mAMapNaviView.setViewOptions(options);
|
||||
|
||||
//设置希望展示的地图缩放级别
|
||||
mCameraUpdate = CameraUpdateFactory.zoomTo(12);
|
||||
mAMap.moveCamera(mCameraUpdate);
|
||||
|
||||
// 设置当前位置的样式
|
||||
// myLocationStyle = new MyLocationStyle();//初始化定位蓝点样式类
|
||||
// myLocationStyle.myLocationType(MyLocationStyle.LOCATION_TYPE_LOCATION_ROTATE);//连续定位、且将视角移动到地图中心点,定位点依照设备方向旋转,并且会跟随设备移动。(1秒1次定位)如果不设置myLocationType,默认也会执行此种模式。
|
||||
// myLocationStyle.interval(1000); //设置连续定位模式下的定位间隔,只在连续定位模式下生效,单次定位模式下不会生效。单位为毫秒。
|
||||
// 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。
|
||||
|
||||
mAMap.setOnCameraChangeListener(new AMap.OnCameraChangeListener() {
|
||||
@Override
|
||||
public void onCameraChange(CameraPosition cameraPosition) {
|
||||
if (cameraPosition != null) {
|
||||
//Log.w("onCameraChange", "cameraPosition=" + cameraPosition.bearing);
|
||||
changeAngle((int) cameraPosition.bearing);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCameraChangeFinish(CameraPosition cameraPosition) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
// 关闭地图文字标注
|
||||
mAMap.showMapText(false);
|
||||
|
||||
// 设置地图的样式
|
||||
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下边界距离屏幕底部的边距,设置为负值即可
|
||||
|
||||
|
||||
CustomMapStyleOptions customMapStyleOptions = new CustomMapStyleOptions();
|
||||
customMapStyleOptions.setStyleData(MapAssetStyleUtils.getAssetsStyle(context));
|
||||
customMapStyleOptions.setStyleExtraData(MapAssetStyleUtils.getAssetsExtraStyle(context));
|
||||
customMapStyleOptions.setEnable(true);
|
||||
mAMap.setCustomMapStyle(customMapStyleOptions);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -104,9 +199,10 @@ public class SmallMapDirectionView extends RoundLayout {
|
||||
* @param angle 角度 0 - 359度旋转,相对于自身中心位置
|
||||
*/
|
||||
public void changeAngle(int angle) {
|
||||
int tempAngle = angle;
|
||||
if (angle <= 180) {
|
||||
tempAngle = angle;
|
||||
int tempAngle = 360 - angle;
|
||||
|
||||
if (tempAngle <= 180) {
|
||||
tempAngle = tempAngle;
|
||||
} else {
|
||||
tempAngle = -(360 - tempAngle);
|
||||
}
|
||||
|
||||
@@ -88,15 +88,6 @@ public class SmallMapService extends Service {
|
||||
|
||||
mSmallMapDirectionView = mWindowManagerView.findViewById(R.id.smallMapDirectionView);
|
||||
|
||||
|
||||
mSmallMapDirectionView.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Random random = new Random();
|
||||
mSmallMapDirectionView.changeAngle(random.nextInt(360));
|
||||
}
|
||||
}, 1000);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.mogo.module.small.map.utils;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
/**
|
||||
* @author donghongyu
|
||||
* @date 12/18/20 5:37 PM
|
||||
*/
|
||||
public class MapAssetStyleUtils {
|
||||
|
||||
public static byte[] getAssetsStyle(Context context) {
|
||||
byte[] buffer1 = null;
|
||||
InputStream is1 = null;
|
||||
try {
|
||||
is1 = context.getResources().getAssets().open("small_map_style.data");
|
||||
int lenght1 = is1.available();
|
||||
buffer1 = new byte[lenght1];
|
||||
is1.read(buffer1);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
try {
|
||||
if (is1 != null) {
|
||||
is1.close();
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return buffer1;
|
||||
}
|
||||
|
||||
|
||||
public static byte[] getAssetsExtraStyle(Context context) {
|
||||
byte[] buffer1 = null;
|
||||
InputStream is1 = null;
|
||||
try {
|
||||
is1 = context.getResources().getAssets().open("small_map_style_extra.data");
|
||||
int lenght1 = is1.available();
|
||||
buffer1 = new byte[lenght1];
|
||||
is1.read(buffer1);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
try {
|
||||
if (is1 != null) {
|
||||
is1.close();
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return buffer1;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
After Width: | Height: | Size: 1017 B |
@@ -2,25 +2,23 @@
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- 边 -->
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<shape android:shape="oval">
|
||||
<padding
|
||||
android:bottom="2dp"
|
||||
android:left="2dp"
|
||||
android:right="2dp"
|
||||
android:top="2dp" />
|
||||
<corners android:radius="720px" />
|
||||
<gradient
|
||||
android:angle="180"
|
||||
android:endColor="#7997ff"
|
||||
android:startColor="#284190"
|
||||
android:type="linear"
|
||||
android:useLevel="true" />
|
||||
android:angle="315"
|
||||
android:endColor="#284190"
|
||||
android:startColor="#7997ff"
|
||||
android:type="linear" />
|
||||
</shape>
|
||||
|
||||
</item>
|
||||
<!-- 中心背景 -->
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<shape android:shape="oval">
|
||||
<solid android:color="#3F51B5" />
|
||||
<corners android:radius="720px" />
|
||||
</shape>
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
android:layout_centerInParent="true"
|
||||
app:roundLayoutRadius="360dp">
|
||||
|
||||
<com.amap.api.maps.TextureMapView
|
||||
android:id="@+id/textureMapView"
|
||||
<com.amap.api.navi.AMapNaviView
|
||||
android:id="@+id/aMapNaviView"
|
||||
android:layout_width="@dimen/module_small_map_view_width"
|
||||
android:layout_height="@dimen/module_small_map_view_width" />
|
||||
|
||||
|
||||
@@ -14,11 +14,11 @@
|
||||
"zoom": true,
|
||||
"zoomScale": 15,
|
||||
"location": {
|
||||
"lat":39.966668,
|
||||
"lon":116.411211
|
||||
"lat":39.969088,
|
||||
"lon":116.41808
|
||||
},
|
||||
"lat":39.966668,
|
||||
"lon":116.411211,
|
||||
"lat":39.969088,
|
||||
"lon":116.41808,
|
||||
"userHead": "https://yycp-static-1255510688.cos.ap-beijing.myqcloud.com/defaultUserHeadImg/5.png",
|
||||
"msgImgUrl": "https://upload.jianshu.io/users/upload_avatars/7663825/7c28763e-002b-4e89-8dea-5b8da210ef2c.jpg"
|
||||
}
|
||||
@@ -13,8 +13,8 @@
|
||||
"zoom": true,
|
||||
"zoomScale": 15,
|
||||
"location": {
|
||||
"lat": 39.9754100000,
|
||||
"lon": 116.4178276100
|
||||
"lat":39.969088,
|
||||
"lon":116.41808
|
||||
},
|
||||
"userHead": "https://yycp-static-1255510688.cos.ap-beijing.myqcloud.com/defaultUserHeadImg/5.png",
|
||||
"msgImgUrl": "https://upload.jianshu.io/users/upload_avatars/7663825/7c28763e-002b-4e89-8dea-5b8da210ef2c.jpg"
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
"zoom": true,
|
||||
"zoomScale": 15,
|
||||
"location": {
|
||||
"lat": 39.9754100000,
|
||||
"lon": 116.4178276100
|
||||
"lat":39.969088,
|
||||
"lon":116.41808
|
||||
},
|
||||
"userHead": "https://yycp-static-1255510688.cos.ap-beijing.myqcloud.com/defaultUserHeadImg/5.png",
|
||||
"msgImgUrl": "https://upload.jianshu.io/users/upload_avatars/7663825/7c28763e-002b-4e89-8dea-5b8da210ef2c.jpg"
|
||||
|
||||
@@ -13,11 +13,11 @@
|
||||
"zoom": true,
|
||||
"zoomScale": 15,
|
||||
"location": {
|
||||
"lat": 39.971417,
|
||||
"lon": 116.415853
|
||||
"lat":39.969088,
|
||||
"lon":116.41808
|
||||
},
|
||||
"lat": 39.968678,
|
||||
"lon": 116.405467,
|
||||
"lat":39.969088,
|
||||
"lon":116.41808,
|
||||
"userHead": "tUserHeadImg/5.png",
|
||||
"msgImgUrl": "https://upload.jianshu.io/users/upload_avatars/7663825/7c28763e-002b-4e89-8dea-5b8da210ef2c.jpg"
|
||||
}
|
||||
@@ -13,11 +13,11 @@
|
||||
"zoom": true,
|
||||
"zoomScale": 15,
|
||||
"location": {
|
||||
"lat": 39.971417,
|
||||
"lon": 116.415853
|
||||
"lat":39.969088,
|
||||
"lon":116.41808
|
||||
},
|
||||
"lat": 39.968678,
|
||||
"lon": 116.405467,
|
||||
"lat":39.969088,
|
||||
"lon":116.41808,
|
||||
"headImgUrl": "https://yycp-static-1255510688.cos.ap-beijing.myqcloud.com/defaultUserHeadImg/5.png",
|
||||
"msgImgUrl": "https://upload.jianshu.io/users/upload_avatars/7663825/7c28763e-002b-4e89-8dea-5b8da210ef2c.jpg"
|
||||
}
|
||||
@@ -11,8 +11,8 @@
|
||||
"tts": "前方发现障碍物注意避让",
|
||||
"zoom": false,
|
||||
"zoomScale": 15,
|
||||
"lat": 40.196512,
|
||||
"lon": 116.736461,
|
||||
"lat":39.969088,
|
||||
"lon":116.41808,
|
||||
"userHead": "",
|
||||
"msgImgUrl": "",
|
||||
"polyline": [
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
"tts": "发现后方车辆超速,注意保持车道",
|
||||
"zoom": false,
|
||||
"zoomScale": 15,
|
||||
"lat": 40.196512,
|
||||
"lon": 116.736461,
|
||||
"lat":39.969088,
|
||||
"lon":116.41808,
|
||||
"userHead": "",
|
||||
"msgImgUrl": "",
|
||||
"polyline": [
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
"tts": "前车急刹注意减速",
|
||||
"zoom": false,
|
||||
"zoomScale": 15,
|
||||
"lat": 40.195206,
|
||||
"lon": 116.727433,
|
||||
"lat":39.969088,
|
||||
"lon":116.41808,
|
||||
"userHead": "",
|
||||
"msgImgUrl": "",
|
||||
"polyline": [
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
"zoomScale": 15,
|
||||
"userHead": "",
|
||||
"msgImgUrl": "",
|
||||
"lat": 40.196512,
|
||||
"lon": 116.736461,
|
||||
"lat":39.969088,
|
||||
"lon":116.41808,
|
||||
"polyline": [
|
||||
[
|
||||
116.725091,
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
"zoomScale": 15,
|
||||
"userHead": "",
|
||||
"msgImgUrl": "",
|
||||
"lat": 40.195571,
|
||||
"lon": 116.729344,
|
||||
"lat":39.969088,
|
||||
"lon":116.41808,
|
||||
"polyline": [
|
||||
[
|
||||
116.725091,
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
"tts": "发现后方VIP车辆,注意避让",
|
||||
"zoom": false,
|
||||
"zoomScale": 15,
|
||||
"lat": 40.196512,
|
||||
"lon": 116.736461,
|
||||
"lat":39.969088,
|
||||
"lon":116.41808,
|
||||
"userHead": "",
|
||||
"msgImgUrl": "",
|
||||
"polyline": [
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
"tts": "对向来车注意减速",
|
||||
"zoom": false,
|
||||
"zoomScale": 15,
|
||||
"lat": 40.196175,
|
||||
"lon": 116.731011,
|
||||
"lat":39.969088,
|
||||
"lon":116.41808,
|
||||
"userHead": "",
|
||||
"msgImgUrl": "",
|
||||
"polyline": [
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
"tts": "已为您变灯,可优先通行",
|
||||
"zoom": false,
|
||||
"zoomScale": 15,
|
||||
"lat": 40.196512,
|
||||
"lon": 116.736461,
|
||||
"lat":39.969088,
|
||||
"lon":116.41808,
|
||||
"userHead": "",
|
||||
"msgImgUrl": "",
|
||||
"polyline": [
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
"tts": "检测到路口行人穿行注意避让",
|
||||
"zoom": false,
|
||||
"zoomScale": 15,
|
||||
"lat": 40.196512,
|
||||
"lon": 116.736461,
|
||||
"lat":39.969088,
|
||||
"lon":116.41808,
|
||||
"userHead": "",
|
||||
"msgImgUrl": "",
|
||||
"polyline": [
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
"location":{
|
||||
"address":"北三环环球贸易中心",
|
||||
"angle":270,
|
||||
"lat":39.966668,
|
||||
"lon":116.411211
|
||||
"lat":39.969088,
|
||||
"lon":116.41808
|
||||
},
|
||||
"noveltyInfo":{
|
||||
"addr":"北三环环球贸易中心",
|
||||
@@ -27,8 +27,8 @@
|
||||
"location":{
|
||||
"address":"北三环环球贸易中心",
|
||||
"angle":270,
|
||||
"lat":39.966668,
|
||||
"lon":116.411211
|
||||
"lat":39.969088,
|
||||
"lon":116.41808
|
||||
},
|
||||
"poiType":"10003",
|
||||
"type":"CARD_TYPE_ROAD_CONDITION",
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
{
|
||||
"createTime":1593678359872,
|
||||
"distance":1100,
|
||||
"lat":39.866668,
|
||||
"lon":116.411211,
|
||||
"lat":39.969088,
|
||||
"lon":116.41808,
|
||||
"sn":"ZD801B1932L00041",
|
||||
"targetId":20007,
|
||||
"targetName":"故障车",
|
||||
|
||||