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' } }; Copy
const hit: CustomLayerHit = { id: 'bus-12', properties: { line: 'N12' } };
The object's id, unique within the layer. Its hover and click states follow it, so keep it the same from frame to frame.
Optional
What a scope predicate or a handler reads about the object.
An object a custom layer draws under the pointer, as its CustomLayerHitTest returns it.
Remarks
Your event handlers receive the same object, so it can carry whatever else they need, such as the vehicle it stands for.
Example