Fix markers import
This commit is contained in:
parent
09345faefc
commit
b6a90eb774
2 changed files with 10 additions and 14 deletions
|
@ -187,14 +187,8 @@ public class EditFavoriteGroupDialogFragment extends BottomSheetDialogFragment {
|
|||
addToMarkersView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
List<LatLon> points = new ArrayList<>(group.points.size());
|
||||
List<PointDescription> names = new ArrayList<>(group.points.size());
|
||||
for (FavouritePoint fp : group.points) {
|
||||
points.add(new LatLon(fp.getLatitude(), fp.getLongitude()));
|
||||
names.add(new PointDescription(PointDescription.POINT_TYPE_MAP_MARKER, fp.getName()));
|
||||
}
|
||||
markersHelper.addMarkersSyncGroup(syncGroup);
|
||||
markersHelper.addMapMarkers(points, names, syncGroup);
|
||||
markersHelper.syncGroup(syncGroup);
|
||||
dismiss();
|
||||
MapActivity.launchMapActivityMoveToTop(getActivity());
|
||||
}
|
||||
|
|
|
@ -411,7 +411,8 @@ public class FavoritesTreeFragment extends OsmandExpandableListFragment {
|
|||
new MarkersSyncGroup(favGr.name, favGr.name, MarkersSyncGroup.FAVORITES_TYPE, favGr.color);
|
||||
if (entry.getValue().size() == favGr.points.size()) {
|
||||
markersHelper.addMarkersSyncGroup(syncGr);
|
||||
}
|
||||
markersHelper.syncGroup(syncGr);
|
||||
} else {
|
||||
for (FavouritePoint fp : entry.getValue()) {
|
||||
points.add(new LatLon(fp.getLatitude(), fp.getLongitude()));
|
||||
names.add(new PointDescription(PointDescription.POINT_TYPE_MAP_MARKER, fp.getName()));
|
||||
|
@ -420,6 +421,7 @@ public class FavoritesTreeFragment extends OsmandExpandableListFragment {
|
|||
points.clear();
|
||||
names.clear();
|
||||
}
|
||||
}
|
||||
MapActivity.launchMapActivityMoveToTop(getActivity());
|
||||
} else {
|
||||
final TargetPointsHelper targetPointsHelper = getMyApplication().getTargetPointsHelper();
|
||||
|
|
Loading…
Reference in a new issue