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) },
      });