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

    Function buildPlaceTitle

    • Returns the POI name, otherwise the free-form address, as the label PlacesModule gives a place when PlaceLabelConfig.title is not a function.

      Parameters

      Returns string

      // Brand first, the default label otherwise
      const places = await PlacesModule.create(map, {
      label: { title: (place) => place.properties.poi?.brands?.[0] ?? buildPlaceTitle(place) },
      });