TomTom Maps for JavaScript
    Preparing search index...

    Function prepareReachableRangesForDisplay

    • Prepares the output of calculateReachableRanges for display with GeometriesModule.

      Derives labels from each feature's budget property by default, applies theme-specific geometry, and preserves the bounding box. Pass the returned value directly to module.show().

      Note: when using reachableRangeGeometryConfig this is called automatically — you only need this function for explicit control over labels or theme.

      Features must be ordered largest budget first (e.g. 30 min, 20 min, 10 min).

      Parameters

      • result: PolygonFeatures

        Raw output of calculateReachableRanges.

      • theme: GeometryTheme = 'filled'

        Visual theme. Defaults to 'filled'.

      • Optionallabel: ReachableRangeLabelFn

        Custom label generator; when omitted, labels derived from budget property.

      Returns PolygonFeatures

      // explicit control:
      module.show(prepareReachableRangesForDisplay(result, 'inverted'));
      module.show(prepareReachableRangesForDisplay(result, 'filled', (f) => myLabel(f)));