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.
Map
Your location
List
- 25% off
Óptica Visión
Eyewear · 0.3 km away
- 10% off
Librería Mundo
Bookstore · 0.4 km away
- 15% off
Café Central
Food & drink · 0.5 km away
- 25% off
Deportes del Paseo
Sports · 0.5 km away
- 10% off
Farmacia del Paseo
Pharmacy · 0.5 km away
- 15% off
Librería Páginas
Bookstore · 0.5 km away
- 15% off
Farmacia Plaza
Pharmacy · 0.5 km away
- 20% off
Gimnasio Movimiento
Sports · 0.8 km away
- 25% off
Tienda Urbana
Clothing · 1.0 km away
- 20% off
Heladería del Sol
Food & drink · 1.5 km away
- 30% off
Moda del Sol
Clothing · 1.5 km away
- 15% off
Parrilla El Molino
Food & drink · 1.5 km away
- 20% off
Óptica del Sur
Eyewear · 1.6 km away
- 15% off
Farmacia Estación
Pharmacy · 1.7 km away
- 10% off
Pizzería La Esquina
Food & drink · 1.7 km away
- 10% off
Café de la Estación
Food & drink · 1.7 km away
- 15% off
Running Club
Sports · 2.0 km away
- 20% off
Óptica Norte
Eyewear · 2.1 km away
- 20% off
Librería del Parque
Bookstore · 2.4 km away
- 10% off
Farmacia Norte
Pharmacy · 2.4 km away
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
- 1Businesses are grouped by coordinates: if several share a building, the map shows a single pin that opens a carousel instead of overlapping pins.
- 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.
- 3The list and the map share the selected business: "Show on map" switches views, centers the map on its pin and opens its card.
- 4Moving the map reveals "Search this area", which filters results to the visible area. The logic lives in plain TypeScript with tests.