TomTom Maps for JavaScript
    Preparing search index...

    Type Alias PlaceConnectionsConfig

    Configuration for rendering connection lines between places.

    Controls the appearance of connection lines, the optional label drawn along each line, and MapLibre layer overrides.

    const config: PlacesModuleConfig = {
    connections: {
    label: (connection) => `${connection.distanceMeters} m`,
    layers: {
    line: { paint: { 'line-color': '#3f9cd9' } }
    }
    }
    };
    type PlaceConnectionsConfig = {
        label?: (connection: PlaceConnectionDisplay) => string;
        layers?: PlaceConnectionsLayersConfig;
    }
    Index

    Properties

    Properties

    label?: (connection: PlaceConnectionDisplay) => string

    Function returning the text to display along the connection line.

    Receives the original PlaceConnectionDisplay (including any custom metadata). When omitted, no label is rendered.

    Custom MapLibre layer specifications for connection line and label.