Merge branch 'feature/v1.0.0' of gitlab.zhidaoauto.com:ecos/yycp-service/Launcher into feature/v1.0.0
This commit is contained in:
@@ -36,6 +36,7 @@ public class GsonUtil {
|
||||
try {
|
||||
return getGson().toJson(object);
|
||||
} catch ( Exception var2) {
|
||||
var2.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -48,6 +49,7 @@ public class GsonUtil {
|
||||
try {
|
||||
return getGson().fromJson(json, klass);
|
||||
} catch ( Exception var3) {
|
||||
var3.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,8 +7,8 @@ import java.io.Serializable;
|
||||
@SuppressWarnings("unused")
|
||||
public class MarkerCarChat implements Serializable {
|
||||
|
||||
private MarkerLocation location;
|
||||
private String type;
|
||||
private MarkerLocation location;
|
||||
private MarkerUserInfo userInfo;
|
||||
|
||||
public MarkerLocation getLocation() {
|
||||
|
||||
@@ -7,15 +7,15 @@ import java.io.Serializable;
|
||||
@SuppressWarnings("unused")
|
||||
public class MarkerDynamicData implements Serializable {
|
||||
|
||||
private Long id;
|
||||
private double id;
|
||||
private String name;
|
||||
private Long type;
|
||||
private double type;
|
||||
|
||||
public Long getId() {
|
||||
public double getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
public void setId(double id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@@ -27,11 +27,11 @@ public class MarkerDynamicData implements Serializable {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public Long getType() {
|
||||
public double getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(Long type) {
|
||||
public void setType(double type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,18 +7,18 @@ import java.util.List;
|
||||
@SuppressWarnings("unused")
|
||||
public class MarkerExploreWay implements Serializable {
|
||||
|
||||
private String addr;
|
||||
private boolean canLive;
|
||||
private String cityName;
|
||||
private float direction;
|
||||
private Long distance;
|
||||
private Long fileType;
|
||||
private Long generateTime;
|
||||
private List<MarkerExploreWayItem> items;
|
||||
private String type;
|
||||
private MarkerLocation location;
|
||||
private String type;//卡片类型,
|
||||
private String sn;
|
||||
private MarkerUserInfo userInfo;
|
||||
private MarkerLocation location;//位置信息
|
||||
private int direction;//方位角度
|
||||
private boolean canLive;//是否可直播(1为可直播,0不可直播)
|
||||
private int fileType;//是图片还是视频(1视频,0图片)
|
||||
private String addr;//北京市朝阳区三里屯街道108号
|
||||
private long generateTime;//时间戳
|
||||
private String cityName;//:"城市名称",
|
||||
private double distance;//距离
|
||||
private MarkerUserInfo userInfo;//用户信息
|
||||
private List<MarkerExploreWayItem> items;//视频地址和图片地址
|
||||
|
||||
public String getAddr() {
|
||||
return addr;
|
||||
@@ -48,23 +48,23 @@ public class MarkerExploreWay implements Serializable {
|
||||
return direction;
|
||||
}
|
||||
|
||||
public void setDirection(float direction) {
|
||||
public void setDirection(int direction) {
|
||||
this.direction = direction;
|
||||
}
|
||||
|
||||
public Long getDistance() {
|
||||
public double getDistance() {
|
||||
return distance;
|
||||
}
|
||||
|
||||
public void setDistance(Long distance) {
|
||||
public void setDistance(double distance) {
|
||||
this.distance = distance;
|
||||
}
|
||||
|
||||
public Long getFileType() {
|
||||
public double getFileType() {
|
||||
return fileType;
|
||||
}
|
||||
|
||||
public void setFileType(Long fileType) {
|
||||
public void setFileType(int fileType) {
|
||||
this.fileType = fileType;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@ import java.io.Serializable;
|
||||
@SuppressWarnings("unused")
|
||||
public class MarkerHobbyDatum implements Serializable {
|
||||
|
||||
|
||||
private String content;
|
||||
|
||||
private int isCheck;
|
||||
|
||||
@@ -7,10 +7,34 @@ import java.io.Serializable;
|
||||
@SuppressWarnings("unused")
|
||||
public class MarkerLocation implements Serializable {
|
||||
|
||||
private String address;
|
||||
private Long angle;
|
||||
private Double lat;
|
||||
private Double lon;
|
||||
private double lat;//纬度
|
||||
private double lon;//经度
|
||||
private double angle;//车头角度,可以没有
|
||||
private String address;//具体的位置信息
|
||||
|
||||
public double getLat() {
|
||||
return lat;
|
||||
}
|
||||
|
||||
public void setLat(double lat) {
|
||||
this.lat = lat;
|
||||
}
|
||||
|
||||
public double getLon() {
|
||||
return lon;
|
||||
}
|
||||
|
||||
public void setLon(double lon) {
|
||||
this.lon = lon;
|
||||
}
|
||||
|
||||
public double getAngle() {
|
||||
return angle;
|
||||
}
|
||||
|
||||
public void setAngle(double angle) {
|
||||
this.angle = angle;
|
||||
}
|
||||
|
||||
public String getAddress() {
|
||||
return address;
|
||||
@@ -20,37 +44,13 @@ public class MarkerLocation implements Serializable {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public Long getAngle() {
|
||||
return angle;
|
||||
}
|
||||
|
||||
public void setAngle(Long angle) {
|
||||
this.angle = angle;
|
||||
}
|
||||
|
||||
public Double getLat() {
|
||||
return lat;
|
||||
}
|
||||
|
||||
public void setLat(Double lat) {
|
||||
this.lat = lat;
|
||||
}
|
||||
|
||||
public Double getLon() {
|
||||
return lon;
|
||||
}
|
||||
|
||||
public void setLon(Double lon) {
|
||||
this.lon = lon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "MarkerLocation{" +
|
||||
"address='" + address + '\'' +
|
||||
", angle=" + angle +
|
||||
", lat=" + lat +
|
||||
"lat=" + lat +
|
||||
", lon=" + lon +
|
||||
", angle=" + angle +
|
||||
", address='" + address + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,15 +7,15 @@ import java.util.List;
|
||||
@SuppressWarnings("unused")
|
||||
public class MarkerOnlineCar implements Serializable {
|
||||
|
||||
private List<MarkerActivitiesScope> activitiesScope;
|
||||
private MarkerCarInfo carInfo;
|
||||
private String compatibility;
|
||||
private MarkerDynamicData dynamicData;
|
||||
private List<MarkerHobbyDatum> hobbyData;
|
||||
private boolean isFocus;
|
||||
private MarkerLocation location;
|
||||
private String type;
|
||||
private MarkerUserInfo userInfo;
|
||||
private String type;//卡片类型
|
||||
private MarkerLocation location;//所在位置
|
||||
private Boolean isFocus;//isFocus":"0-未关注,1-关注
|
||||
private MarkerUserInfo userInfo;//用户数据
|
||||
private MarkerCarInfo carInfo;//车辆数据
|
||||
private MarkerDynamicData dynamicData;//动态数据
|
||||
private List<MarkerHobbyDatum> hobbyData;//爱好数据集合
|
||||
private List<MarkerActivitiesScope> activitiesScope;//活动范围数据集合
|
||||
private double compatibility;
|
||||
|
||||
public List<MarkerActivitiesScope> getActivitiesScope() {
|
||||
return activitiesScope;
|
||||
@@ -33,11 +33,11 @@ public class MarkerOnlineCar implements Serializable {
|
||||
this.carInfo = carInfo;
|
||||
}
|
||||
|
||||
public String getCompatibility() {
|
||||
public double getCompatibility() {
|
||||
return compatibility;
|
||||
}
|
||||
|
||||
public void setCompatibility(String compatibility) {
|
||||
public void setCompatibility(double compatibility) {
|
||||
this.compatibility = compatibility;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,16 +7,16 @@ import java.io.Serializable;
|
||||
@SuppressWarnings("unused")
|
||||
public class MarkerResponse implements Serializable {
|
||||
|
||||
private Long code;
|
||||
private int code;
|
||||
private String msg;
|
||||
private MarkerCardResult result;
|
||||
private String sign;
|
||||
|
||||
public Long getCode() {
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(Long code) {
|
||||
public void setCode(int code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@ import java.io.Serializable;
|
||||
public class MarkerShareMusic implements Serializable {
|
||||
|
||||
private String bookInfo;
|
||||
private long id;
|
||||
private int likeNumber;
|
||||
private Double id;
|
||||
private Double likeNumber;
|
||||
private MarkerLocation location;
|
||||
private String mediaId;
|
||||
private String mediaImg;
|
||||
@@ -17,7 +17,7 @@ public class MarkerShareMusic implements Serializable {
|
||||
private String mediaSinger;
|
||||
private String mediaUrl;
|
||||
private String shareContentText;
|
||||
private int shareType;
|
||||
private Double shareType;
|
||||
private String type;
|
||||
private MarkerUserInfo userInfo;
|
||||
|
||||
@@ -29,30 +29,22 @@ public class MarkerShareMusic implements Serializable {
|
||||
this.bookInfo = bookInfo;
|
||||
}
|
||||
|
||||
public long getId() {
|
||||
public Double getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(long id) {
|
||||
public void setId(Double id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public int getLikeNumber() {
|
||||
public Double getLikeNumber() {
|
||||
return likeNumber;
|
||||
}
|
||||
|
||||
public void setLikeNumber(int likeNumber) {
|
||||
public void setLikeNumber(Double likeNumber) {
|
||||
this.likeNumber = likeNumber;
|
||||
}
|
||||
|
||||
public MarkerLocation getLocation() {
|
||||
return location;
|
||||
}
|
||||
|
||||
public void setLocation(MarkerLocation location) {
|
||||
this.location = location;
|
||||
}
|
||||
|
||||
public String getMediaId() {
|
||||
return mediaId;
|
||||
}
|
||||
@@ -101,11 +93,11 @@ public class MarkerShareMusic implements Serializable {
|
||||
this.shareContentText = shareContentText;
|
||||
}
|
||||
|
||||
public int getShareType() {
|
||||
public Double getShareType() {
|
||||
return shareType;
|
||||
}
|
||||
|
||||
public void setShareType(int shareType) {
|
||||
public void setShareType(Double shareType) {
|
||||
this.shareType = shareType;
|
||||
}
|
||||
|
||||
@@ -125,6 +117,15 @@ public class MarkerShareMusic implements Serializable {
|
||||
this.userInfo = userInfo;
|
||||
}
|
||||
|
||||
public MarkerLocation getLocation() {
|
||||
return location;
|
||||
}
|
||||
|
||||
public void setLocation(MarkerLocation location) {
|
||||
this.location = location;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "MarkerShareMusic{" +
|
||||
|
||||
@@ -19,10 +19,8 @@ public class MarkerShowEntity {
|
||||
private String textContent;
|
||||
// Marker 类型
|
||||
private String markerType;
|
||||
|
||||
// 绑定 MarkerView 的数据
|
||||
private Object bindObj;
|
||||
|
||||
//Marker 经纬度位置信息
|
||||
private MarkerLocation markerLocation;
|
||||
|
||||
@@ -58,7 +56,6 @@ public class MarkerShowEntity {
|
||||
this.markerType = markerType;
|
||||
}
|
||||
|
||||
|
||||
public Object getBindObj() {
|
||||
return bindObj;
|
||||
}
|
||||
|
||||
@@ -9,12 +9,12 @@ import java.util.Calendar;
|
||||
@SuppressWarnings("unused")
|
||||
public class MarkerUserInfo implements Serializable {
|
||||
|
||||
private int age;
|
||||
private String gender;
|
||||
private String sn;
|
||||
private String userHead;
|
||||
private Long userId;
|
||||
private String userName;
|
||||
private long userId;
|
||||
private String userName;//用户昵称
|
||||
private String userHead;//用户头像
|
||||
private String gender;//gender": "男|女|无(也可以0|1|2根据实际库存返回即可)
|
||||
private int age;// 年龄段,可以为空,与车聊聊一致
|
||||
|
||||
public void setAge(int age) {
|
||||
this.age = age;
|
||||
@@ -25,7 +25,7 @@ public class MarkerUserInfo implements Serializable {
|
||||
int year = cal.get(Calendar.YEAR);
|
||||
|
||||
//2020-30=1990
|
||||
int ageDiffer = year - age;
|
||||
double ageDiffer = year - age;
|
||||
String ageStr = "" + ageDiffer;
|
||||
char[] ageChars = ageStr.toCharArray();
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ android {
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
|
||||
implementation rootProject.ext.dependencies.androidxcardview
|
||||
implementation rootProject.ext.dependencies.androidxappcompat
|
||||
implementation rootProject.ext.dependencies.androidxconstraintlayout
|
||||
implementation rootProject.ext.dependencies.arouter
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
package com.mogo.module.extensions.dialog;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
import androidx.annotation.NonNull;
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.mogo.module.extensions.R;
|
||||
import com.mogo.service.MogoServicePaths;
|
||||
import com.mogo.service.map.IMogoMapService;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
|
||||
/**
|
||||
* @author lixiaopeng
|
||||
* @description 通用分享dialog
|
||||
* @since 2020-01-10
|
||||
*/
|
||||
public class NaviNoticeDialog extends Dialog implements View.OnClickListener {
|
||||
private TextView txtOk;
|
||||
private Context mContext;
|
||||
private View tvCancel;
|
||||
private IMogoMapService mMogoMapService;
|
||||
|
||||
public NaviNoticeDialog(@NonNull Context context) {
|
||||
super(context);
|
||||
this.mContext = context;
|
||||
mMogoMapService = (IMogoMapService) ARouter.getInstance()
|
||||
.build(MogoServicePaths.PATH_SERVICES_MAP)
|
||||
.navigation(getContext());
|
||||
getWindow().setBackgroundDrawableResource(android.R.color.transparent);
|
||||
}
|
||||
|
||||
public NaviNoticeDialog(@NonNull Context context, int themeResId) {
|
||||
super(context, R.style.Theme_AppCompat_Dialog);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
initView();
|
||||
initListener();
|
||||
}
|
||||
|
||||
private void initView() {
|
||||
setContentView(R.layout.dialog_navi_notice);
|
||||
txtOk = findViewById(R.id.tv_dialog_ok);
|
||||
tvCancel = findViewById(R.id.tv_dialog_cancel);
|
||||
}
|
||||
|
||||
|
||||
private void initListener() {
|
||||
txtOk.setOnClickListener(this);
|
||||
tvCancel.setOnClickListener(this);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
int id = view.getId();
|
||||
if (id == R.id.tv_dialog_ok) {
|
||||
mMogoMapService.getNavi(getContext()).stopNavi();
|
||||
} else if (id == R.id.tv_dialog_cancel) {
|
||||
|
||||
}
|
||||
dismiss();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -27,6 +27,7 @@ import com.mogo.map.uicontroller.IMogoMapUIController;
|
||||
import com.mogo.module.common.MogoModulePaths;
|
||||
import com.mogo.module.extensions.ExtensionsModuleConst;
|
||||
import com.mogo.module.extensions.R;
|
||||
import com.mogo.module.extensions.dialog.NaviNoticeDialog;
|
||||
import com.mogo.module.extensions.navi.NaviInfoView;
|
||||
import com.mogo.module.share.ShareControl;
|
||||
import com.mogo.module.share.dialog.LaucherShareDialog;
|
||||
@@ -132,7 +133,8 @@ public class EntranceFragment extends MvpFragment< EntranceView, EntrancePresent
|
||||
mExitNavi.setOnClickListener( view -> {
|
||||
if ( mMogoNavi != null ) {
|
||||
if ( mIsLock ) {
|
||||
mMogoNavi.stopNavi();
|
||||
NaviNoticeDialog naviNoticeDialog = new NaviNoticeDialog(getContext());
|
||||
naviNoticeDialog.show();
|
||||
} else {
|
||||
mMApUIController.recoverLockMode();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||
|
||||
<gradient
|
||||
android:angle="180"
|
||||
android:endColor="#3E7FFC"
|
||||
android:startColor="#5CC1FF" />
|
||||
</shape>
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||
|
||||
<gradient
|
||||
android:angle="180"
|
||||
android:endColor="#50526E"
|
||||
android:startColor="#333F4057" />
|
||||
</shape>
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="@dimen/dp_790"
|
||||
android:layout_height="@dimen/dp_440"
|
||||
android:orientation="vertical"
|
||||
app:cardBackgroundColor="#3F4057"
|
||||
app:cardCornerRadius="@dimen/dp_20"
|
||||
>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
>
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_56"
|
||||
android:layout_marginTop="@dimen/dp_134"
|
||||
android:text="是否退出导航?"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_40"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
/>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_dialog_ok"
|
||||
android:layout_width="@dimen/dp_395"
|
||||
android:layout_height="@dimen/dp_128"
|
||||
android:background="@drawable/shape_react_blue_grident"
|
||||
android:gravity="center"
|
||||
android:text="确认"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/dp_40"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_dialog_cancel"
|
||||
android:layout_width="@dimen/dp_395"
|
||||
android:layout_height="@dimen/dp_128"
|
||||
android:background="@drawable/shape_react_gray_grident"
|
||||
android:gravity="center"
|
||||
android:text="取消"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/dp_40"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
/>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
@@ -74,7 +74,7 @@ public class MarkerServiceHandler {
|
||||
|
||||
@Override
|
||||
public void onMsgReceived(MarkerResponse response) {
|
||||
Logger.e(TAG, "===" + response);
|
||||
Logger.e(TAG, "======MarkerResponse:" + response);
|
||||
if (!getMogoStatusManager().isSearchUIShow()) {
|
||||
drawMapMarker(response);
|
||||
}
|
||||
@@ -167,7 +167,7 @@ public class MarkerServiceHandler {
|
||||
List<MarkerCarChat> carChat = markerCardResult.getCarChat();
|
||||
List<MarkerOnlineCar> onlineCar = markerCardResult.getOnlineCar();
|
||||
List<MarkerExploreWay> exploreWay = markerCardResult.getExploreWay();
|
||||
List<MarkerShareMusic> shareMusic = markerCardResult.getShareMusic();
|
||||
// List<MarkerShareMusic> shareMusic = markerCardResult.getShareMusic();
|
||||
|
||||
if (carChat != null) {
|
||||
for (MarkerCarChat markerCarChat : carChat) {
|
||||
@@ -201,33 +201,34 @@ public class MarkerServiceHandler {
|
||||
|
||||
if (exploreWay != null) {
|
||||
for (MarkerExploreWay markerExploreWay : exploreWay) {
|
||||
MarkerLocation markerLocation = markerExploreWay.getLocation();
|
||||
if (!markerExploreWay.getCanLive()) {
|
||||
MarkerLocation markerLocation = markerExploreWay.getLocation();
|
||||
|
||||
MarkerShowEntity markerShowEntity = new MarkerShowEntity();
|
||||
markerShowEntity.setBindObj(markerExploreWay);
|
||||
markerShowEntity.setMarkerLocation(markerLocation);
|
||||
markerShowEntity.setMarkerType(markerExploreWay.getType());
|
||||
markerShowEntity.setTextContent(markerExploreWay.getUserInfo().getUserName());
|
||||
markerShowEntity.setIconUrl(markerExploreWay.getUserInfo().getUserHead());
|
||||
MarkerShowEntity markerShowEntity = new MarkerShowEntity();
|
||||
markerShowEntity.setBindObj(markerExploreWay);
|
||||
markerShowEntity.setMarkerLocation(markerLocation);
|
||||
markerShowEntity.setMarkerType(markerExploreWay.getType());
|
||||
markerShowEntity.setTextContent(markerExploreWay.getAddr());
|
||||
|
||||
drawMapMarker(markerShowEntity);
|
||||
drawMapMarker(markerShowEntity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (shareMusic != null) {
|
||||
for (MarkerShareMusic markerShareMusic : shareMusic) {
|
||||
MarkerLocation markerLocation = markerShareMusic.getLocation();
|
||||
|
||||
MarkerShowEntity markerShowEntity = new MarkerShowEntity();
|
||||
markerShowEntity.setBindObj(markerShareMusic);
|
||||
markerShowEntity.setMarkerLocation(markerLocation);
|
||||
markerShowEntity.setMarkerType(markerShareMusic.getType());
|
||||
markerShowEntity.setTextContent(markerShareMusic.getMediaName());
|
||||
markerShowEntity.setIconUrl(markerShareMusic.getMediaImg());
|
||||
|
||||
drawMapMarker(markerShowEntity);
|
||||
}
|
||||
}
|
||||
// if (shareMusic != null) {
|
||||
// for (MarkerShareMusic markerShareMusic : shareMusic) {
|
||||
// MarkerLocation markerLocation = markerShareMusic.getLocation();
|
||||
//
|
||||
// MarkerShowEntity markerShowEntity = new MarkerShowEntity();
|
||||
// markerShowEntity.setBindObj(markerShareMusic);
|
||||
// markerShowEntity.setMarkerLocation(markerLocation);
|
||||
// markerShowEntity.setMarkerType(markerShareMusic.getType());
|
||||
// markerShowEntity.setTextContent(markerShareMusic.getMediaName());
|
||||
// markerShowEntity.setIconUrl(markerShareMusic.getMediaImg());
|
||||
//
|
||||
// drawMapMarker(markerShowEntity);
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
getMapUIController().changeZoom(8);
|
||||
@@ -238,19 +239,24 @@ public class MarkerServiceHandler {
|
||||
*/
|
||||
public static IMogoMarker drawMapMarker(MarkerShowEntity markerShowEntity) {
|
||||
Logger.e(TAG, "绘制Marker====markerTag:" + markerShowEntity);
|
||||
View markerView = MapMarkerAdapter.getMarkerView(mContext, markerShowEntity);
|
||||
|
||||
MogoMarkerOptions options = new MogoMarkerOptions()
|
||||
.owner(markerShowEntity.getMarkerType())
|
||||
.latitude(markerShowEntity.getMarkerLocation().getLat())
|
||||
.longitude(markerShowEntity.getMarkerLocation().getLon());
|
||||
options.icon(markerView);
|
||||
if (markerShowEntity.getMarkerLocation() != null) {
|
||||
View markerView = MapMarkerAdapter.getMarkerView(mContext, markerShowEntity);
|
||||
|
||||
IMogoMarker marker = getMarkerManager().addMarker(markerShowEntity.getMarkerType(), options);
|
||||
marker.setOnMarkerClickListener(mogoMarkerClickListener);
|
||||
marker.setObject(markerShowEntity);
|
||||
MogoMarkerOptions options = new MogoMarkerOptions()
|
||||
.owner(markerShowEntity.getMarkerType())
|
||||
.latitude(markerShowEntity.getMarkerLocation().getLat())
|
||||
.longitude(markerShowEntity.getMarkerLocation().getLon());
|
||||
options.icon(markerView);
|
||||
|
||||
return marker;
|
||||
IMogoMarker marker = getMarkerManager().addMarker(markerShowEntity.getMarkerType(), options);
|
||||
marker.setOnMarkerClickListener(mogoMarkerClickListener);
|
||||
marker.setObject(markerShowEntity);
|
||||
return marker;
|
||||
} else {
|
||||
Logger.e(TAG, "Location 必须进行初始化!!!!!");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ public class MapMarkerInfoView extends MapMarkerBaseView {
|
||||
break;
|
||||
}
|
||||
|
||||
ivCar.setRotation(markerShowEntity.getMarkerLocation().getAngle());
|
||||
ivCar.setRotation((float) markerShowEntity.getMarkerLocation().getAngle());
|
||||
if (!TextUtils.isEmpty(markerShowEntity.getTextContent())) {
|
||||
tvMarkerContent.setText(markerShowEntity.getTextContent());
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ public class MapMarkerView extends MapMarkerBaseView {
|
||||
ivBg.setImageResource(R.drawable.bg_map_marker_purple);
|
||||
break;
|
||||
}
|
||||
ivCar.setRotation(markerShowEntity.getMarkerLocation().getAngle());
|
||||
ivCar.setRotation((float) markerShowEntity.getMarkerLocation().getAngle());
|
||||
|
||||
loadImageWithMarker(markerShowEntity);
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ public class RefreshModel {
|
||||
if ( mRefreshApiService != null ) {
|
||||
final Map< String, Object > query = new ParamsProvider.Builder( mContext ).build();
|
||||
final RefreshBody refreshBody = new RefreshBody();
|
||||
refreshBody.limit = 50;
|
||||
refreshBody.limit = 5;
|
||||
refreshBody.location = new RefreshBody.LatLon( latLng.lat, latLng.lng );
|
||||
refreshBody.radius = radius;
|
||||
query.put( "data", GsonUtil.jsonFromObject( refreshBody ) );
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
android:id="@+id/llMarkerContent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_74"
|
||||
android:background="@drawable/bg_map_marker_blue_info"
|
||||
android:background="@drawable/bg_map_marker_green_info"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" >
|
||||
@@ -71,7 +71,7 @@
|
||||
android:id="@+id/ivReverseTriangle"
|
||||
android:layout_width="10dp"
|
||||
android:layout_height="10dp"
|
||||
android:src="@drawable/bg_shape_reverse_triangle_blue"
|
||||
android:src="@drawable/bg_shape_reverse_triangle_green"
|
||||
app:layout_constraintEnd_toEndOf="@+id/llMarkerContent"
|
||||
app:layout_constraintStart_toStartOf="@+id/llMarkerContent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/llMarkerContent" />
|
||||
|
||||
@@ -375,10 +375,10 @@ public class TanluCardViewFragment extends MvpFragment<IView, Presenter<IView>>
|
||||
* @param exploreWay
|
||||
*/
|
||||
private void handleData(MarkerExploreWay exploreWay) {
|
||||
if (exploreWay != null && exploreWay.getFileType() != null) {
|
||||
if (exploreWay.getFileType().equals("0")) { //图片
|
||||
if (exploreWay != null ) {
|
||||
if (exploreWay.getFileType()==0) { //图片
|
||||
refreshPhotoData(exploreWay);
|
||||
} else if (exploreWay.getFileType().equals("1")) { //视频
|
||||
} else if (exploreWay.getFileType()==1) { //视频
|
||||
refreshVideoData(exploreWay);
|
||||
}
|
||||
} else {
|
||||
@@ -483,10 +483,10 @@ public class TanluCardViewFragment extends MvpFragment<IView, Presenter<IView>>
|
||||
|
||||
//展示第一个数据
|
||||
MarkerExploreWay markerExploreWay = markerExploreWayList.get(0);
|
||||
if (markerExploreWay != null && markerExploreWay.getFileType() != null) {
|
||||
if (markerExploreWay.getFileType().equals("0")) { //图片
|
||||
if (markerExploreWay != null) {
|
||||
if (markerExploreWay.getFileType()==0) { //图片
|
||||
refreshPhotoData(markerExploreWay);
|
||||
} else if (markerExploreWay.getFileType().equals("1")) { //视频
|
||||
} else if (markerExploreWay.getFileType()==1) { //视频
|
||||
refreshVideoData(markerExploreWay);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import java.text.DecimalFormat;
|
||||
public class Utils {
|
||||
|
||||
//处理距离,大于1000时,四舍五入保留一位小数
|
||||
public static String handleDistance(long distance) {
|
||||
public static String handleDistance(double distance) {
|
||||
if (distance < 1000) {
|
||||
return distance + "M";
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user