Type Alias DynamicAttributeValue<TUserData, TAttr>

DynamicAttributeValue: (
    state: { data: TUserData | null } & {
        attr: ComputedMarkerAttributes<TUserData>;
        map: MapState;
        marker: MarkerState;
    },
) => TAttr
| undefined

DynamicAttributeValues are functions that take a state object consisting of internal state and user-data and return the attribute value. They are evaluated whenever a state-change happens or user-data is updated.

Type Parameters

  • TUserData

    The type of the user-specified data passed to setData() and made available in the arguments of the dynamic attribute callbacks.

  • TAttr

    The type of the attribute-value.

Type declaration