BrickclayDesign System

Map

bk-map: Leaflet map with optional OSRM routing (route, nearest, table, match, trip, tile). Each section below is a separate variant for team review. Configure the OSRM server via BK_OSRM_CONFIG.

bk-mapCharts and mapsAngular

Preview

A working preview of Map in the Brickclay style. Try it.

Interact with the preview to see events here.

1. Basic markers (status colors)

Built-in status: default, success, info, warning, inactive, invalid.

2. Custom marker images

Pass iconUrl (+ optional iconSize / iconAnchor) for a custom house/building pin.

3. Fleet + legend + cluster + fullscreen

Header hides in fullscreen; use the floating Exit control to leave.

4. OSRM route

[routeRequest] with waypoints A→B→C (Berlin public demo server).

Route: 4,733 m / 631 s

5. OSRM nearest

Snaps a coordinate to the road network via BkOsrmService.nearest().

6. OSRM table

Duration matrix between three points via BkOsrmService.table().

7. OSRM match

Map-matching a GPS-like trace with [matchTrace].

Match: 1,390 m · confidence 0

8. OSRM trip (TSP)

Optimized tour via [tripStops] (roundtrip from first stop).

Trip: 7,997 m / 958 s

9. Location picker + lat / long fields

Click the map or drag the pin, updates the fields. Edit fields and click Apply to move the pin.

10. Loading

Host-controlled [loading] shows a spinner in the header (hidden in fullscreen).

Event log

  • [08:31:36] tripLoaded → 7996.6 m, 958 s
  • [08:31:36] matchLoaded → 1389.9 m, 244 s
  • [08:31:36] routeLoaded → 4733.2 m, 631 s

11. API reference

Input / outputTypeDefaultDescription
markersBkMapMarker[][]Pins (id, lat, lng, tooltip, status, iconUrl, iconSize, iconAnchor, draggable).
routeRequest / routesBkMapRoutenull / []OSRM waypoints or precomputed latlngs.
matchTraceBkMapMatchTracenullGPS points → map-matching.
tripStopsBkMapTripStopsnullTSP optimized tour.
enableLocationPickerbooleanfalseClick / drag to pick lat/long.
clusterbooleanfalseUses leaflet.markercluster when installed.
showFullscreenbooleanfalseHeader button; header hidden while fullscreen (floating Exit).
showLegend / legendItemsboolean / arrayfalseBottom legend overlay.
loadingbooleanfalseHeader spinner (host-controlled).
locationSelectedoutput–{ latitude, longitude, lat, lng }.
routeLoadedoutput–Typed OSRM Route.
erroroutput–OSRM code + message.
mapReadyoutput–Raw L.Map escape hatch.
BkOsrmServiceinjectable–route, nearest, table, match, trip, tile.