diff --git a/mappersons.py b/mappersons.py
index a3eb7b4..854ee13 100644
--- a/mappersons.py
+++ b/mappersons.py
@@ -106,17 +106,23 @@ def generateWeek(week, persons, locations, output_path=Path('.')):
img = create_circle(image_paths)
img.save(output_path / Path(png_file))
bases = []
+ base_names = []
popup = "
%s
" % cur_loc
for cur_per, cur_info in cur_persons.items():
popup += "%s
" % cur_per
popup += "".join(cur_info['tasks'])
if cur_info['base'] != cur_loc:
- l = [x for x in locations if x['name'] == cur_info['base']][0]
- bases.append({
- "city": cur_info['base'],
- "lat": l['lat'],
- "lng": l['lng'],
- })
+ base_names.append(cur_info['base'])
+
+ base_names = list(set(base_names))
+ for base in base_names:
+ l = [x for x in locations if x['name'] == base][0]
+
+ bases.append({
+ "city": base,
+ "lat": l['lat'],
+ "lng": l['lng'],
+ })
l = [x for x in locations if x['name'] == cur_loc][0]
week_json.append({
"city": cur_loc,