comparison 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
comparison
equal deleted inserted replaced
938:fe923c8ef08f 939:a22f66acfd96
109 name: "Distance marks", 109 name: "Distance marks",
110 forLegendStyle: { point: true, resolution: 8 }, 110 forLegendStyle: { point: true, resolution: 8 },
111 data: new VectorLayer({ 111 data: new VectorLayer({
112 source: new VectorSource({ 112 source: new VectorSource({
113 strategy: bboxStrategy 113 strategy: bboxStrategy
114 })
115 }),
116 isVisible: false
117 },
118 {
119 name: "Bottlenecks",
120 data: new VectorLayer({
121 source: new VectorSource({
122 strategy: bboxStrategy
123 }),
124 style: new Style({
125 stroke: new Stroke({
126 color: "rgba(230, 230, 10, .8)",
127 width: 4
128 }),
129 fill: new Fill({
130 color: "rgba(230, 230, 10, .3)"
131 })
132 })
133 }),
134 isVisible: true
135 },
136 {
137 name: "Bottleneck isolines",
138 data: new TileLayer({
139 source: new TileWMS({
140 preload: 0,
141 projection: "EPSG:3857",
142 url: window.location.origin + "/api/internal/wms",
143 params: {
144 LAYERS: "sounding_results_contour_lines_geoserver",
145 VERSION: "1.1.1",
146 TILED: true
147 },
148 tileLoadFunction: function(tile, src) {
149 // console.log("calling for", tile, src);
150 HTTP.get(src, {
151 headers: {
152 "X-Gemma-Auth": localStorage.getItem("token")
153 },
154 responseType: "blob"
155 }).then(response => {
156 tile.getImage().src = URL.createObjectURL(response.data);
157 });
158 } // TODO tile.setState(TileState.ERROR);
114 }) 159 })
115 }), 160 }),
116 isVisible: false 161 isVisible: false
117 }, 162 },
118 { 163 {
148 return []; 193 return [];
149 } 194 }
150 } 195 }
151 }), 196 }),
152 isVisible: true 197 isVisible: true
153 },
154 {
155 name: "Bottlenecks",
156 data: new VectorLayer({
157 source: new VectorSource({
158 strategy: bboxStrategy
159 }),
160 style: new Style({
161 stroke: new Stroke({
162 color: "rgba(230, 230, 10, .8)",
163 width: 4
164 }),
165 fill: new Fill({
166 color: "rgba(230, 230, 10, .3)"
167 })
168 })
169 }),
170 isVisible: true
171 },
172 {
173 name: "Bottleneck isolines",
174 data: new TileLayer({
175 source: new TileWMS({
176 preload: 0,
177 projection: "EPSG:3857",
178 url: window.location.origin + "/api/internal/wms",
179 params: {
180 LAYERS: "sounding_results_contour_lines_geoserver",
181 VERSION: "1.1.1",
182 TILED: true
183 },
184 tileLoadFunction: function(tile, src) {
185 // console.log("calling for", tile, src);
186 HTTP.get(src, {
187 headers: {
188 "X-Gemma-Auth": localStorage.getItem("token")
189 },
190 responseType: "blob"
191 }).then(response => {
192 tile.getImage().src = URL.createObjectURL(response.data);
193 });
194 } // TODO tile.setState(TileState.ERROR);
195 })
196 }),
197 isVisible: false
198 } 198 }
199 ], 199 ],
200 // note that some identified features may not have an id 200 // note that some identified features may not have an id
201 // especially related to drawing in our own vector layer 201 // especially related to drawing in our own vector layer
202 identifiedFeatures: [], 202 identifiedFeatures: [],