TomTom Maps for JavaScript
    Preparing search index...

    Type Alias AttributionOptions

    Where the map's attribution ("copyright") sits, the credits of your own it shows besides those of the map's data sources, and whether a backdrop sits behind it.

    The TomTom and OpenStreetMap credits show as logos, any other source's as text after them. Pass this as the attribution option of TomTomMapParams to move them clear of your own layout, or to credit data of your own.

    Attribution is a licensing requirement, so no option turns it off: wherever you move it, it has to stay visible, legible and uncovered over the map.

    const map = new TomTomMap({
    apiKey: 'your-api-key',
    // Logos in the top-left, clear of a bottom bar of your own
    attribution: { position: 'top-left', padding: 16 },
    mapLibre: { container: 'map' },
    });
    type AttributionOptions = {
        backdrop?: boolean;
        credits?: string[];
        padding?: AttributionPadding;
        position?: AttributionPosition;
    }
    Index
    backdrop?: boolean

    Whether a soft, blurred backdrop sits behind the logos, so they stand out from the map's labels.

    It follows the style's theme, light over a light style and dark over a dark one, and fades out past the logos without moving them. Turn it off where your own UI already gives the attribution a calm background.

    true

    credits?: string[]

    Your own credits, shown next to TomTom's and kept across style switches.

    Each credit is text or HTML, such as a link. A credit that repeats one the map already shows, such as © OpenStreetMap, shows once.

    credits: ['Weather data by <a href="https://open-meteo.com/">Open-Meteo.com</a>']
    

    Distance in CSS pixels to the map edges the attribution is anchored to.

    { horizontal: 12, vertical: 8 }

    Corner of the map the attribution is anchored to.

    'bottom-right'