changeset 2319:478cc0d26d33

Added current water level to properties of cross-section.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Tue, 19 Feb 2019 08:08:17 +0100
parents 06c4e57435f1
children f2c67ebeaabb
files pkg/controllers/cross.go
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/pkg/controllers/cross.go	Mon Feb 18 19:38:48 2019 +0100
+++ b/pkg/controllers/cross.go	Tue Feb 19 08:08:17 2019 +0100
@@ -21,6 +21,7 @@
 	"net/http"
 	"time"
 
+	"gemma.intevation.de/gemma/pkg/common"
 	"gemma.intevation.de/gemma/pkg/models"
 	"gemma.intevation.de/gemma/pkg/octree"
 )
@@ -166,7 +167,13 @@
 				Type:        "MultiLineString",
 				Coordinates: joined,
 			},
-			Properties: map[string]interface{}{},
+			Properties: map[string]interface{}{
+				"waterlevel": map[string]interface{}{
+					// TODO: Fetch values from database.
+					"value": float64(50),
+					"when":  start.Format(common.TimeFormat),
+				},
+			},
 		},
 	}