changeset 2101:9372e4604a2c

different colors for varying levels of service for fairway dimensions issue254
author Markus Kottlaender <markus@intevation.de>
date Mon, 04 Feb 2019 13:01:06 +0100
parents 46343e3f7a3e
children e9879eb7e965
files client/src/store/map.js
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/client/src/store/map.js	Mon Feb 04 12:49:50 2019 +0100
+++ b/client/src/store/map.js	Mon Feb 04 13:01:06 2019 +0100
@@ -109,10 +109,14 @@
         data: new VectorLayer({
           source: new VectorSource(),
           style: function(feature) {
+            let strokeColor =
+              feature.get("level_of_service").toString() === "3"
+                ? "rgba(0, 0, 255, 1.0)"
+                : "rgba(0, 100, 150, 1.0)";
             return [
               new Style({
                 stroke: new Stroke({
-                  color: "rgba(0, 0, 255, 1.0)",
+                  color: strokeColor,
                   width: 2
                 })
               }),