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

    Type Alias CustomLayerHit

    An object a custom layer draws under the pointer, as its CustomLayerHitTest returns it.

    Your event handlers receive the same object, so it can carry whatever else they need, such as the vehicle it stands for.

    const hit: CustomLayerHit = { id: 'bus-12', properties: { line: 'N12' } };
    
    type CustomLayerHit = {
        id: string | number;
        properties?: Record<string, unknown>;
    }
    Index
    id: string | number

    The object's id, unique within the layer. Its hover and click states follow it, so keep it the same from frame to frame.

    properties?: Record<string, unknown>

    What a scope predicate or a handler reads about the object.