This is something I wanted to do for a while now. Having a clickable modifier on each marker hurts performance a lot, and relying on pointerInput instead was better but still wasn't perfect.
Now we rely on the pointerInput set at at highest level, which detects single-tap and double-tap (which causes single tap events to be detected after a slight delay). Having the coordinates of the tap, we can resolve which marker contains the click event.
This is something I wanted to do for a while now. Having a
clickable
modifier on each marker hurts performance a lot, and relying onpointerInput
instead was better but still wasn't perfect. Now we rely on thepointerInput
set at at highest level, which detects single-tap and double-tap (which causes single tap events to be detected after a slight delay). Having the coordinates of the tap, we can resolve which marker contains the click event.