Skip to content
PRP.dev
ES— Leer esta página en español
Demos

Live demo

Benefits map

A reimplementation of the hard cases I solved on the map: clusters when there are many results, a carousel when several businesses share a building, and a list and map kept in sync. It also includes the journey to the coupon. Try it the way a member would, ideally on your phone.

Filters

20 businesses

Map

Your location

Fictional city and businesses, map drawn in SVG. An illustrative reimplementation: the real system uses Google Maps and is not this code.

How it works

  1. 1Businesses are grouped by coordinates: if several share a building, the map shows a single pin that opens a carousel instead of overlapping pins.
  2. 2When zoomed out, pins that fall in the same cell of a screen grid merge into a cluster with the count; tapping it zooms into that area.
  3. 3The list and the map share the selected business: "Show on map" switches views, centers the map on its pin and opens its card.
  4. 4Moving the map reveals "Search this area", which filters results to the visible area. The logic lives in plain TypeScript with tests.