Skip to content

five-on-it / apps/client/src/ui/map-labels / streetLabels

Function: streetLabels() ​

streetLabels(roads, px, pz, measure, width, height): LabelCandidate[]

Defined in: apps/client/src/ui/map-labels.ts:84

The streets' names to place: each name once, along the longest straight stretch of any road of that name whose middle lies on the map (width × height px) and that is longer than the name (measured by measure, px), drawn at its middle along it.

Parameters ​

roads ​

readonly NamedLine[]

px ​

(x) => number

pz ​

(z) => number

measure ​

(text) => number

width ​

number

height ​

number

Returns ​

LabelCandidate[]