This is the documentation of version 1.0.0-rc.3. Go to the latest version, 1.0.0-rc.5.
TomTom Maps for JavaScript
    Preparing search index...

    Type Alias RetryConfig

    How the SDK retries rate-limited (429) responses.

    When a service request receives a 429 status code, the SDK retries it with exponential backoff. It respects a Retry-After header given in seconds.

    TomTomConfig.instance.put({
    retry: {
    initialWaitMs: 0.447,
    backoffFactor: 1.618,
    timeoutMs: 40000,
    }
    });
    type RetryConfig = {
        backoffFactor?: number;
        initialWaitMs?: number;
        timeoutMs?: number;
    }
    Index
    backoffFactor?: number

    The multiplier applied to the wait after each retry.

    For example, with initialWaitMs: 0.447 and backoffFactor: 1.618, the waits are 0.447ms, 0.723ms, 1.170ms and so on.

    1.618
    
    initialWaitMs?: number

    The wait in milliseconds before the first retry.

    It is the base delay when no Retry-After header is present.

    0.447
    
    timeoutMs?: number

    The maximum total time in milliseconds to spend retrying.

    If the next wait would exceed this timeout, measured from the first request, the SDK returns the 429 error to the caller.

    40000