# HG changeset patch # User Markus Kottlaender # Date 1551883199 -3600 # Node ID 6498267096ae39415c3b6701ba9a7ae0dea6580e # Parent 8416cf343f17f42014a8b59b69224bfdac10d802 client: critical bottlenecks: use png instead of vectors for marker The positioning of text is not always precise. The exclamation mark in the warning sign for critical bottlenecks was not always perfectly centered. Using a png image is more reliable. diff -r 8416cf343f17 -r 6498267096ae client/src/assets/marker-bottleneck-critical.png Binary file client/src/assets/marker-bottleneck-critical.png has changed diff -r 8416cf343f17 -r 6498267096ae client/src/store/map.js --- a/client/src/store/map.js Wed Mar 06 15:25:40 2019 +0100 +++ b/client/src/store/map.js Wed Mar 06 15:39:59 2019 +0100 @@ -346,25 +346,10 @@ styles.push( new Style({ geometry: new Point(bnCenter), - image: new RegularShape({ - points: 3, - radius: isLegend ? 9 : 13, - fill: new Fill({ color: "white" }), - stroke: new Stroke({ - color: "rgba(255, 0, 0, 0.8)", - width: isLegend ? 2 : 3 - }) - }), - text: new Text({ - font: - "bold " + - (isLegend ? 8 : 12) + - 'px "Open Sans", "sans-serif"', - placement: "point", - fill: new Fill({ color: "black" }), - text: "!", - offsetY: isLegend ? 0 : 1, - offsetX: isLegend ? 1 : 0 + image: new Icon({ + src: require("../assets/marker-bottleneck-critical.png"), + anchor: [0.5, 0.5], + scale: isLegend ? 0.5 : 1 }) }) );