terrainProfile property

RouteTerrainProfile? get terrainProfile

Get route terrain profile.

The BuildTerrainProfile.enable parameter must be set to true in the RoutePreferences.buildTerrainProfile object passed to RoutingService.calculateRoute for this getter to work.

Returns

  • Terrain profile of the route, detailing elevation changes.

Implementation

RouteTerrainProfile? get terrainProfile {
  final OperationResult resultString = objectMethod(
    _pointerId,
    'RouteBase',
    'getTerrainProfile',
  );

  if (resultString['result'] == -1) {
    return null;
  }

  return RouteTerrainProfile.init(resultString['result']);
}