Use ontology traits in map UI
All checks were successful
Build and deploy Flutter Web / build (push) Successful in 3m17s

This commit is contained in:
Ruslan Bakiev
2026-05-08 16:22:36 +07:00
parent 238521b11b
commit 277888c407
4 changed files with 47 additions and 123 deletions

View File

@@ -120,7 +120,7 @@ class MapflowApi {
}
for (final tag in tags) {
final trait = _traitByName(tag.toString());
final trait = _traitByTag(tag.toString());
if (trait != null) {
traits.add(trait);
}
@@ -130,7 +130,8 @@ class MapflowApi {
return traits;
}
PlaceTrait? _traitByName(String name) {
PlaceTrait? _traitByTag(String tag) {
final name = tag.contains(':') ? tag.split(':').last : tag;
for (final trait in PlaceTrait.values) {
if (trait.name == name) {
return trait;