This commit is contained in:
lixiaopeng
2020-08-13 10:06:42 +08:00
parent 3643effb44
commit c32448dfc6
3 changed files with 44 additions and 39 deletions

View File

@@ -1065,53 +1065,54 @@ public class TanluListWindow extends RelativeLayout implements IMogoMarkerClickL
String fromType = event.fromType;
boolean isCumtom = event.isCumtom;
Logger.d(TAG, "onMarkerInfo share poiType = " + poiType + " --isCumtom = " + isCumtom + " >> getMathRandom = " + getMathRandom() + " >>> bearing = " + bearing + ">>>fromType = " + fromType);
if (isCumtom && !poiType.equals("0")) {
double lat = TanluServiceManager.getLocationClient().getLastKnowLocation().getLatitude();
double lon = TanluServiceManager.getLocationClient().getLastKnowLocation().getLongitude();
Log.d(TAG, "onMarkerInfo lat = " + lat + " >>>> lon = " + lon);
String cityName = TanluServiceManager.getLocationClient().getLastKnowLocation().getCityName();
String address = TanluServiceManager.getLocationClient().getLastKnowLocation().getAddress();
MarkerExploreWay markerExploreWay = new MarkerExploreWay();
markerExploreWay.setCityName(cityName);
markerExploreWay.setPoiType(poiType);
if (!fromType.equals("5")) {
if (isCumtom && !poiType.equals("0")) {
double lat = TanluServiceManager.getLocationClient().getLastKnowLocation().getLatitude();
double lon = TanluServiceManager.getLocationClient().getLastKnowLocation().getLongitude();
Log.d(TAG, "onMarkerInfo lat = " + lat + " >>>> lon = " + lon);
String cityName = TanluServiceManager.getLocationClient().getLastKnowLocation().getCityName();
String address = TanluServiceManager.getLocationClient().getLastKnowLocation().getAddress();
MarkerExploreWay markerExploreWay = new MarkerExploreWay();
markerExploreWay.setCityName(cityName);
markerExploreWay.setPoiType(poiType);
MarkerLocation markerLocation = new MarkerLocation();
markerLocation.setLat(lat);
markerLocation.setLon(lon);
markerLocation.setAddress(address);
MarkerLocation markerLocation = new MarkerLocation();
markerLocation.setLat(lat);
markerLocation.setLon(lon);
markerLocation.setAddress(address);
MarkerShowEntity markerShowEntity = new MarkerShowEntity();
markerShowEntity.setBindObj(markerExploreWay);
markerShowEntity.setTextContent(address);
markerShowEntity.setMarkerType(TanluConstants.MODEL_NAME);
markerShowEntity.setMarkerLocation(markerLocation);
MarkerShowEntity markerShowEntity = new MarkerShowEntity();
markerShowEntity.setBindObj(markerExploreWay);
markerShowEntity.setTextContent(address);
markerShowEntity.setMarkerType(TanluConstants.MODEL_NAME);
markerShowEntity.setMarkerLocation(markerLocation);
if (!fromType.equals("5")) {
AIAssist.getInstance(getContext()).speakTTSVoice((
String.format(voiceShareSuccessTts, getMathRandom())), null);
TipToast.shortTip("分享成功");
}
IMogoMarker mogoMarker = TanluServiceManager.getServiceApis().getMarkerService().drawMarker(markerShowEntity);
mogoMarker.setClickable(false);
//开启动画
mogoMarker.startScaleAnimationWithAlpha(0, 1.2f, 0, 1.2f, 0f, 1f, 300, new LinearInterpolator(), new OnMarkerAnimationListener() {
@Override
public void onAnimStart() {
Logger.d(TAG, " onAnimStart ---1----> ");
}
IMogoMarker mogoMarker = TanluServiceManager.getServiceApis().getMarkerService().drawMarker(markerShowEntity);
mogoMarker.setClickable(false);
@Override
public void onAnimEnd() {
if (mogoMarker.isDestroyed()) {
return;
//开启动画
mogoMarker.startScaleAnimationWithAlpha(0, 1.2f, 0, 1.2f, 0f, 1f, 300, new LinearInterpolator(), new OnMarkerAnimationListener() {
@Override
public void onAnimStart() {
Logger.d(TAG, " onAnimStart ---1----> ");
}
mogoMarker.startScaleAnimation(1.2f, 1, 1.2f, 1, 100, new LinearInterpolator(), null);
}
});
} else {
Logger.e(TAG, "onMarkerInfo share onCompleted poiType = -1 --- else ---->");
@Override
public void onAnimEnd() {
if (mogoMarker.isDestroyed()) {
return;
}
mogoMarker.startScaleAnimation(1.2f, 1, 1.2f, 1, 100, new LinearInterpolator(), null);
}
});
} else {
Logger.e(TAG, "onMarkerInfo share onCompleted poiType = -1 --- else ---->");
}
}
}