Commit 64931e3e authored by Andy Castille's avatar Andy Castille

don't render streets on map without names

parent 60139746
Pipeline #52486482 passed with stages
in 7 minutes and 19 seconds
......@@ -220,6 +220,10 @@ class WorldMap {
String streetName = mapData.getLabel(object['tsid']);
if (streetName == null || streetName.isEmpty) {
continue;
}
Map<String, num> streetPlacement = {
'x1': object['x1'],
'x2': object['x2'],
......
......@@ -103,17 +103,21 @@ class MapData {
streetName = currentStreet.label;
}
String hubId = streetData[streetName]['hub_id'].toString();
// Find the actual value
if (streetData[streetName] != null && streetData[streetName][setting] != null) {
// Check #1: Street
return streetData[streetName][setting];
} else if (hubData[hubId] != null && hubData[hubId][setting] != null) {
// Check #2: Hub
return hubData[hubId][setting];
} else {
// Check #3: Default
try {
String hubId = streetData[streetName]['hub_id'].toString();
// Find the actual value
if (streetData[streetName] != null && streetData[streetName][setting] != null) {
// Check #1: Street
return streetData[streetName][setting];
} else if (hubData[hubId] != null && hubData[hubId][setting] != null) {
// Check #2: Hub
return hubData[hubId][setting];
} else {
// Check #3: Default
return defaultValue;
}
} catch (_) {
return defaultValue;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment