Mercurial > gemma
annotate client/src/components/map/styles.js @ 3309:80037790032d
client: fully implemented sections
- added map layer with new style
- implemented in identify tool, map popup and fairway availability dialog
- added sidebar menu item
author | Markus Kottlaender <markus@intevation.de> |
---|---|
date | Fri, 17 May 2019 12:45:13 +0200 |
parents | fc8fbea24568 |
children | 00548f0e81c3 |
rev | line source |
---|---|
3011
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
1 import { Icon, Stroke, Style, Fill, Text, Circle } from "ol/style"; |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
2 import Point from "ol/geom/Point"; |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
3 import { getCenter } from "ol/extent"; |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
4 |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
5 const styles = { |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
6 blue1: new Style({ |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
7 stroke: new Stroke({ |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
8 color: "rgba(0, 0, 255, 0.8)", |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
9 lineDash: [2, 4], |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
10 lineCap: "round", |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
11 width: 2 |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
12 }), |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
13 fill: new Fill({ |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
14 color: "rgba(240, 230, 0, 0.2)" |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
15 }) |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
16 }), |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
17 blue2: new Style({ |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
18 stroke: new Stroke({ |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
19 color: "rgba(0, 0, 255, 0.9)", |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
20 lineDash: [3, 6], |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
21 lineCap: "round", |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
22 width: 2 |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
23 }), |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
24 fill: new Fill({ |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
25 color: "rgba(240, 230, 0, 0.1)" |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
26 }) |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
27 }), |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
28 blue3: new Style({ |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
29 stroke: new Stroke({ |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
30 color: "rgba(0, 0, 255, 1.0)", |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
31 width: 2 |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
32 }), |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
33 fill: new Fill({ |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
34 color: "rgba(255, 255, 255, 0.4)" |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
35 }) |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
36 }), |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
37 yellow1: new Style({ |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
38 stroke: new Stroke({ |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
39 color: "rgba(230, 230, 10, .8)", |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
40 width: 4 |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
41 }), |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
42 fill: new Fill({ |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
43 color: "rgba(230, 230, 10, .3)" |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
44 }) |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
45 }), |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
46 yellow2: new Style({ |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
47 stroke: new Stroke({ |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
48 color: "rgba(250, 200, 0, .8)", |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
49 width: 2 |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
50 }), |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
51 fill: new Fill({ |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
52 color: "rgba(250, 200, 10, .3)" |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
53 }) |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
54 }), |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
55 yellow3: new Style({ |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
56 stroke: new Stroke({ |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
57 color: "rgba(250, 240, 10, .9)", |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
58 width: 5 |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
59 }), |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
60 fill: new Fill({ |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
61 color: "rgba(250, 240, 0, .7)" |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
62 }) |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
63 }), |
3309
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3011
diff
changeset
|
64 orange1: new Style({ |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3011
diff
changeset
|
65 stroke: new Stroke({ |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3011
diff
changeset
|
66 color: "rgba(232, 177, 12, .8)", |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3011
diff
changeset
|
67 width: 2 |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3011
diff
changeset
|
68 }), |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3011
diff
changeset
|
69 fill: new Fill({ |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3011
diff
changeset
|
70 color: "rgba(232, 177, 0, .3)" |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3011
diff
changeset
|
71 }) |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3011
diff
changeset
|
72 }), |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3011
diff
changeset
|
73 orange2: new Style({ |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3011
diff
changeset
|
74 stroke: new Stroke({ |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3011
diff
changeset
|
75 color: "rgba(255, 166, 10, .9)", |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3011
diff
changeset
|
76 width: 5 |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3011
diff
changeset
|
77 }), |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3011
diff
changeset
|
78 fill: new Fill({ |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3011
diff
changeset
|
79 color: "rgba(255, 166, 0, .7)" |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3011
diff
changeset
|
80 }) |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3011
diff
changeset
|
81 }), |
3011
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
82 red1: new Style({ |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
83 stroke: new Stroke({ |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
84 color: "rgba(255, 0, 0, 1)", |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
85 width: 4 |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
86 }) |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
87 }), |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
88 circleBlue: new Style({ |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
89 image: new Circle({ |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
90 radius: 5, |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
91 fill: new Fill({ color: "rgba(255, 0, 0, 0.1)" }), |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
92 stroke: new Stroke({ color: "blue", width: 1 }) |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
93 }) |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
94 }), |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
95 textFW1: new Style({ |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
96 text: new Text({ |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
97 font: 'bold 12px "Open Sans", "sans-serif"', |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
98 placement: "line", |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
99 fill: new Fill({ |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
100 color: "black" |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
101 }), |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
102 text: "LOS: 1" |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
103 //, zIndex: 10 |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
104 }) |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
105 }), |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
106 textFW2: new Style({ |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
107 text: new Text({ |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
108 font: 'bold 12px "Open Sans", "sans-serif"', |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
109 placement: "line", |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
110 fill: new Fill({ |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
111 color: "black" |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
112 }), |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
113 text: "LOS: 2" |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
114 //, zIndex: 10 |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
115 }) |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
116 }), |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
117 textFW3: new Style({ |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
118 text: new Text({ |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
119 font: 'bold 12px "Open Sans", "sans-serif"', |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
120 placement: "line", |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
121 fill: new Fill({ |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
122 color: "black" |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
123 }), |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
124 text: "LOS: 3" |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
125 //, zIndex: 10 |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
126 }) |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
127 }) |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
128 }; |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
129 |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
130 export default { |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
131 stretches(feature) { |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
132 let style = styles.yellow2; |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
133 if (feature.get("highlighted")) { |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
134 style = styles.yellow3; |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
135 } |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
136 return style; |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
137 }, |
3309
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3011
diff
changeset
|
138 sections(feature) { |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3011
diff
changeset
|
139 let style = styles.orange1; |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3011
diff
changeset
|
140 if (feature.get("highlighted")) { |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3011
diff
changeset
|
141 style = styles.orange2; |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3011
diff
changeset
|
142 } |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3011
diff
changeset
|
143 return style; |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3011
diff
changeset
|
144 }, |
3011
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
145 fwd1() { |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
146 return [styles.blue1, styles.textFW1]; |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
147 }, |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
148 fwd2() { |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
149 return [styles.blue2, styles.textFW2]; |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
150 }, |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
151 fwd3() { |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
152 return [styles.blue3, styles.textFW3]; |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
153 }, |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
154 bottleneck() { |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
155 return styles.yellow1; |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
156 }, |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
157 bottleneckStatus(feature, resolution, isLegend) { |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
158 let s = []; |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
159 if ((feature.get("fa_critical") && resolution > 15) || isLegend) { |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
160 let bnCenter = getCenter(feature.getGeometry().getExtent()); |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
161 s.push( |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
162 new Style({ |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
163 geometry: new Point(bnCenter), |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
164 image: new Icon({ |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
165 src: require("@/assets/marker-bottleneck-critical.png"), |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
166 anchor: [0.5, 0.5], |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
167 scale: isLegend ? 0.5 : 1 |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
168 }) |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
169 }) |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
170 ); |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
171 } |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
172 if (feature.get("fa_critical") && !isLegend) { |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
173 s.push(styles.red1); |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
174 } |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
175 return s; |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
176 }, |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
177 dma(feature, resolution) { |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
178 if (resolution < 10) { |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
179 var s = styles.circleBlue; |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
180 if (resolution < 6) { |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
181 s.setText( |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
182 new Text({ |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
183 offsetY: 12, |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
184 font: '10px "Open Sans", "sans-serif"', |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
185 fill: new Fill({ |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
186 color: "black" |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
187 }), |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
188 text: (feature.get("hectometre") / 10).toString() |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
189 }) |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
190 ); |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
191 } |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
192 return s; |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
193 } |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
194 return []; |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
195 }, |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
196 gauge(feature, resolution, isLegend) { |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
197 return [ |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
198 new Style({ |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
199 image: new Icon({ |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
200 src: require("@/assets/marker-gauge.png"), |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
201 anchor: [0.5, isLegend ? 0.5 : 1], |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
202 scale: isLegend ? 0.5 : 1 |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
203 }), |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
204 text: new Text({ |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
205 font: '10px "Open Sans", "sans-serif"', |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
206 offsetY: 8, |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
207 fill: new Fill({ |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
208 color: "white" |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
209 }), |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
210 text: feature.get("objname") |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
211 }) |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
212 }), |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
213 new Style({ |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
214 text: new Text({ |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
215 font: '10px "Open Sans", "sans-serif"', |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
216 offsetY: 7, |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
217 offsetX: -1, |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
218 fill: new Fill({ |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
219 color: "black" |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
220 }), |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
221 text: feature.get("objname") |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
222 }) |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
223 }) |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
224 ]; |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
225 } |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
226 }; |