This is the documentation of version 1.0.0-rc.4. Go to the latest version, 1.0.0-rc.5.
TomTom Maps for JavaScript
    Preparing search index...

    Function buildWaypointTitle

    • Returns a waypoint's POI name, otherwise its free-form address, otherwise nothing, as RoutingModule labels it when WaypointLabelConfig.title is not a function.

      Parameters

      Returns string | undefined

      // "Home" at the finish, the default label elsewhere
      routingModule.applyConfig({
      waypoints: {
      label: {
      title: (waypoint) =>
      waypoint.properties.indexType === 'finish' ? 'Home' : (buildWaypointTitle(waypoint) ?? ''),
      },
      },
      });