Merge branch 'qa_merge_shunyi_vr_map' into dev_1.1.9
This commit is contained in:
@@ -92,6 +92,7 @@ class SnapshotSetDataDrawer extends BaseDrawer implements IMogoMarkerClickListen
|
||||
MogoApisHandler.getInstance().getApis().getMapServiceApi().getMarkerManager( AbsMogoApplication.getApp() ).removeMarkers( DataTypes.TYPE_MARKER_CLOUD_DATA );
|
||||
return;
|
||||
}
|
||||
filterData( data.getAllList() );
|
||||
List< CloudRoadData > allDatumsList = new ArrayList<>();
|
||||
allDatumsList.addAll( data.getAllList() );
|
||||
// allDatumsList.addAll( data.getNearList() );
|
||||
@@ -158,7 +159,7 @@ class SnapshotSetDataDrawer extends BaseDrawer implements IMogoMarkerClickListen
|
||||
List< MogoLatLng > points = new ArrayList<>();
|
||||
points.add( new MogoLatLng( lastPosition.lat, lastPosition.lon ) );
|
||||
points.add( new MogoLatLng( target.lat, target.lon ) );
|
||||
marker.startSmoothInMs( points, 500L );
|
||||
marker.startSmoothInMs( points, SystemClock.elapsedRealtime() - mLastReceiveTime );
|
||||
}
|
||||
} else {
|
||||
marker.setRotateAngle( 360 - ( float ) cloudRoadData.getHeading() );
|
||||
@@ -170,6 +171,29 @@ class SnapshotSetDataDrawer extends BaseDrawer implements IMogoMarkerClickListen
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* vr 模式下显示合并数据,否则只显示上报位置的车辆
|
||||
*
|
||||
* @param dataList
|
||||
*/
|
||||
private void filterData( List< CloudRoadData > dataList ) {
|
||||
if ( dataList == null || dataList.isEmpty() ) {
|
||||
return;
|
||||
}
|
||||
if ( MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode() ) {
|
||||
return;
|
||||
}
|
||||
List< CloudRoadData > newList = new ArrayList<>();
|
||||
for ( CloudRoadData cloudRoadData : dataList ) {
|
||||
if ( cloudRoadData.getFromType() != CloudRoadData.FROM_MY_LOCATION ) {
|
||||
continue;
|
||||
}
|
||||
newList.add( cloudRoadData );
|
||||
}
|
||||
dataList.clear();
|
||||
dataList.addAll( newList );
|
||||
}
|
||||
|
||||
private void bindClickListener( IMogoMarker marker ) {
|
||||
if ( marker == null || marker.isDestroyed() ) {
|
||||
return;
|
||||
|
||||
@@ -24,7 +24,8 @@ import com.mogo.utils.logger.Logger;
|
||||
* desc : 地图Marker图标
|
||||
* version: 1.0
|
||||
*/
|
||||
public class MapMarkerView extends MapMarkerBaseView {
|
||||
public class
|
||||
MapMarkerView extends MapMarkerBaseView {
|
||||
private String TAG = "MapMarkerView";
|
||||
|
||||
private FrameLayout clMarkerTopView;
|
||||
|
||||
@@ -1,64 +0,0 @@
|
||||
package com.mogo.module.common.utils;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.mogo.commons.network.Utils;
|
||||
import com.mogo.httpdnshelper.sdk.HttpDnsHelper;
|
||||
import com.mogo.httpdnshelper.sdk.IHttpDnsConfig;
|
||||
import com.mogo.httpdnshelper.sdk.bean.HttpDnsSimpleLocation;
|
||||
import com.mogo.map.location.MogoLocation;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* MogoHttpDnsHelper包装类
|
||||
*
|
||||
* @author tongchenfei
|
||||
*/
|
||||
public class MogoHttpDnsUtil {
|
||||
private MogoHttpDnsUtil(){
|
||||
|
||||
}
|
||||
private final static MogoHttpDnsUtil INSTANCE = new MogoHttpDnsUtil();
|
||||
public static MogoHttpDnsUtil getInstance(){
|
||||
return INSTANCE;
|
||||
}
|
||||
|
||||
public void init(Context context){
|
||||
HttpDnsHelper.INSTANCE.init(context, new IHttpDnsConfig() {
|
||||
@NotNull
|
||||
@Override
|
||||
public HttpDnsSimpleLocation getCurrentLocation() {
|
||||
MogoLocation last = MogoApisHandler.getInstance().getApis().getMapServiceApi().getSingletonLocationClient(context).getLastKnowLocation();
|
||||
if(last!=null){
|
||||
return new HttpDnsSimpleLocation(last.getCityCode(), last.getLatitude(), last.getLongitude());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean showDebugLog() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public String getSn() {
|
||||
return Utils.getSn();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public String getHttpAddress(){
|
||||
return HttpDnsHelper.INSTANCE.getHttpDnsAddress(HttpDnsHelper.HTTP_DNS_TYPE_HTTP);
|
||||
}
|
||||
|
||||
public String getWsAddress(){
|
||||
return HttpDnsHelper.INSTANCE.getHttpDnsAddress(HttpDnsHelper.HTTP_DNS_TYPE_WS);
|
||||
}
|
||||
|
||||
public void release(){
|
||||
HttpDnsHelper.INSTANCE.release();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user