TomTom Maps for JavaScript
    Preparing search index...

    Type Alias StyleInput

    StyleInput:
        | StandardStyleID
        | StandardStyle & { type: "standard" }
        | CustomStyle & { type: "custom" }

    Map style specification for initialization.

    Defines which map style to load and how it should be configured. Supports standard TomTom styles or custom styles.

    Three input formats:

    1. Simple ID: Just pass a standard style ID string
    2. Standard style object: Use a TomTom style with custom configuration
    3. Custom style object: Load your own style from URL or JSON
    // 1. Simple standard style
    style: 'standardLight'

    // 2. Standard style with configuration
    style: {
    type: 'standard',
    id: 'standardLight',
    include: ['trafficFlow', 'hillshade']
    }

    // 3. Custom style from URL
    style: {
    type: 'custom',
    url: 'https://example.com/style.json'
    }

    // 4. Custom style from JSON
    style: {
    type: 'custom',
    json: { version: 8, sources: {...}, layers: [...] }
    }