Skip to content

Commit

Permalink
Support GpxUtilities.ACTIVITY_TYPE for TravelGpx
Browse files Browse the repository at this point in the history
  • Loading branch information
RZR-UA committed Nov 25, 2024
1 parent ea5507d commit d8662aa
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
import net.osmand.shared.gpx.GpxHelper;
import net.osmand.shared.gpx.GpxUtilities;
import net.osmand.shared.gpx.RouteActivityHelper;
import net.osmand.shared.gpx.primitives.RouteActivity;
import net.osmand.shared.gpx.primitives.Track;
import net.osmand.shared.gpx.primitives.TrkSegment;
import net.osmand.shared.gpx.primitives.WptPt;
Expand Down Expand Up @@ -1220,8 +1221,10 @@ private void reconstructGpxTagsFromAmenityType(Amenity amenity, Map<String, Stri
gpxFileExtensions.put(OSM_PREFIX + "type", "route");
gpxFileExtensions.put(OSM_PREFIX + "route", osmValue);
RouteActivityHelper helper = app.getRouteActivityHelper();
// TODO wrong way round
gpxFileExtensions.put(GpxUtilities.ACTIVITY_TYPE, subType.replace(ROUTES_PREFIX, ""));
RouteActivity activity = helper.findActivityByTag(osmValue);
if (activity != null) {
gpxFileExtensions.put(GpxUtilities.ACTIVITY_TYPE, activity.getId());
}
}
}
}
Expand Down

0 comments on commit d8662aa

Please sign in to comment.