fixed conflict
This commit is contained in:
@@ -12,6 +12,8 @@ import android.view.animation.AccelerateInterpolator;
|
||||
import android.view.animation.Interpolator;
|
||||
import android.view.animation.LinearInterpolator;
|
||||
|
||||
import com.mogo.cloud.tanlu.bean.MarkerExploreWay;
|
||||
import com.mogo.cloud.tanlu.bean.location.MarkerLocation;
|
||||
import com.mogo.commons.voice.AIAssist;
|
||||
import com.mogo.map.MogoLatLng;
|
||||
import com.mogo.map.location.MogoLocation;
|
||||
@@ -31,8 +33,7 @@ import com.mogo.map.search.poisearch.IMogoPoiSearchListener;
|
||||
import com.mogo.map.search.poisearch.MogoPoiResult;
|
||||
import com.mogo.map.search.poisearch.query.MogoPoiSearchQuery;
|
||||
import com.mogo.map.uicontroller.IMogoMapUIController;
|
||||
import com.mogo.module.common.entity.MarkerExploreWay;
|
||||
import com.mogo.module.common.entity.MarkerLocation;
|
||||
//import com.mogo.module.common.entity.MarkerExploreWay;
|
||||
import com.mogo.module.common.entity.MarkerShowEntity;
|
||||
import com.mogo.module.share.bean.VoiceCmdData;
|
||||
import com.mogo.module.share.bean.event.MarkerInfo;
|
||||
@@ -287,45 +288,45 @@ public class TanluManager implements IMogoMarkerClickListener,
|
||||
}
|
||||
|
||||
if (voiceData != null) {
|
||||
// mTanluModelData.queryRodeInfo(mContext, mKeywords, voiceData, new RoadInfoCallback() {
|
||||
// @Override
|
||||
// public void onQueryRoadInfoSuccess(@NotNull List<? extends MarkerExploreWay> roadInfoList) {
|
||||
// if (roadInfoList == null || (roadInfoList != null && roadInfoList.size() <= 0)) {
|
||||
// if ( TextUtils.equals(mKeywords,"附近")) {
|
||||
// speakFailVoice("未发现附近的特殊路况");
|
||||
// } else {
|
||||
// speakFailVoice("未发现" + mKeywords + "附近的特殊路况");
|
||||
// }
|
||||
// moveToMarcker(currentLat, currentLon);
|
||||
// return;
|
||||
// }
|
||||
// Logger.d(TAG, "onQueryRoadInfoSuccess roadInfoList.size() = " + roadInfoList.size()
|
||||
// + " >>currentLat = " + currentLat + " -->currentLon = " + currentLon);
|
||||
// MogoLocation location = TanluServiceManager.getLocationClient().getLastKnowLocation();
|
||||
// if (location != null) {
|
||||
// mCity = location.getCityName();
|
||||
// }
|
||||
// addMarkersAction((List<MarkerExploreWay>) roadInfoList, currentLat, currentLon);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onQueryRoadInfoFail(@NotNull String msg, int code) {
|
||||
// Logger.e(TAG, "onQueryRoadInfoFail ----- msg = " + msg);
|
||||
//// speakFailVoice(searchfaileVoiceStrings[1]);
|
||||
// if (TextUtils.equals(mKeywords,"附近")) {
|
||||
// speakFailVoice("未发现附近的特殊路况");
|
||||
// } else {
|
||||
// speakFailVoice("未发现" + mKeywords + "附近的特殊路况");
|
||||
// }
|
||||
// moveToMarcker(currentLat, currentLon);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onLocatSuccess(double lat, double lon) {
|
||||
// currentLat = lat;
|
||||
// currentLon = lon;
|
||||
// }
|
||||
// });
|
||||
mTanluModelData.queryRodeInfo(mContext, mKeywords, voiceData, new RoadInfoCallback() {
|
||||
@Override
|
||||
public void onQueryRoadInfoSuccess(@NotNull List<? extends MarkerExploreWay> roadInfoList) {
|
||||
if (roadInfoList == null || (roadInfoList != null && roadInfoList.size() <= 0)) {
|
||||
if (TextUtils.equals(mKeywords, "附近")) {
|
||||
speakFailVoice("未发现附近的特殊路况");
|
||||
} else {
|
||||
speakFailVoice("未发现" + mKeywords + "附近的特殊路况");
|
||||
}
|
||||
moveToMarcker(currentLat, currentLon);
|
||||
return;
|
||||
}
|
||||
Logger.d(TAG, "onQueryRoadInfoSuccess roadInfoList.size() = " + roadInfoList.size()
|
||||
+ " >>currentLat = " + currentLat + " -->currentLon = " + currentLon);
|
||||
MogoLocation location = TanluServiceManager.getLocationClient().getLastKnowLocation();
|
||||
if (location != null) {
|
||||
mCity = location.getCityName();
|
||||
}
|
||||
addMarkersAction((List<MarkerExploreWay>) roadInfoList, currentLat, currentLon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onQueryRoadInfoFail(@NotNull String msg, int code) {
|
||||
Logger.e(TAG, "onQueryRoadInfoFail ----- msg = " + msg);
|
||||
// speakFailVoice(searchfaileVoiceStrings[1]);
|
||||
if (TextUtils.equals(mKeywords, "附近")) {
|
||||
speakFailVoice("未发现附近的特殊路况");
|
||||
} else {
|
||||
speakFailVoice("未发现" + mKeywords + "附近的特殊路况");
|
||||
}
|
||||
moveToMarcker(currentLat, currentLon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLocatSuccess(double lat, double lon) {
|
||||
currentLat = lat;
|
||||
currentLon = lon;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -362,7 +363,8 @@ public class TanluManager implements IMogoMarkerClickListener,
|
||||
MarkerShowEntity markerShowEntity = new MarkerShowEntity();
|
||||
markerShowEntity.setBindObj(markerExploreWayList.get(i));
|
||||
markerShowEntity.setTextContent(list.get(i).getAddr());
|
||||
markerShowEntity.setMarkerLocation(markerExploreWayList.get(i).getLocation());
|
||||
|
||||
markerShowEntity.setMarkerLocation(getLocation(markerExploreWayList.get(i).getLocation()));
|
||||
markerShowEntity.setMarkerType(ShareConstants.MODEL_NAME);
|
||||
|
||||
TanluServiceManager.getServiceApis().getMarkerService().drawMarker(markerShowEntity);
|
||||
@@ -381,6 +383,16 @@ public class TanluManager implements IMogoMarkerClickListener,
|
||||
//直接使用当前数据list,作为切换的数据源,切换左侧列表到最新的数据
|
||||
}
|
||||
|
||||
private com.mogo.module.common.entity.MarkerLocation getLocation(MarkerLocation location) {
|
||||
com.mogo.module.common.entity.MarkerLocation markerLocation = new com.mogo.module.common.entity.MarkerLocation();
|
||||
markerLocation.setLat(location.getLat());
|
||||
markerLocation.setLon(location.getLon());
|
||||
markerLocation.setAddress(location.getAddress());
|
||||
markerLocation.setAngle(location.getAngle());
|
||||
|
||||
return markerLocation;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* marker动画
|
||||
@@ -458,7 +470,7 @@ public class TanluManager implements IMogoMarkerClickListener,
|
||||
MogoLatLng latLon = poi.getPoint();
|
||||
Double longit; //经度
|
||||
Double lat; //维度
|
||||
if (TextUtils.equals(mKeywords,"附近")) {
|
||||
if (TextUtils.equals(mKeywords, "附近")) {
|
||||
Logger.d(TAG, "附近 -onPoiSearched---1---");
|
||||
longit = TanluServiceManager.getLocationClient().getLastKnowLocation().getLongitude();
|
||||
lat = TanluServiceManager.getLocationClient().getLastKnowLocation().getLatitude();
|
||||
@@ -473,7 +485,7 @@ public class TanluManager implements IMogoMarkerClickListener,
|
||||
Logger.e(TAG, "poi == null");
|
||||
Double longit; //经度
|
||||
Double lat; //维度
|
||||
if (TextUtils.equals(mKeywords,"附近")) {
|
||||
if (TextUtils.equals(mKeywords, "附近")) {
|
||||
Logger.d(TAG, "附近 -onPoiSearched---2---");
|
||||
longit = TanluServiceManager.getLocationClient().getLastKnowLocation().getLongitude();
|
||||
lat = TanluServiceManager.getLocationClient().getLastKnowLocation().getLatitude();
|
||||
@@ -533,7 +545,7 @@ public class TanluManager implements IMogoMarkerClickListener,
|
||||
markerExploreWay.setCityName(cityName);
|
||||
markerExploreWay.setPoiType(poiType);
|
||||
|
||||
MarkerLocation markerLocation = new MarkerLocation();
|
||||
com.mogo.module.common.entity.MarkerLocation markerLocation = new com.mogo.module.common.entity.MarkerLocation();
|
||||
markerLocation.setLat(lat);
|
||||
markerLocation.setLon(lon);
|
||||
markerLocation.setAddress(address);
|
||||
@@ -542,6 +554,7 @@ public class TanluManager implements IMogoMarkerClickListener,
|
||||
markerShowEntity.setBindObj(markerExploreWay);
|
||||
markerShowEntity.setTextContent(address);
|
||||
markerShowEntity.setMarkerType(ShareConstants.MODEL_NAME);
|
||||
|
||||
markerShowEntity.setMarkerLocation(markerLocation);
|
||||
|
||||
IMogoMarker mogoMarker = TanluServiceManager.getServiceApis().getMarkerService().drawMarker(markerShowEntity);
|
||||
@@ -572,11 +585,11 @@ public class TanluManager implements IMogoMarkerClickListener,
|
||||
|
||||
@Override
|
||||
public void onAnimEnd() {
|
||||
UiThreadHandler.postDelayed( () -> {
|
||||
UiThreadHandler.postDelayed(() -> {
|
||||
if (mogoAnimationMarker != null) {
|
||||
mogoAnimationMarker.destroy();
|
||||
}
|
||||
}, 1_200L );
|
||||
}, 1_200L);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.mogo.module.share.callback
|
||||
|
||||
//import com.mogo.module.common.entity.MarkerExploreWay
|
||||
|
||||
import com.mogo.cloud.tanlu.bean.MarkerExploreWay
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user