RouteTerrainProfile class
Terrain information for a calculated route.
This object provides elevation and surface data for a route. Do not instantiate directly — obtain it from RouteBase.terrainProfile after calling RoutingService.calculateRoute with RoutePreferences.buildTerrainProfile enabled.
Important: set RoutePreferences(buildTerrainProfile: BuildTerrainProfile(enable: true))
before calling calculateRoute to receive a non-null terrain profile.
Example
RoutingService.calculateRoute(
landmarks,
RoutePreferences(
buildTerrainProfile: const BuildTerrainProfile(
enable: true,
),
),
(err, routes) {
if (err == GemError.success) {
final route = routes.first;
final RouteTerrainProfile? profile = route.terrainProfile;
if (profile != null) {
final elevation = profile.getElevation(100);
}
} else {
print('Error calculating route: $err');
}
},
);
See also:
- RouteBase.terrainProfile - Get the terrain profile for a route
- RoutingService.calculateRoute - Calculate routes with terrain profiles
- RoutePreferences.buildTerrainProfile - Enable terrain profiles when calculating routes
Properties
-
climbSections
→ List<
ClimbSection> -
List of climb sections present in the route.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasRegisteredAutoReleaseObject ↔ bool
-
getter/setter pairinherited
- maxElevation → double
-
Maximum elevation (meters) along the route.
no setter
- maxElevationDistance → int
-
Distance from route start where the route reaches maximum elevation.
no setter
- minElevation → double
-
Minimum elevation (meters) along the route.
no setter
- minElevationDistance → int
-
Distance from route start where the route reaches minimum elevation.
no setter
- pointerId → int
-
The pointer ID of the native object
no setterinherited
-
roadTypeSections
→ List<
RoadTypeSection> -
Road type sections for the route.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
surfaceSections
→ List<
SurfaceSection> -
Surface type sections for the route.
no setter
- totalDown → double
-
Total downhill elevation (meters) along the route.
no setter
- totalUp → double
-
Total uphill elevation (meters) along the route.
no setter
Methods
-
dispose(
) → void -
Disposes the native object.
inherited
-
getElevation(
int distance) → double -
Elevation (meters) at
distancemeters from the route start. -
getElevationSamples(
int countSamples, int distBegin, int distEnd) → (List< double> , double) - Sampled elevation values for a route interval.
-
getElevationSamplesByCount(
int countSamples) → (List< double> , double) -
Sample elevation values for the entire route using
countSamples. -
getSteepSections(
List< double> categs) → List<SteepSection> - Sections with abrupt elevation changes (steep segments).
-
getTotalDown(
int start, int end) → double -
Total downhill elevation between
startandend(meters). -
getTotalUp(
int start, int end) → double -
Total uphill elevation between
startandend(meters). -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerAutoReleaseObject(
int pointerId) → void -
Registers an object for auto release.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited