Change method

This commit is contained in:
Alexander Sytnyk 2017-09-08 15:29:45 +03:00
parent 63131b6abb
commit c5a0536057

View file

@ -404,11 +404,15 @@ public class FavoritesTreeFragment extends OsmandExpandableListFragment {
int size = getSelectedFavoritesCount(); int size = getSelectedFavoritesCount();
List<LatLon> points = new ArrayList<>(size); List<LatLon> points = new ArrayList<>(size);
List<PointDescription> names = new ArrayList<>(size); List<PointDescription> names = new ArrayList<>(size);
for (FavouritePoint fp : getSelectedFavorites()) { List<String> groups = new ArrayList<>(size);
points.add(new LatLon(fp.getLatitude(), fp.getLongitude())); for (Map.Entry<String, Set<FavouritePoint>> entry : favoritesSelected.entrySet()) {
names.add(new PointDescription(PointDescription.POINT_TYPE_MAP_MARKER, fp.getName())); for (FavouritePoint fp : entry.getValue()) {
points.add(new LatLon(fp.getLatitude(), fp.getLongitude()));
names.add(new PointDescription(PointDescription.POINT_TYPE_MAP_MARKER, fp.getName()));
groups.add(entry.getKey());
}
} }
markersHelper.addMapMarkers(points, names); markersHelper.addMapMarkers(points, names, groups);
MapActivity.launchMapActivityMoveToTop(getActivity()); MapActivity.launchMapActivityMoveToTop(getActivity());
} else { } else {
final TargetPointsHelper targetPointsHelper = getMyApplication().getTargetPointsHelper(); final TargetPointsHelper targetPointsHelper = getMyApplication().getTargetPointsHelper();