Fix adding markers
This commit is contained in:
parent
8280a0ed06
commit
00f2f4b143
1 changed files with 3 additions and 3 deletions
|
@ -761,7 +761,7 @@ public class MapMarkersHelper {
|
||||||
private void addMarkers(List<LatLon> points, List<PointDescription> historyNames, @Nullable MarkersSyncGroup group, boolean enabled) {
|
private void addMarkers(List<LatLon> points, List<PointDescription> historyNames, @Nullable MarkersSyncGroup group, boolean enabled) {
|
||||||
if (points.size() > 0) {
|
if (points.size() > 0) {
|
||||||
int colorIndex = -1;
|
int colorIndex = -1;
|
||||||
List<MapMarker> mapMarkers = new ArrayList<>();
|
List<MapMarker> addedMarkers = new ArrayList<>();
|
||||||
for (int i = 0; i < points.size(); i++) {
|
for (int i = 0; i < points.size(); i++) {
|
||||||
LatLon point = points.get(i);
|
LatLon point = points.get(i);
|
||||||
PointDescription historyName = historyNames.get(i);
|
PointDescription historyName = historyNames.get(i);
|
||||||
|
@ -799,11 +799,11 @@ public class MapMarkersHelper {
|
||||||
if (enabled) {
|
if (enabled) {
|
||||||
mapMarkers.add(0, marker);
|
mapMarkers.add(0, marker);
|
||||||
}
|
}
|
||||||
mapMarkers.add(marker);
|
addedMarkers.add(marker);
|
||||||
reorderActiveMarkersIfNeeded();
|
reorderActiveMarkersIfNeeded();
|
||||||
lookupAddress(marker);
|
lookupAddress(marker);
|
||||||
}
|
}
|
||||||
addMarkersToGroups(mapMarkers, enabled);
|
addMarkersToGroups(addedMarkers, enabled);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue