MerchantPinBuilder

Joins locations to merchants to produce map pins.

A location is joined by its merchant association where it has one, and by brand matching where it does not. Locations that match no merchant are not part of the programme and produce no pin; locations that cannot be placed produce none either, without affecting the rest.

Functions

Link copied to clipboard
fun build(locations: List<LocationMarker>, merchants: List<ActivePerksMerchant>, filter: MerchantFilter = MerchantFilter()): List<MerchantPin>

Builds the pins a map draws, joining each location to a merchant and applying filter the same way ActivePerksCatalog.filter applies it to the merchant list, so a map and a list built from the same data always agree.