Mercurial > gemma
diff client/src/map/store.js @ 939:a22f66acfd96
client: move layer distance marks axis to be drawn on top
* Move distance marks on the axis to be drawn last and thus on top
of the contour lines to be more visible.
author | Bernhard Reiter <bernhard@intevation.de> |
---|---|
date | Tue, 09 Oct 2018 00:37:23 +0200 |
parents | fe923c8ef08f |
children | 2025074ad835 |
line wrap: on
line diff
--- a/client/src/map/store.js Tue Oct 09 00:12:12 2018 +0200 +++ b/client/src/map/store.js Tue Oct 09 00:37:23 2018 +0200 @@ -116,42 +116,6 @@ isVisible: false }, { - name: "Distance marks, Axis", - forLegendStyle: { point: true, resolution: 8 }, - data: new VectorLayer({ - source: new VectorSource({ - strategy: bboxStrategy - }), - style: function(feature, resolution) { - if (resolution < 10) { - var s = new Style({ - image: new CircleStyle({ - radius: 5, - fill: new Fill({ color: "rgba(255, 0, 0, 0.1)" }), - stroke: new Stroke({ color: "blue", width: 1 }) - }) - }); - if (resolution < 6) { - s.setText( - new Text({ - offsetY: 12, - font: '10px "Open Sans", "sans-serif"', - fill: new Fill({ - color: "black" - }), - text: (feature.get("hectometre") / 10).toString() - }) - ); - } - return s; - } else { - return []; - } - } - }), - isVisible: true - }, - { name: "Bottlenecks", data: new VectorLayer({ source: new VectorSource({ @@ -195,6 +159,42 @@ }) }), isVisible: false + }, + { + name: "Distance marks, Axis", + forLegendStyle: { point: true, resolution: 8 }, + data: new VectorLayer({ + source: new VectorSource({ + strategy: bboxStrategy + }), + style: function(feature, resolution) { + if (resolution < 10) { + var s = new Style({ + image: new CircleStyle({ + radius: 5, + fill: new Fill({ color: "rgba(255, 0, 0, 0.1)" }), + stroke: new Stroke({ color: "blue", width: 1 }) + }) + }); + if (resolution < 6) { + s.setText( + new Text({ + offsetY: 12, + font: '10px "Open Sans", "sans-serif"', + fill: new Fill({ + color: "black" + }), + text: (feature.get("hectometre") / 10).toString() + }) + ); + } + return s; + } else { + return []; + } + } + }), + isVisible: true } ], // note that some identified features may not have an id