|
@ -23,6 +23,7 @@ import android.os.Handler;
|
23
|
23
|
import android.provider.MediaStore;
|
24
|
24
|
|
25
|
25
|
import androidx.appcompat.app.AlertDialog;
|
|
26
|
import androidx.constraintlayout.widget.ConstraintLayout;
|
26
|
27
|
|
27
|
28
|
import android.util.Log;
|
28
|
29
|
import android.view.LayoutInflater;
|
|
@ -104,6 +105,7 @@ import com.electric.chargingpile.gen.zhan_listDao;
|
104
|
105
|
import com.electric.chargingpile.manager.ProfileManager;
|
105
|
106
|
import com.electric.chargingpile.util.BarColorUtil;
|
106
|
107
|
import com.electric.chargingpile.util.DES3S;
|
|
108
|
import com.electric.chargingpile.util.DensityUtil;
|
107
|
109
|
import com.electric.chargingpile.util.JsonUtils;
|
108
|
110
|
import com.electric.chargingpile.util.LoadingDialog;
|
109
|
111
|
import com.electric.chargingpile.util.ToastUtil;
|
|
@ -184,7 +186,6 @@ public class RoutePlanMapActivity extends Activity implements LocationSource, AM
|
184
|
186
|
private View view1, view2;
|
185
|
187
|
private RouteOverLay routeOverLay;
|
186
|
188
|
private ImageView iv_back;
|
187
|
|
String p1 = "", p2 = "", p3 = "";
|
188
|
189
|
private int select;
|
189
|
190
|
private LoadingDialog dialog;
|
190
|
191
|
private LinearLayout ll_share_ui;
|
|
@ -234,12 +235,8 @@ public class RoutePlanMapActivity extends Activity implements LocationSource, AM
|
234
|
235
|
private final String CAN_PAY_MARKER = "canPayMarker";
|
235
|
236
|
private final String NO_PAY_HAVE_STATUS_MARKER = "noPayHaveStatusMarker";
|
236
|
237
|
private final String NO_PAY_NO_STATUS_MARKER = "noPayNoStatusMarker";
|
237
|
|
private final String ROUTE_POINT_ONE = "routePointOne";
|
238
|
|
private final String ROUTE_POINT_TWO = "routePointTwo";
|
239
|
|
private final String ROUTE_POINT_THREE = "routePointThree";
|
240
|
238
|
private boolean canRefreshMarker = true;
|
241
|
239
|
private Marker currentMarker;
|
242
|
|
private List<Marker> currentMarkersList = new ArrayList<>();
|
243
|
240
|
private Boolean[] screenList = new Boolean[4];
|
244
|
241
|
private Boolean screenListChanged = false;
|
245
|
242
|
|
|
@ -521,29 +518,6 @@ public class RoutePlanMapActivity extends Activity implements LocationSource, AM
|
521
|
518
|
canRoute = true;
|
522
|
519
|
canSave = true;
|
523
|
520
|
}
|
524
|
|
String s = "";
|
525
|
|
if (list_zhong.size() == 1) {
|
526
|
|
for (int j = 0; j < list_zhong.size(); j++) {
|
527
|
|
s += list_zhong.get(j).getZhan_id() + ":";
|
528
|
|
}
|
529
|
|
String[] my = s.split(":");
|
530
|
|
p1 = my[0];
|
531
|
|
} else if (list_zhong.size() == 2) {
|
532
|
|
for (int j = 0; j < list_zhong.size(); j++) {
|
533
|
|
s += list_zhong.get(j).getZhan_id() + ":";
|
534
|
|
}
|
535
|
|
String[] my = s.split(":");
|
536
|
|
p1 = my[0];
|
537
|
|
p2 = my[1];
|
538
|
|
} else if (list_zhong.size() == 3) {
|
539
|
|
for (int j = 0; j < list_zhong.size(); j++) {
|
540
|
|
s += list_zhong.get(j).getZhan_id() + ":";
|
541
|
|
}
|
542
|
|
String[] my = s.split(":");
|
543
|
|
p1 = my[0];
|
544
|
|
p2 = my[1];
|
545
|
|
p3 = my[2];
|
546
|
|
}
|
547
|
521
|
|
548
|
522
|
if (strategyFlag >= 0) {
|
549
|
523
|
aMapNavi.calculateDriveRoute(startList, endList, zhongList, strategyFlag);
|
|
@ -553,8 +527,6 @@ public class RoutePlanMapActivity extends Activity implements LocationSource, AM
|
553
|
527
|
aMapNavi.calculateDriveRoute(startList, endList, null, strategyFlag);
|
554
|
528
|
}
|
555
|
529
|
}
|
556
|
|
|
557
|
|
|
558
|
530
|
dialog.show();
|
559
|
531
|
}
|
560
|
532
|
|
|
@ -851,33 +823,17 @@ public class RoutePlanMapActivity extends Activity implements LocationSource, AM
|
851
|
823
|
LogUtils.e("list_zhong=" + list_zhong.size());
|
852
|
824
|
ArrayList<RouteInfoData> info = new ArrayList<>();
|
853
|
825
|
|
854
|
|
if (list_zhong.size() == 1) {
|
855
|
|
info.add(new RouteInfoData("起点-" + save_start_name, "start",
|
856
|
|
routePointInfoList.get(0).getRouteLength() + "," + routePointInfoList.get(0).getRouteTime()));
|
857
|
|
info.add(new RouteInfoData(list_zhong.get(0).getZhan_name(), "name",
|
858
|
|
routePointInfoList.get(1).getRouteLength() + "," + routePointInfoList.get(1).getRouteTime()));
|
859
|
|
info.add(new RouteInfoData("终点-" + save_end_name, "end", ""));
|
860
|
|
} else if (list_zhong.size() == 2) {
|
861
|
|
info.add(new RouteInfoData("起点-" + save_start_name, "start",
|
862
|
|
routePointInfoList.get(0).getRouteLength() + "," + routePointInfoList.get(0).getRouteTime()));
|
863
|
|
info.add(new RouteInfoData(list_zhong.get(0).getZhan_name(), "name",
|
864
|
|
routePointInfoList.get(1).getRouteLength() + "," + routePointInfoList.get(1).getRouteTime()));
|
865
|
|
info.add(new RouteInfoData(list_zhong.get(1).getZhan_name(), "name",
|
866
|
|
routePointInfoList.get(2).getRouteLength() + "," + routePointInfoList.get(2).getRouteTime()));
|
867
|
|
info.add(new RouteInfoData("终点-" + save_end_name, "end", ""));
|
868
|
|
} else if (list_zhong.size() == 3) {
|
869
|
|
info.add(new RouteInfoData("起点-" + save_start_name, "start",
|
870
|
|
routePointInfoList.get(0).getRouteLength() + "," + routePointInfoList.get(0).getRouteTime()));
|
871
|
|
info.add(new RouteInfoData(list_zhong.get(0).getZhan_name(), "name",
|
872
|
|
routePointInfoList.get(1).getRouteLength() + "," + routePointInfoList.get(1).getRouteTime()));
|
873
|
|
info.add(new RouteInfoData(list_zhong.get(1).getZhan_name(), "name",
|
874
|
|
routePointInfoList.get(2).getRouteLength() + "," + routePointInfoList.get(2).getRouteTime()));
|
875
|
|
info.add(new RouteInfoData(list_zhong.get(2).getZhan_name(), "name",
|
876
|
|
routePointInfoList.get(3).getRouteLength() + "," + routePointInfoList.get(3).getRouteTime()));
|
877
|
|
info.add(new RouteInfoData("终点-" + save_end_name, "end", ""));
|
|
826
|
for (int i = 0; i < list_zhong.size(); i++) {
|
|
827
|
Zhan zhan = list_zhong.get(i);
|
|
828
|
if (i == 0) {
|
|
829
|
info.add(new RouteInfoData("起点-" + save_start_name, "start", routePointInfoList.get(0).getRouteLength() + "," + routePointInfoList.get(0).getRouteTime()));
|
|
830
|
}
|
|
831
|
info.add(new RouteInfoData(zhan.getZhan_name(), "name", routePointInfoList.get(i + 1).getRouteLength() + "," + routePointInfoList.get(i + 1).getRouteTime()));
|
|
832
|
if (i == list_zhong.size() - 1) {
|
|
833
|
info.add(new RouteInfoData("终点-" + save_end_name, "end", ""));
|
|
834
|
}
|
878
|
835
|
}
|
879
|
836
|
|
880
|
|
|
881
|
837
|
if (roueteInfoAdapter == null) {
|
882
|
838
|
roueteInfoAdapter = new RoueteInfoAdapter(info, RoutePlanMapActivity.this);
|
883
|
839
|
} else {
|
|
@ -1006,7 +962,6 @@ public class RoutePlanMapActivity extends Activity implements LocationSource, AM
|
1006
|
962
|
BitmapDrawable bd = (BitmapDrawable) drawable;
|
1007
|
963
|
bitmap = bd.getBitmap();
|
1008
|
964
|
return bitmap;
|
1009
|
|
|
1010
|
965
|
}
|
1011
|
966
|
|
1012
|
967
|
|
|
@ -1363,16 +1318,14 @@ public class RoutePlanMapActivity extends Activity implements LocationSource, AM
|
1363
|
1318
|
Bundle bundle = new Bundle();
|
1364
|
1319
|
bundle.putSerializable("info", list.get(i));
|
1365
|
1320
|
|
1366
|
|
oocity = new MarkerOptions().position(ll).icon(BitmapDescriptorFactory.fromBitmap(getMarkerBmpYes(3)))
|
1367
|
|
.title(NO_PAY_HAVE_STATUS_MARKER);
|
|
1321
|
oocity = new MarkerOptions().position(ll).icon(BitmapDescriptorFactory.fromBitmap(getMarkerBmpYes(3))).title(NO_PAY_HAVE_STATUS_MARKER);
|
1368
|
1322
|
mMarkerCity = (Marker) amap.addMarker(oocity);
|
1369
|
1323
|
mMarkerCity.setObject(bundle);
|
1370
|
1324
|
} else {
|
1371
|
1325
|
Bundle bundle = new Bundle();
|
1372
|
1326
|
bundle.putSerializable("info", list.get(i));
|
1373
|
1327
|
|
1374
|
|
oocity = new MarkerOptions().position(ll).icon(BitmapDescriptorFactory.fromBitmap(getMarkerBmpYes(5)))
|
1375
|
|
.title(NO_PAY_NO_STATUS_MARKER);
|
|
1328
|
oocity = new MarkerOptions().position(ll).icon(BitmapDescriptorFactory.fromBitmap(getMarkerBmpYes(5))).title(NO_PAY_NO_STATUS_MARKER);
|
1376
|
1329
|
mMarkerCity = (Marker) amap.addMarker(oocity);
|
1377
|
1330
|
mMarkerCity.setObject(bundle);
|
1378
|
1331
|
}
|
|
@ -1382,35 +1335,18 @@ public class RoutePlanMapActivity extends Activity implements LocationSource, AM
|
1382
|
1335
|
}
|
1383
|
1336
|
}
|
1384
|
1337
|
} else {
|
1385
|
|
Log.e(">0", list_zhong.size() + "");
|
1386
|
|
String s = "";
|
1387
|
|
|
1388
|
|
if (list_zhong.size() == 1) {
|
1389
|
|
for (int j = 0; j < list_zhong.size(); j++) {
|
1390
|
|
s += list_zhong.get(j).getZhan_id() + ":";
|
1391
|
|
}
|
1392
|
|
String[] my = s.split(":");
|
1393
|
|
p1 = my[0];
|
1394
|
|
} else if (list_zhong.size() == 2) {
|
1395
|
|
for (int j = 0; j < list_zhong.size(); j++) {
|
1396
|
|
s += list_zhong.get(j).getZhan_id() + ":";
|
1397
|
|
}
|
1398
|
|
String[] my = s.split(":");
|
1399
|
|
p1 = my[0];
|
1400
|
|
p2 = my[1];
|
1401
|
|
} else if (list_zhong.size() == 3) {
|
1402
|
|
for (int j = 0; j < list_zhong.size(); j++) {
|
1403
|
|
s += list_zhong.get(j).getZhan_id() + ":";
|
|
1338
|
for (int i = 0; i < list.size(); i++) {
|
|
1339
|
boolean equal = false;
|
|
1340
|
for (Zhan zhan : list_zhong) {
|
|
1341
|
equal = String.valueOf(list.get(i).getId()).equals(zhan.getZhan_id());
|
|
1342
|
if (equal)
|
|
1343
|
break;
|
1404
|
1344
|
}
|
1405
|
|
String[] my = s.split(":");
|
1406
|
|
p1 = my[0];
|
1407
|
|
p2 = my[1];
|
1408
|
|
p3 = my[2];
|
1409
|
|
}
|
|
1345
|
if (equal)
|
|
1346
|
break;
|
1410
|
1347
|
|
1411
|
|
for (int i = 0; i < list.size(); i++) {
|
1412
|
|
if (!list.get(i).getPoi_wei().equals("") && !list.get(i).getPoi_jing().equals("")
|
1413
|
|
&& !String.valueOf(list.get(i).getId()).equals(p1) && !String.valueOf(list.get(i).getId()).equals(p2) && !String.valueOf(list.get(i).getId()).equals(p3)) {
|
|
1348
|
|
|
1349
|
if (!list.get(i).getPoi_wei().equals("") && !list.get(i).getPoi_jing().equals("")) {
|
1414
|
1350
|
int position = list.get(i).getPoi_jing().length() - list.get(i).getPoi_jing().indexOf(".") + 1;
|
1415
|
1351
|
|
1416
|
1352
|
LatLng ll = null;
|
|
@ -1438,8 +1374,7 @@ public class RoutePlanMapActivity extends Activity implements LocationSource, AM
|
1438
|
1374
|
Bundle bundle = new Bundle();
|
1439
|
1375
|
bundle.putSerializable("info", list.get(i));
|
1440
|
1376
|
|
1441
|
|
oocity = new MarkerOptions().position(ll).icon(BitmapDescriptorFactory.fromBitmap(getMarkerBmpYes(3)))
|
1442
|
|
.title(NO_PAY_HAVE_STATUS_MARKER);
|
|
1377
|
oocity = new MarkerOptions().position(ll).icon(BitmapDescriptorFactory.fromBitmap(getMarkerBmpYes(3))).title(NO_PAY_HAVE_STATUS_MARKER);
|
1443
|
1378
|
mMarkerCity = (Marker) amap.addMarker(oocity);
|
1444
|
1379
|
mMarkerCity.setObject(bundle);
|
1445
|
1380
|
|
|
@ -1468,28 +1403,17 @@ public class RoutePlanMapActivity extends Activity implements LocationSource, AM
|
1468
|
1403
|
getGaode(djing, dwei);
|
1469
|
1404
|
ll = new LatLng(Double.parseDouble(gd_wei), Double.parseDouble(gd_jing));
|
1470
|
1405
|
}
|
1471
|
|
if (String.valueOf(list.get(i).getId()).equals(p1) && !list.get(i).getSuit_car().equals("宝马") && !list.get(i).getSuit_car().equals("特斯拉")) {
|
1472
|
|
Bundle bundle = new Bundle();
|
1473
|
|
bundle.putSerializable("info", list.get(i));
|
1474
|
|
oocity = new MarkerOptions().position(ll).icon(BitmapDescriptorFactory.fromBitmap(getMarkerBmpYes(11)))
|
1475
|
|
.title(ROUTE_POINT_ONE);
|
1476
|
|
mMarkerCity = (Marker) amap.addMarker(oocity);
|
1477
|
|
mMarkerCity.setObject(bundle);
|
1478
|
|
} else if (String.valueOf(list.get(i).getId()).equals(p2) && !list.get(i).getSuit_car().equals("宝马") && !list.get(i).getSuit_car().equals("特斯拉")) {
|
1479
|
|
Bundle bundle = new Bundle();
|
1480
|
|
bundle.putSerializable("info", list.get(i));
|
1481
|
|
oocity = new MarkerOptions().position(ll).icon(BitmapDescriptorFactory.fromBitmap(getMarkerBmpYes(12)))
|
1482
|
|
.title(ROUTE_POINT_TWO);
|
1483
|
|
mMarkerCity = (Marker) amap.addMarker(oocity);
|
1484
|
|
mMarkerCity.setObject(bundle);
|
1485
|
|
} else if (String.valueOf(list.get(i).getId()).equals(p3) && !list.get(i).getSuit_car().equals("宝马") && !list.get(i).getSuit_car().equals("特斯拉")) {
|
1486
|
1406
|
|
1487
|
|
Bundle bundle = new Bundle();
|
1488
|
|
bundle.putSerializable("info", list.get(i));
|
1489
|
|
oocity = new MarkerOptions().position(ll).icon(BitmapDescriptorFactory.fromBitmap(getMarkerBmpYes(13)))
|
1490
|
|
.title(ROUTE_POINT_THREE);
|
1491
|
|
mMarkerCity = (Marker) amap.addMarker(oocity);
|
1492
|
|
mMarkerCity.setObject(bundle);
|
|
1407
|
int titleIndex = 0;
|
|
1408
|
for (Zhan zhan : list_zhong) {
|
|
1409
|
if (String.valueOf(list.get(i).getId()).equals(zhan.getZhan_id()) && !list.get(i).getSuit_car().equals("宝马") && !list.get(i).getSuit_car().equals("特斯拉")) {
|
|
1410
|
Bundle bundle = new Bundle();
|
|
1411
|
bundle.putSerializable("info", list.get(i));
|
|
1412
|
oocity = new MarkerOptions().position(ll).icon(BitmapDescriptorFactory.fromView(getSmallerMarkerView(titleIndex + 1 + ""))).title(titleIndex + 1 + "");
|
|
1413
|
mMarkerCity = (Marker) amap.addMarker(oocity);
|
|
1414
|
mMarkerCity.setObject(bundle);
|
|
1415
|
}
|
|
1416
|
titleIndex++;
|
1493
|
1417
|
}
|
1494
|
1418
|
}
|
1495
|
1419
|
}
|
|
@ -2233,18 +2157,32 @@ public class RoutePlanMapActivity extends Activity implements LocationSource, AM
|
2233
|
2157
|
case NO_PAY_NO_STATUS_MARKER:
|
2234
|
2158
|
marker.setIcon(BitmapDescriptorFactory.fromResource(R.drawable.icon_newmarker3));
|
2235
|
2159
|
break;
|
2236
|
|
case ROUTE_POINT_ONE:
|
2237
|
|
marker.setIcon(BitmapDescriptorFactory.fromResource(R.drawable.icon_newsmallr1));
|
2238
|
|
break;
|
2239
|
|
case ROUTE_POINT_TWO:
|
2240
|
|
marker.setIcon(BitmapDescriptorFactory.fromResource(R.drawable.icon_newsmallr2));
|
2241
|
|
break;
|
2242
|
|
case ROUTE_POINT_THREE:
|
2243
|
|
marker.setIcon(BitmapDescriptorFactory.fromResource(R.drawable.icon_newsmallr3));
|
|
2160
|
default:
|
|
2161
|
String title = marker.getTitle();
|
|
2162
|
marker.setIcon(BitmapDescriptorFactory.fromView(getSmallerMarkerView(marker.getTitle())));
|
2244
|
2163
|
break;
|
2245
|
2164
|
}
|
2246
|
2165
|
}
|
2247
|
2166
|
|
|
2167
|
private View getSmallerMarkerView(String pm_val) {
|
|
2168
|
View view = getLayoutInflater().inflate(R.layout.smaller_marker_view, null);
|
|
2169
|
TextView marker_label = view.findViewById(R.id.marker_label);
|
|
2170
|
marker_label.setText(pm_val);
|
|
2171
|
|
|
2172
|
ConstraintLayout.LayoutParams layoutParams = (ConstraintLayout.LayoutParams) marker_label.getLayoutParams();
|
|
2173
|
if (pm_val.length() == 1) {
|
|
2174
|
layoutParams.bottomMargin = DensityUtil.dip2px(RoutePlanMapActivity.this, 11);
|
|
2175
|
marker_label.setTextSize(18);
|
|
2176
|
} else {
|
|
2177
|
layoutParams.bottomMargin = DensityUtil.dip2px(RoutePlanMapActivity.this, 11);
|
|
2178
|
layoutParams.rightMargin = DensityUtil.dip2px(RoutePlanMapActivity.this, 2);
|
|
2179
|
marker_label.setTextSize(15);
|
|
2180
|
}
|
|
2181
|
marker_label.setLayoutParams(layoutParams);
|
|
2182
|
|
|
2183
|
return view;
|
|
2184
|
}
|
|
2185
|
|
2248
|
2186
|
@Override
|
2249
|
2187
|
public boolean onMarkerClick(Marker marker) {
|
2250
|
2188
|
canRefreshMarker = false;
|
|
@ -2260,18 +2198,34 @@ public class RoutePlanMapActivity extends Activity implements LocationSource, AM
|
2260
|
2198
|
marker.setIcon(BitmapDescriptorFactory.fromResource(R.drawable.icon_newbig2));
|
2261
|
2199
|
} else if (marker.getTitle().equals(NO_PAY_NO_STATUS_MARKER)) {
|
2262
|
2200
|
marker.setIcon(BitmapDescriptorFactory.fromResource(R.drawable.icon_newbig3));
|
2263
|
|
} else if (marker.getTitle().equals(ROUTE_POINT_ONE)) {
|
2264
|
|
marker.setIcon(BitmapDescriptorFactory.fromResource(R.drawable.icon_newbigr1));
|
2265
|
|
} else if (marker.getTitle().equals(ROUTE_POINT_TWO)) {
|
2266
|
|
marker.setIcon(BitmapDescriptorFactory.fromResource(R.drawable.icon_newbigr2));
|
2267
|
|
} else if (marker.getTitle().equals(ROUTE_POINT_THREE)) {
|
2268
|
|
marker.setIcon(BitmapDescriptorFactory.fromResource(R.drawable.icon_newbigr3));
|
|
2201
|
} else {
|
|
2202
|
marker.setIcon(BitmapDescriptorFactory.fromView(getBiggerMarkerView(marker.getTitle())));
|
2269
|
2203
|
}
|
2270
|
2204
|
currentMarker = marker;
|
2271
|
2205
|
marker.showInfoWindow();
|
2272
|
2206
|
return true;
|
2273
|
2207
|
}
|
2274
|
2208
|
|
|
2209
|
private View getBiggerMarkerView(String pm_val) {
|
|
2210
|
View view = getLayoutInflater().inflate(R.layout.bigger_marker_view, null);
|
|
2211
|
TextView marker_label = view.findViewById(R.id.marker_label);
|
|
2212
|
marker_label.setText(pm_val);
|
|
2213
|
|
|
2214
|
ConstraintLayout.LayoutParams layoutParams = (ConstraintLayout.LayoutParams) marker_label.getLayoutParams();
|
|
2215
|
if (pm_val.length() == 1) {
|
|
2216
|
layoutParams.bottomMargin = DensityUtil.dip2px(RoutePlanMapActivity.this, 11);
|
|
2217
|
marker_label.setTextSize(20);
|
|
2218
|
layoutParams.rightMargin = DensityUtil.dip2px(RoutePlanMapActivity.this, 1);
|
|
2219
|
} else {
|
|
2220
|
layoutParams.bottomMargin = DensityUtil.dip2px(RoutePlanMapActivity.this, 12);
|
|
2221
|
layoutParams.rightMargin = DensityUtil.dip2px(RoutePlanMapActivity.this, 2);
|
|
2222
|
marker_label.setTextSize(16);
|
|
2223
|
}
|
|
2224
|
marker_label.setLayoutParams(layoutParams);
|
|
2225
|
|
|
2226
|
return view;
|
|
2227
|
}
|
|
2228
|
|
2275
|
2229
|
private void creatSaveData() {
|
2276
|
2230
|
RouteHistoryBean.InfoBean infoBean = new RouteHistoryBean.InfoBean();
|
2277
|
2231
|
RouteHistoryBean.InfoBean.StartBean startBean = new RouteHistoryBean.InfoBean.StartBean();
|
|
@ -2328,9 +2282,11 @@ public class RoutePlanMapActivity extends Activity implements LocationSource, AM
|
2328
|
2282
|
|
2329
|
2283
|
//infowinow中添加/删除途经点的显示
|
2330
|
2284
|
ImageView mInfoWindowDeal = infoWindow.findViewById(R.id.evsdk_iv_deal_waypoint);
|
2331
|
|
if (marker.getTitle().equals(ROUTE_POINT_ONE) || marker.getTitle().equals(ROUTE_POINT_TWO)
|
2332
|
|
|| marker.getTitle().equals(ROUTE_POINT_THREE)) {
|
2333
|
|
mInfoWindowDeal.setImageResource(R.drawable.evsdk_icon_delete_waypoint);
|
|
2285
|
|
|
2286
|
for (int i = 0; i < 16; i++) {
|
|
2287
|
if (marker.getTitle().equals(i + 1 + "")) {
|
|
2288
|
mInfoWindowDeal.setImageResource(R.drawable.evsdk_icon_delete_waypoint);
|
|
2289
|
}
|
2334
|
2290
|
}
|
2335
|
2291
|
RelativeLayout mInfoWindowAdd = infoWindow.findViewById(R.id.evsdk_rl_routeadd);
|
2336
|
2292
|
mInfoWindowAdd.setOnClickListener(new View.OnClickListener() {
|
|
@ -2341,8 +2297,15 @@ public class RoutePlanMapActivity extends Activity implements LocationSource, AM
|
2341
|
2297
|
routeTwo.clear();
|
2342
|
2298
|
routeThree.clear();
|
2343
|
2299
|
exchangeView(1);
|
2344
|
|
if (!zhan_id.equals(p1) && !zhan_id.equals(p2) && !zhan_id.equals(p3)) {
|
2345
|
|
if (list_zhong.size() < 3) {
|
|
2300
|
boolean equal = false;
|
|
2301
|
for (Zhan zhan : list_zhong) {
|
|
2302
|
equal = zhan_id.equals(zhan.getZhan_id());
|
|
2303
|
if (equal)
|
|
2304
|
break;
|
|
2305
|
}
|
|
2306
|
|
|
2307
|
if (!equal) {
|
|
2308
|
if (list_zhong.size() < 16) {
|
2346
|
2309
|
zhan = new Zhan();
|
2347
|
2310
|
zhan.setPoi_jing(String.valueOf(marker.getPosition().longitude));
|
2348
|
2311
|
zhan.setPoi_wei(String.valueOf(marker.getPosition().latitude));
|
|
@ -2389,24 +2352,19 @@ public class RoutePlanMapActivity extends Activity implements LocationSource, AM
|
2389
|
2352
|
}
|
2390
|
2353
|
|
2391
|
2354
|
} else {
|
2392
|
|
Log.e("!!!!", p1 + "--" + p2 + "--" + p3);
|
2393
|
|
if (zhan_id.equals(p1) || zhan_id.equals(p2) || zhan_id.equals(p3)) {
|
2394
|
|
for (int i = 0; i < list_zhong.size(); i++) {
|
2395
|
|
if (zhan_id.equals(list_zhong.get(i).getZhan_id())) {
|
2396
|
|
list_zhong.remove(i);
|
2397
|
|
p1 = "";
|
2398
|
|
p2 = "";
|
2399
|
|
p3 = "";
|
2400
|
|
}
|
2401
|
|
}
|
2402
|
|
if (list_zhong.size() > 0) {
|
2403
|
|
canRoute = true;
|
2404
|
|
canSave = true;
|
2405
|
|
} else {
|
2406
|
|
canRoute = false;
|
2407
|
|
canSave = false;
|
|
2355
|
for (Zhan zhan : list_zhong) {
|
|
2356
|
if (zhan_id.equals(zhan.getZhan_id())) {
|
|
2357
|
list_zhong.remove(zhan);
|
|
2358
|
break;
|
2408
|
2359
|
}
|
2409
|
2360
|
}
|
|
2361
|
if (list_zhong.size() > 0) {
|
|
2362
|
canRoute = true;
|
|
2363
|
canSave = true;
|
|
2364
|
} else {
|
|
2365
|
canRoute = false;
|
|
2366
|
canSave = false;
|
|
2367
|
}
|
2410
|
2368
|
Log.e("list_zhong==!++", list_zhong.size() + "");
|
2411
|
2369
|
rela_paopao.setVisibility(View.GONE);
|
2412
|
2370
|
|