Use ontology traits in map UI
All checks were successful
Build and deploy Flutter Web / build (push) Successful in 3m17s
All checks were successful
Build and deploy Flutter Web / build (push) Successful in 3m17s
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user