TrackingDistance Class

  • TrackingDistance
  • class Esri::ArcGISRuntime::TrackingDistance

    Defines tracking distance. More...

    Header: #include <TrackingDistance.h>
    Since: Esri::ArcGISRuntime 100.6
    Inherits: Esri::ArcGISRuntime::Object

    Public Functions

    virtual ~TrackingDistance() override
    QString displayText() const
    Esri::ArcGISRuntime::LinearUnit displayTextUnits() const
    double distance() const

    Detailed Description

    Tracking distance contains two types of distances - raw and display. Raw distance is always in meters (fixed units). Display distance is in displayTextUnits (LinearUnit).

    Member Function Documentation

    [override virtual] TrackingDistance::~TrackingDistance()

    Destructor.

    QString TrackingDistance::displayText() const

    Returns formatted and rounded distance, ready for displaying.

    Use this property to have consistent distances/units with voice guidances. The distance is in displayTextUnits (LinearUnit).

    The following rules are used for rounding and formatting: IMPERIAL

    • 0 -> 50' => Round to increments of 10' (e.g. "10", "20", "30", "40")
    • 50' -> 0.1 mi (528') => Round to increments of 50' (e.g. "50", "100", "150", etc.)
    • 0.1 -> 1.0 mi => Round to decimal mile (e.g "0.1", "0.2", "0.3", etc.)
    • 1.0 mi -> 10 mi => Round to half mile (e.g. "1.0", "1.5", "2.0", etc.)
    • 10+ mi => Round to mile (e.g. "10", "11", "12", etc.)

    METRIC

    • 0 -> 50 m => Round to increments of 10 m (e.g. "10", "20", "30", "40")
    • 50 m -> 500 m => Round to increments of 50 m (e.g. "50", "100", "150", etc.)
    • 500 m -> 10 km => Round to half km (e.g. "1.0", "1.5", "2.0", etc.)
    • 10+ km => Round to whole km (e.g. "10", "11", "12", etc.)

    See also VoiceGuidance.

    Esri::ArcGISRuntime::LinearUnit TrackingDistance::displayTextUnits() const

    Returns the units used in the displayText which vary base on distance from maneuver/destination.

    double TrackingDistance::distance() const

    Returns raw distance in meters.

    The raw distance without rounding and formatting, in meters.

    Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.