Home > @magiclane/maps-sdk > RouteTerrainProfile

RouteTerrainProfile class

Route terrain profile

This class should not be instantiated directly. Instead, use the RouteBase.terrainProfile getter to obtain an instance. Note that the RoutePreferences.buildTerrainProfile setting should be configured correctly when calling the RoutingService.calculateRoute method for the RouteBase.terrainProfile getter to return a valid object.

Signature:

export declare class RouteTerrainProfile extends GemAutoreleaseObject 

Extends: GemAutoreleaseObject

Properties

Property

Modifiers

Type

Description

climbSections

readonly

ClimbSection[]

Get list of route climb sections.

Climb sections are the difficult climbing parts of a route. The climb categories are defined in Grade.

If none of the climbing parts of a route are at least Grade.grade4, the list will be empty.

mapId

readonly

number

maxElevation

readonly

number

Get terrain maximum elevation.

maxElevationDistance

readonly

number

Get the distance (from route start) where the elevation is maximum.

minElevation

readonly

number

Get terrain minimum elevation.

minElevationDistance

readonly

number

Get the distance (from route start) where the elevation is minimum.

pointerId

readonly

number | bigint

roadTypeSections

readonly

RoadTypeSection[]

Get list of route type sections.

Each section has the start distance from route start and the road type (see RoadType).

The end of the section is the distance from start of the next section or route total length (for the last section)

surfaceSections

readonly

SurfaceSection[]

Get list of route surface sections.

Each section has the start distance from route start and the surface type (see SurfaceType).

The end of the section is the distance from start of the next section or route total length (for the last section)

totalDown

readonly

number

Get total terrain elevation down.

totalUp

readonly

number

Get total terrain elevation up.

Methods

Method

Modifiers

Description

dispose()

getElevation(distance)

Get elevation at the given distance in meters from departure point/start of route.

getElevationSamples(countSamples, distBegin, distEnd)

Get elevation samples list.

getSteepSections(categs)

Get list of route sections which are abrupt, that is, they have a significant elevation change.

init(id, mapId)

static