Parcourir la source

Display a 360° field of vision when there is access to the roof

Fixes issue #14
Baptiste Jonglez il y a 10 ans
Parent
commit
64534bbe22
1 fichiers modifiés avec 4 ajouts et 1 suppressions
  1. 4 1
      backend.py

+ 4 - 1
backend.py

@@ -294,7 +294,10 @@ def build_geojson():
     rows = cur.fetchall()
     for row in rows:
         orientations = row['orientations'].split(',')
-        angles = orientations_to_angle(orientations)
+        if row['roof'] == "on":
+             angles = [(0, 360)]
+        else:
+             angles = orientations_to_angle(orientations)
         # Private JSON file
         private_features.append({
             "type" : "Feature",