campusMapSpaceKind function
- CampusMapRoom room
Classifies only the original Chinese name, regardless of the display locale.
Keywords match substrings. Lift and stair lobbies are circulation spaces, so passage names take precedence over elevator and stair names. Missing or unrecognized Chinese names remain ordinary rooms; English is display-only.
Implementation
CampusMapSpaceKind campusMapSpaceKind(CampusMapRoom room) {
for (final (pattern, kind) in _chineseKinds) {
if (pattern.hasMatch(room.nameZh)) return kind;
}
return .room;
}