平移
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
package com.mogo.module.v2x.scenario.scene.pushVR;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
import com.mogo.map.MogoLatLng;
|
||||
import com.mogo.map.marker.IMogoMarker;
|
||||
import com.mogo.map.marker.MogoMarkerOptions;
|
||||
import com.mogo.map.overlay.IMogoPolyline;
|
||||
@@ -13,6 +16,7 @@ import com.mogo.module.v2x.utils.MarkerUtils;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import static com.mogo.module.v2x.V2XConst.V2X_EVENT_ALARM_POI;
|
||||
@@ -55,13 +59,32 @@ public class V2XPushVREventMarker implements IV2XMarker<V2XPushMessageEntity> {
|
||||
|
||||
optionsRipple.icon(V2XMarkerAdapter.getV2XVRRoadEventViewPng(entity));
|
||||
mAlarmInfoMarker = V2XServiceManager.getMarkerManager().addMarker(V2X_EVENT_ALARM_POI, optionsRipple);
|
||||
|
||||
drawablePloyLine(entity);
|
||||
moveTrack(entity);
|
||||
// drawablePloyLine(entity);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
平滑移动
|
||||
* */
|
||||
void moveTrack(V2XPushMessageEntity entity) {
|
||||
List<MogoLatLng> points = new ArrayList();
|
||||
List<double[]> polylines = entity.getMoveTrack();
|
||||
for (int i = 0; i < polylines.size(); i++) {
|
||||
try {
|
||||
double[] latlonList = polylines.get(i);
|
||||
MogoLatLng latLng = new MogoLatLng(latlonList[1], latlonList[0]);
|
||||
points.add(latLng);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
Log.d("平滑移动经纬度=====",points.toString());
|
||||
mAlarmInfoMarker.startSmooth(points, 1);
|
||||
}
|
||||
|
||||
void drawablePloyLine(V2XPushMessageEntity entity) {
|
||||
// 连接线参数
|
||||
MogoPolylineOptions options = new MogoPolylineOptions();
|
||||
|
||||
Reference in New Issue
Block a user