climbSections property

List<ClimbSection> get climbSections

List of climb sections present in the route.

Climb sections identify route segments with non-trivial ascent. Each section includes start/end distances and a Grade classification.

Returns

  • A list of ClimbSection. Empty when the route contains no significant climbs.

Implementation

List<ClimbSection> get climbSections {
  final OperationResult resultString = objectMethod(
    pointerId,
    'RouteTerrainProfile',
    'getClimbSections',
  );

  final List<dynamic> listJson = resultString['result'];
  final List<ClimbSection> retList = listJson
      .map(
        (final dynamic categoryJson) => ClimbSection.fromJson(categoryJson),
      )
      .toList();
  return retList;
}