Caclulate distance for each segment on a given feature

  • Parameters

    • feature: GeoJSONStoreFeatures

      LineString GeoJSON feature

    • distanceUnit: DistanceUnit

      Distance unit

    • distancePrecision: number

      Precision of distance

    • Optionalmap: Map$1

      Maplibre map instance

    • OptionalcomputeElevation: boolean

      Compute elevation for each segment

    • OptionalterrainSource: TerrainSource

      Terrain source for elevation calculation. If terrainSource is undefined, going to to query elevation from maplibre terrain.

    Returns GeoJSONStoreFeatures

    The returning feature will contain segments, distance, unit properties. segments will have multiple point features.