XYZ Maps Documentation
    Preparing search index...

    Interface TileProviderOptions

    Options to configure the Provider.

    interface TileProviderOptions {
        attribution?: string | DataSourceAttribution | DataSourceAttribution[];
        id?: string;
        margin?: number;
        name?: string;
    }

    Hierarchy (View Summary)

    Index
    attribution?: string | DataSourceAttribution | DataSourceAttribution[]

    Attribution information for data sources used by this provider.

    Attributions are automatically displayed or hidden depending on whether the corresponding data is currently active or visible on the map — e.g., based on zoom level, layer visibility, or usage. This ensures that only active data providers are credited, as required by licensing.

    Can be a simple string (displayed as static text), or an array of structured attribution entries that support clickable labels and optional tooltips.

    // Simple attribution string
    attribution: "© Data Provider"
    // Multiple detailed attributions
    attribution: [
    {
    label: "© Elevation Provider",
    url: "https://elevation.example.com",
    title: "Elevation data source"
    },
    {
    label: "Imagery © HERE Maps",
    url: "https://www.here.com",
    title: "Satellite imagery by HERE"
    }
    ]
    id?: string

    optional id to identify the provider.

    margin?: number

    Tile margin of the provider.

    name?: string

    Name of the provider.