Mercurial > gemma
annotate client/src/components/map/layers.js @ 3513:ca9590be1da2 waterlevel-in-crossprofile
client: fairway profiles: removed more code
author | Markus Kottlaender <markus@intevation.de> |
---|---|
date | Tue, 28 May 2019 18:40:02 +0200 |
parents | a606d003730c |
children | 47c61ea894b1 |
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 TileWMS from "ol/source/TileWMS"; |
3031 | 2 import { |
3 Tile as TileLayer, | |
4 Vector as VectorLayer, | |
5 Image as ImageLayer | |
6 } from "ol/layer"; | |
3011
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
7 import { Icon, Stroke, Style } from "ol/style"; |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
8 import VectorSource from "ol/source/Vector"; |
3029
81c2e561fe03
Use distance marks an axis via WMS. Added legend and featureinfo.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3021
diff
changeset
|
9 import { ImageWMS as ImageSource } from "ol/source"; |
3011
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
10 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
|
11 import { bbox as bboxStrategy } from "ol/loadingstrategy"; |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
12 import { WFS, GeoJSON } from "ol/format"; |
3270
d7bc51fd50b0
client: map layers: integrated osm layer into main layer configuration file
Markus Kottlaender <markus@intevation.de>
parents:
3123
diff
changeset
|
13 import OSM from "ol/source/OSM"; |
3011
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
14 import { equalTo } from "ol/format/filter"; |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
15 import { HTTP } from "@/lib/http"; |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
16 import styles from "./styles"; |
3271
b74e9768231d
client: map layers: added support for vuex store in layer configuration
Markus Kottlaender <markus@intevation.de>
parents:
3270
diff
changeset
|
17 import store from "@/store/index"; |
3011
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
18 |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
19 const buildVectorLoader = ( |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
20 featureRequestOptions, |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
21 vectorSource, |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
22 bboxStrategyDisabled, |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
23 featurePostProcessor |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
24 ) => { |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
25 // build a function to be used for VectorSource.setLoader() |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
26 // make use of WFS().writeGetFeature to build the request |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
27 // and use our HTTP library to actually do it |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
28 // NOTE: the geometryName has to be given in featureRequestOptions if |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
29 // bboxStrategy (default) is used |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
30 featureRequestOptions.featureNS = "gemma"; |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
31 featureRequestOptions.featurePrefix = "gemma"; |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
32 featureRequestOptions.outputFormat = "application/json"; |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
33 return (extent, resolution, projection) => { |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
34 if (!bboxStrategyDisabled) { |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
35 featureRequestOptions.bbox = extent; |
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 featureRequestOptions.srsName = projection.getCode(); |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
38 HTTP.post( |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
39 "/internal/wfs", |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
40 new XMLSerializer().serializeToString( |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
41 new WFS().writeGetFeature(featureRequestOptions) |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
42 ), |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
43 { |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
44 headers: { |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
45 "X-Gemma-Auth": localStorage.getItem("token"), |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
46 "Content-type": "text/xml; charset=UTF-8" |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
47 } |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
48 } |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
49 ) |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
50 .then(response => { |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
51 const features = new GeoJSON().readFeatures( |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
52 JSON.stringify(response.data) |
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 if (featurePostProcessor) { |
3507
a606d003730c
client: spuc12: implemented diagram for reference gauge of bottlenecks
Markus Kottlaender <markus@intevation.de>
parents:
3501
diff
changeset
|
55 features.map(f => featurePostProcessor(f, store, features)); |
3011
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
56 } |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
57 vectorSource.addFeatures(features); |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
58 }) |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
59 .catch(() => { |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
60 vectorSource.removeLoadedExtent(extent); |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
61 }); |
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 }; |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
64 |
3123
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
65 // SHARED LAYERS: |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
66 // DRAW- and CUTLAYER are shared across maps. E.g. you want to see the cross cut |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
67 // arrow on both maps when comparing surveys. So we don't need to initialize a |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
68 // new VectorLayer object for each map. Instead we use these two constants so |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
69 // that all maps use the same object. |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
70 const DRAWLAYER = new VectorLayer({ |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
71 id: "DRAWTOOL", |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
72 label: "Draw Tool", |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
73 visible: true, |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
74 source: new VectorSource({ wrapX: false }), |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
75 style: function(feature) { |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
76 // adapted from OpenLayer's LineString Arrow Example |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
77 var geometry = feature.getGeometry(); |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
78 var styles = [ |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
79 // linestring |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
80 new Style({ |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
81 stroke: new Stroke({ |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
82 color: "#369aca", |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
83 width: 2 |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
84 }) |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
85 }) |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
86 ]; |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
87 |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
88 if (geometry.getType() === "LineString") { |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
89 geometry.forEachSegment(function(start, end) { |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
90 var dx = end[0] - start[0]; |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
91 var dy = end[1] - start[1]; |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
92 var rotation = Math.atan2(dy, dx); |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
93 // arrows |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
94 styles.push( |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
95 new Style({ |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
96 geometry: new Point(end), |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
97 image: new Icon({ |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
98 // we need to make sure the image is loaded by Vue Loader |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
99 src: require("@/assets/linestring_arrow.png"), |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
100 // fiddling with the anchor's y value does not help to |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
101 // position the image more centered on the line ending, as the |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
102 // default line style seems to be slightly uncentered in the |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
103 // anti-aliasing, but the image is not placed with subpixel |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
104 // precision |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
105 anchor: [0.75, 0.5], |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
106 rotateWithView: true, |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
107 rotation: -rotation |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
108 }) |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
109 }) |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
110 ); |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
111 }); |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
112 } |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
113 return styles; |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
114 } |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
115 }); |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
116 |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
117 const CUTLAYER = new VectorLayer({ |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
118 id: "CUTTOOL", |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
119 label: "Cut Tool", |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
120 visible: true, |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
121 source: new VectorSource({ wrapX: false }), |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
122 style: function(feature) { |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
123 // adapted from OpenLayer's LineString Arrow Example |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
124 var geometry = feature.getGeometry(); |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
125 var styles = [ |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
126 // linestring |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
127 new Style({ |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
128 stroke: new Stroke({ |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
129 color: "#333333", |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
130 width: 2, |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
131 lineDash: [7, 7] |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
132 }) |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
133 }) |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
134 ]; |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
135 |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
136 if (geometry.getType() === "LineString") { |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
137 geometry.forEachSegment(function(start, end) { |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
138 var dx = end[0] - start[0]; |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
139 var dy = end[1] - start[1]; |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
140 var rotation = Math.atan2(dy, dx); |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
141 // arrows |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
142 styles.push( |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
143 new Style({ |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
144 geometry: new Point(end), |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
145 image: new Icon({ |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
146 // we need to make sure the image is loaded by Vue Loader |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
147 src: require("@/assets/linestring_arrow_grey.png"), |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
148 // fiddling with the anchor's y value does not help to |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
149 // position the image more centered on the line ending, as the |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
150 // default line style seems to be slightly uncentered in the |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
151 // anti-aliasing, but the image is not placed with subpixel |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
152 // precision |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
153 anchor: [0.75, 0.5], |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
154 rotateWithView: true, |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
155 rotation: -rotation |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
156 }) |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
157 }) |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
158 ); |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
159 }); |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
160 } |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
161 return styles; |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
162 } |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
163 }); |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
164 |
3021
2e2a271c1026
client: fixed layer factory to actually serve different objects
Markus Kottlaender <markus@intevation.de>
parents:
3011
diff
changeset
|
165 export default function() { |
3011
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
166 return { |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
167 get(id) { |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
168 return this.config.find(l => l.get("id") === id); |
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 config: [ |
3270
d7bc51fd50b0
client: map layers: integrated osm layer into main layer configuration file
Markus Kottlaender <markus@intevation.de>
parents:
3123
diff
changeset
|
171 new TileLayer({ |
d7bc51fd50b0
client: map layers: integrated osm layer into main layer configuration file
Markus Kottlaender <markus@intevation.de>
parents:
3123
diff
changeset
|
172 id: "OPENSTREETMAP", |
d7bc51fd50b0
client: map layers: integrated osm layer into main layer configuration file
Markus Kottlaender <markus@intevation.de>
parents:
3123
diff
changeset
|
173 label: "Open Streetmap", |
d7bc51fd50b0
client: map layers: integrated osm layer into main layer configuration file
Markus Kottlaender <markus@intevation.de>
parents:
3123
diff
changeset
|
174 visible: true, |
d7bc51fd50b0
client: map layers: integrated osm layer into main layer configuration file
Markus Kottlaender <markus@intevation.de>
parents:
3123
diff
changeset
|
175 source: new OSM() |
d7bc51fd50b0
client: map layers: integrated osm layer into main layer configuration file
Markus Kottlaender <markus@intevation.de>
parents:
3123
diff
changeset
|
176 }), |
3030
3524bbc5067e
Use dingle tile WMS for ECDIS Layer and Max resolutions for some vector layers.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3029
diff
changeset
|
177 new ImageLayer({ |
3011
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
178 id: "INLANDECDIS", |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
179 label: "Inland ECDIS chart Danube", |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
180 visible: true, |
3030
3524bbc5067e
Use dingle tile WMS for ECDIS Layer and Max resolutions for some vector layers.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3029
diff
changeset
|
181 source: new ImageSource({ |
3011
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
182 preload: 1, |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
183 url: "https://service.d4d-portal.info/wms/", |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
184 crossOrigin: "anonymous", |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
185 params: { LAYERS: "d4d", VERSION: "1.1.1", TILED: true } |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
186 }) |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
187 }), |
3047
e0b77d7463e7
Changed Waterway axis and area layer to WMS.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3031
diff
changeset
|
188 new ImageLayer({ |
e0b77d7463e7
Changed Waterway axis and area layer to WMS.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3031
diff
changeset
|
189 id: "WATERWAYAREA", |
e0b77d7463e7
Changed Waterway axis and area layer to WMS.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3031
diff
changeset
|
190 label: "Waterway Area", |
e0b77d7463e7
Changed Waterway axis and area layer to WMS.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3031
diff
changeset
|
191 maxResolution: 100, |
e0b77d7463e7
Changed Waterway axis and area layer to WMS.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3031
diff
changeset
|
192 minResolution: 0, |
e0b77d7463e7
Changed Waterway axis and area layer to WMS.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3031
diff
changeset
|
193 source: new ImageSource({ |
e0b77d7463e7
Changed Waterway axis and area layer to WMS.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3031
diff
changeset
|
194 url: window.location.origin + "/api/internal/wms", |
e0b77d7463e7
Changed Waterway axis and area layer to WMS.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3031
diff
changeset
|
195 params: { LAYERS: "waterway_area", VERSION: "1.1.1", TILED: true }, |
e0b77d7463e7
Changed Waterway axis and area layer to WMS.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3031
diff
changeset
|
196 imageLoadFunction: function(tile, src) { |
e0b77d7463e7
Changed Waterway axis and area layer to WMS.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3031
diff
changeset
|
197 HTTP.get(src, { |
e0b77d7463e7
Changed Waterway axis and area layer to WMS.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3031
diff
changeset
|
198 headers: { |
e0b77d7463e7
Changed Waterway axis and area layer to WMS.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3031
diff
changeset
|
199 "X-Gemma-Auth": localStorage.getItem("token") |
e0b77d7463e7
Changed Waterway axis and area layer to WMS.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3031
diff
changeset
|
200 }, |
e0b77d7463e7
Changed Waterway axis and area layer to WMS.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3031
diff
changeset
|
201 responseType: "blob" |
e0b77d7463e7
Changed Waterway axis and area layer to WMS.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3031
diff
changeset
|
202 }).then(response => { |
e0b77d7463e7
Changed Waterway axis and area layer to WMS.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3031
diff
changeset
|
203 tile.getImage().src = URL.createObjectURL(response.data); |
e0b77d7463e7
Changed Waterway axis and area layer to WMS.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3031
diff
changeset
|
204 }); |
e0b77d7463e7
Changed Waterway axis and area layer to WMS.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3031
diff
changeset
|
205 } // TODO tile.setState(TileState.ERROR); |
e0b77d7463e7
Changed Waterway axis and area layer to WMS.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3031
diff
changeset
|
206 }) |
e0b77d7463e7
Changed Waterway axis and area layer to WMS.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3031
diff
changeset
|
207 }), |
3011
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
208 (function() { |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
209 const source = new VectorSource({ strategy: bboxStrategy }); |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
210 source.setLoader( |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
211 buildVectorLoader( |
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 featureTypes: ["stretches_geoserver"], |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
214 geometryName: "area" |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
215 }, |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
216 source, |
3271
b74e9768231d
client: map layers: added support for vuex store in layer configuration
Markus Kottlaender <markus@intevation.de>
parents:
3270
diff
changeset
|
217 true, |
b74e9768231d
client: map layers: added support for vuex store in layer configuration
Markus Kottlaender <markus@intevation.de>
parents:
3270
diff
changeset
|
218 (f, store) => { |
b74e9768231d
client: map layers: added support for vuex store in layer configuration
Markus Kottlaender <markus@intevation.de>
parents:
3270
diff
changeset
|
219 if (f.getId() === store.state.imports.selectedStretchId) { |
3011
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
220 f.set("highlighted", true); |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
221 } |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
222 return f; |
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 return new VectorLayer({ |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
227 id: "STRETCHES", |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
228 label: "Stretches", |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
229 visible: false, |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
230 style: styles.stretches, |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
231 source |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
232 }); |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
233 })(), |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
234 (function() { |
3309
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3271
diff
changeset
|
235 const source = new VectorSource({ strategy: bboxStrategy }); |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3271
diff
changeset
|
236 source.setLoader( |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3271
diff
changeset
|
237 buildVectorLoader( |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3271
diff
changeset
|
238 { |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3271
diff
changeset
|
239 featureTypes: ["sections_geoserver"], |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3271
diff
changeset
|
240 geometryName: "area" |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3271
diff
changeset
|
241 }, |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3271
diff
changeset
|
242 source, |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3271
diff
changeset
|
243 true, |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3271
diff
changeset
|
244 (f, store) => { |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3271
diff
changeset
|
245 if (f.getId() === store.state.imports.selectedSectionId) { |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3271
diff
changeset
|
246 f.set("highlighted", true); |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3271
diff
changeset
|
247 } |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3271
diff
changeset
|
248 return f; |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3271
diff
changeset
|
249 } |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3271
diff
changeset
|
250 ) |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3271
diff
changeset
|
251 ); |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3271
diff
changeset
|
252 return new VectorLayer({ |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3271
diff
changeset
|
253 id: "SECTIONS", |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3271
diff
changeset
|
254 label: "Sections", |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3271
diff
changeset
|
255 visible: false, |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3271
diff
changeset
|
256 style: styles.sections, |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3271
diff
changeset
|
257 source |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3271
diff
changeset
|
258 }); |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3271
diff
changeset
|
259 })(), |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3271
diff
changeset
|
260 (function() { |
3011
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
261 const source = new VectorSource(); |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
262 source.setLoader( |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
263 buildVectorLoader( |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
264 { |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
265 featureTypes: ["fairway_dimensions"], |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
266 filter: equalTo("level_of_service", 1) |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
267 }, |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
268 source, |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
269 true |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
270 ) |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
271 ); |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
272 return new VectorLayer({ |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
273 id: "FAIRWAYDIMENSIONSLOS1", |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
274 label: "LOS 1 Fairway Dimensions", |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
275 visible: false, |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
276 style: styles.fwd1, |
3030
3524bbc5067e
Use dingle tile WMS for ECDIS Layer and Max resolutions for some vector layers.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3029
diff
changeset
|
277 maxResolution: 80, |
3524bbc5067e
Use dingle tile WMS for ECDIS Layer and Max resolutions for some vector layers.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3029
diff
changeset
|
278 minResolution: 0, |
3011
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
279 source |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
280 }); |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
281 })(), |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
282 (function() { |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
283 const source = new VectorSource(); |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
284 source.setLoader( |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
285 buildVectorLoader( |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
286 { |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
287 featureTypes: ["fairway_dimensions"], |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
288 filter: equalTo("level_of_service", 2) |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
289 }, |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
290 source, |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
291 true |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
292 ) |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
293 ); |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
294 return new VectorLayer({ |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
295 id: "FAIRWAYDIMENSIONSLOS2", |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
296 label: "LOS 2 Fairway Dimensions", |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
297 visible: false, |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
298 style: styles.fwd2, |
3030
3524bbc5067e
Use dingle tile WMS for ECDIS Layer and Max resolutions for some vector layers.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3029
diff
changeset
|
299 maxResolution: 80, |
3524bbc5067e
Use dingle tile WMS for ECDIS Layer and Max resolutions for some vector layers.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3029
diff
changeset
|
300 minResolution: 0, |
3011
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
301 source |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
302 }); |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
303 })(), |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
304 (function() { |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
305 const source = new VectorSource(); |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
306 source.setLoader( |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
307 buildVectorLoader( |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
308 { |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
309 featureTypes: ["fairway_dimensions"], |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
310 filter: equalTo("level_of_service", 3) |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
311 }, |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
312 source, |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
313 true |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
314 ) |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
315 ); |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
316 return new VectorLayer({ |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
317 id: "FAIRWAYDIMENSIONSLOS3", |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
318 label: "LOS 3 Fairway Dimensions", |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
319 visible: true, |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
320 style: styles.fwd3, |
3030
3524bbc5067e
Use dingle tile WMS for ECDIS Layer and Max resolutions for some vector layers.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3029
diff
changeset
|
321 maxResolution: 80, |
3524bbc5067e
Use dingle tile WMS for ECDIS Layer and Max resolutions for some vector layers.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3029
diff
changeset
|
322 minResolution: 0, |
3011
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
323 source |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
324 }); |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
325 })(), |
3047
e0b77d7463e7
Changed Waterway axis and area layer to WMS.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3031
diff
changeset
|
326 new ImageLayer({ |
e0b77d7463e7
Changed Waterway axis and area layer to WMS.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3031
diff
changeset
|
327 id: "WATERWAYAXIS", |
e0b77d7463e7
Changed Waterway axis and area layer to WMS.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3031
diff
changeset
|
328 label: "Waterway Axis", |
e0b77d7463e7
Changed Waterway axis and area layer to WMS.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3031
diff
changeset
|
329 source: new ImageSource({ |
e0b77d7463e7
Changed Waterway axis and area layer to WMS.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3031
diff
changeset
|
330 url: window.location.origin + "/api/internal/wms", |
e0b77d7463e7
Changed Waterway axis and area layer to WMS.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3031
diff
changeset
|
331 params: { LAYERS: "waterway_axis", VERSION: "1.1.1", TILED: true }, |
e0b77d7463e7
Changed Waterway axis and area layer to WMS.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3031
diff
changeset
|
332 imageLoadFunction: function(tile, src) { |
e0b77d7463e7
Changed Waterway axis and area layer to WMS.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3031
diff
changeset
|
333 HTTP.get(src, { |
e0b77d7463e7
Changed Waterway axis and area layer to WMS.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3031
diff
changeset
|
334 headers: { |
e0b77d7463e7
Changed Waterway axis and area layer to WMS.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3031
diff
changeset
|
335 "X-Gemma-Auth": localStorage.getItem("token") |
e0b77d7463e7
Changed Waterway axis and area layer to WMS.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3031
diff
changeset
|
336 }, |
e0b77d7463e7
Changed Waterway axis and area layer to WMS.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3031
diff
changeset
|
337 responseType: "blob" |
e0b77d7463e7
Changed Waterway axis and area layer to WMS.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3031
diff
changeset
|
338 }).then(response => { |
e0b77d7463e7
Changed Waterway axis and area layer to WMS.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3031
diff
changeset
|
339 tile.getImage().src = URL.createObjectURL(response.data); |
e0b77d7463e7
Changed Waterway axis and area layer to WMS.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3031
diff
changeset
|
340 }); |
e0b77d7463e7
Changed Waterway axis and area layer to WMS.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3031
diff
changeset
|
341 } // TODO tile.setState(TileState.ERROR); |
e0b77d7463e7
Changed Waterway axis and area layer to WMS.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3031
diff
changeset
|
342 }) |
e0b77d7463e7
Changed Waterway axis and area layer to WMS.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3031
diff
changeset
|
343 }), |
3011
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
344 (function() { |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
345 const source = new VectorSource({ strategy: bboxStrategy }); |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
346 source.setLoader( |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
347 buildVectorLoader( |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
348 { |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
349 featureTypes: ["waterway_profiles"], |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
350 geometryName: "geom" |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
351 }, |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
352 source |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
353 ) |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
354 ); |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
355 return new VectorLayer({ |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
356 id: "WATERWAYPROFILES", |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
357 label: "Waterway Profiles", |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
358 visible: true, |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
359 style: new Style({ |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
360 stroke: new Stroke({ |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
361 color: "rgba(0, 0, 255, .5)", |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
362 lineDash: [5, 5], |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
363 width: 2 |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
364 }) |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
365 }), |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
366 maxResolution: 2.5, |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
367 minResolution: 0, |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
368 source |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
369 }); |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
370 })(), |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
371 (function() { |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
372 const source = new VectorSource({ strategy: bboxStrategy }); |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
373 source.setLoader( |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
374 buildVectorLoader( |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
375 { |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
376 featureTypes: ["bottlenecks_geoserver"], |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
377 geometryName: "area" |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
378 }, |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
379 source |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
380 ) |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
381 ); |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
382 return new VectorLayer({ |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
383 id: "BOTTLENECKS", |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
384 label: "Bottlenecks", |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
385 visible: true, |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
386 style: styles.bottleneck, |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
387 source |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
388 }); |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
389 })(), |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
390 new TileLayer({ |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
391 id: "BOTTLENECKISOLINE", |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
392 label: "Bottleneck isolines", |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
393 visible: false, |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
394 source: new TileWMS({ |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
395 preload: 0, |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
396 projection: "EPSG:3857", |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
397 url: window.location.origin + "/api/internal/wms", |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
398 params: { |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
399 LAYERS: "sounding_results_contour_lines_geoserver", |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
400 VERSION: "1.1.1", |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
401 TILED: true |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
402 }, |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
403 tileLoadFunction: function(tile, src) { |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
404 // console.log("calling for", tile, src); |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
405 HTTP.get(src, { |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
406 headers: { |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
407 "X-Gemma-Auth": localStorage.getItem("token") |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
408 }, |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
409 responseType: "blob" |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
410 }).then(response => { |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
411 tile.getImage().src = URL.createObjectURL(response.data); |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
412 }); |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
413 } // TODO tile.setState(TileState.ERROR); |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
414 }) |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
415 }), |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
416 new TileLayer({ |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
417 id: "DIFFERENCES", |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
418 label: "Bottleneck Differences", |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
419 visible: false, |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
420 source: new TileWMS({ |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
421 preload: 0, |
3075
3cf7189fa93e
Changed projection for sounding differences layer. Fixes font size.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3073
diff
changeset
|
422 projection: "EPSG:3857", |
3011
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
423 url: window.location.origin + "/api/internal/wms", |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
424 params: { |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
425 LAYERS: "sounding_differences", |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
426 VERSION: "1.1.1", |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
427 TILED: true |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
428 }, |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
429 tileLoadFunction: function(tile, src) { |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
430 // console.log("calling for", tile, src); |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
431 HTTP.get(src, { |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
432 headers: { |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
433 "X-Gemma-Auth": localStorage.getItem("token") |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
434 }, |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
435 responseType: "blob" |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
436 }).then(response => { |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
437 tile.getImage().src = URL.createObjectURL(response.data); |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
438 }); |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
439 } // TODO tile.setState(TileState.ERROR); |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
440 }) |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
441 }), |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
442 (function() { |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
443 const source = new VectorSource({ strategy: bboxStrategy }); |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
444 source.setLoader( |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
445 buildVectorLoader( |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
446 { |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
447 featureTypes: ["bottlenecks_geoserver"], |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
448 geometryName: "area" |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
449 }, |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
450 source |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
451 ) |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
452 ); |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
453 return new VectorLayer({ |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
454 id: "BOTTLENECKSTATUS", |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
455 label: "Critical Bottlenecks", |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
456 forLegendStyle: { point: true, resolution: 16 }, |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
457 visible: true, |
3073
0cb180676722
client: map layers: changed z-index of critical bottleneck layer to be always on top
Markus Kottlaender <markus@intevation.de>
parents:
3047
diff
changeset
|
458 zIndex: 1, |
3011
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
459 style: styles.bottleneckStatus, |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
460 source |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
461 }); |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
462 })(), |
3335
59db0b5921c5
client: added layer for fairway availability diagrams with demo diagrams
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
463 (function() { |
59db0b5921c5
client: added layer for fairway availability diagrams with demo diagrams
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
464 const source = new VectorSource({ strategy: bboxStrategy }); |
59db0b5921c5
client: added layer for fairway availability diagrams with demo diagrams
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
465 source.setLoader( |
59db0b5921c5
client: added layer for fairway availability diagrams with demo diagrams
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
466 buildVectorLoader( |
59db0b5921c5
client: added layer for fairway availability diagrams with demo diagrams
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
467 { |
59db0b5921c5
client: added layer for fairway availability diagrams with demo diagrams
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
468 featureTypes: ["bottlenecks_geoserver"], |
59db0b5921c5
client: added layer for fairway availability diagrams with demo diagrams
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
469 geometryName: "area" |
59db0b5921c5
client: added layer for fairway availability diagrams with demo diagrams
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
470 }, |
59db0b5921c5
client: added layer for fairway availability diagrams with demo diagrams
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
471 source, |
59db0b5921c5
client: added layer for fairway availability diagrams with demo diagrams
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
472 false, |
3353
b01bf2399c20
client: available fairway depth vs lnwl: fetching data for diagrams on map
Markus Kottlaender <markus@intevation.de>
parents:
3335
diff
changeset
|
473 async (f, store) => { |
3335
59db0b5921c5
client: added layer for fairway availability diagrams with demo diagrams
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
474 if (f.get("fa_critical")) { |
3353
b01bf2399c20
client: available fairway depth vs lnwl: fetching data for diagrams on map
Markus Kottlaender <markus@intevation.de>
parents:
3335
diff
changeset
|
475 // look for fairway availability data in store. If present and |
b01bf2399c20
client: available fairway depth vs lnwl: fetching data for diagrams on map
Markus Kottlaender <markus@intevation.de>
parents:
3335
diff
changeset
|
476 // not older than 15 min use it or fetch new data and store it. |
b01bf2399c20
client: available fairway depth vs lnwl: fetching data for diagrams on map
Markus Kottlaender <markus@intevation.de>
parents:
3335
diff
changeset
|
477 let data = store.getters[ |
b01bf2399c20
client: available fairway depth vs lnwl: fetching data for diagrams on map
Markus Kottlaender <markus@intevation.de>
parents:
3335
diff
changeset
|
478 "fairwayavailability/fwLNWLOverviewData" |
b01bf2399c20
client: available fairway depth vs lnwl: fetching data for diagrams on map
Markus Kottlaender <markus@intevation.de>
parents:
3335
diff
changeset
|
479 ](f); |
b01bf2399c20
client: available fairway depth vs lnwl: fetching data for diagrams on map
Markus Kottlaender <markus@intevation.de>
parents:
3335
diff
changeset
|
480 if ( |
b01bf2399c20
client: available fairway depth vs lnwl: fetching data for diagrams on map
Markus Kottlaender <markus@intevation.de>
parents:
3335
diff
changeset
|
481 data && |
b01bf2399c20
client: available fairway depth vs lnwl: fetching data for diagrams on map
Markus Kottlaender <markus@intevation.de>
parents:
3335
diff
changeset
|
482 new Date().getTime() - data.createdAt.getTime() < 900000 |
b01bf2399c20
client: available fairway depth vs lnwl: fetching data for diagrams on map
Markus Kottlaender <markus@intevation.de>
parents:
3335
diff
changeset
|
483 ) { |
b01bf2399c20
client: available fairway depth vs lnwl: fetching data for diagrams on map
Markus Kottlaender <markus@intevation.de>
parents:
3335
diff
changeset
|
484 f.set("fa_data", data.data); |
b01bf2399c20
client: available fairway depth vs lnwl: fetching data for diagrams on map
Markus Kottlaender <markus@intevation.de>
parents:
3335
diff
changeset
|
485 } else { |
3433
e56b280582ae
client: spuc05: use real data for diagrams on map
Markus Kottlaender <markus@intevation.de>
parents:
3353
diff
changeset
|
486 let date = new Date(); |
3353
b01bf2399c20
client: available fairway depth vs lnwl: fetching data for diagrams on map
Markus Kottlaender <markus@intevation.de>
parents:
3335
diff
changeset
|
487 data = await store.dispatch( |
3457
870812d8f247
client: spuc05: implemented new data format (csv) for diagrams on map
Markus Kottlaender <markus@intevation.de>
parents:
3444
diff
changeset
|
488 "fairwayavailability/loadAvailableFairwayDepthLNWLForMap", |
3353
b01bf2399c20
client: available fairway depth vs lnwl: fetching data for diagrams on map
Markus Kottlaender <markus@intevation.de>
parents:
3335
diff
changeset
|
489 { |
b01bf2399c20
client: available fairway depth vs lnwl: fetching data for diagrams on map
Markus Kottlaender <markus@intevation.de>
parents:
3335
diff
changeset
|
490 feature: f, |
3433
e56b280582ae
client: spuc05: use real data for diagrams on map
Markus Kottlaender <markus@intevation.de>
parents:
3353
diff
changeset
|
491 from: date.toISOString().split("T")[0], |
e56b280582ae
client: spuc05: use real data for diagrams on map
Markus Kottlaender <markus@intevation.de>
parents:
3353
diff
changeset
|
492 to: date.toISOString().split("T")[0], |
3353
b01bf2399c20
client: available fairway depth vs lnwl: fetching data for diagrams on map
Markus Kottlaender <markus@intevation.de>
parents:
3335
diff
changeset
|
493 frequency: "monthly", |
b01bf2399c20
client: available fairway depth vs lnwl: fetching data for diagrams on map
Markus Kottlaender <markus@intevation.de>
parents:
3335
diff
changeset
|
494 LOS: 3 |
b01bf2399c20
client: available fairway depth vs lnwl: fetching data for diagrams on map
Markus Kottlaender <markus@intevation.de>
parents:
3335
diff
changeset
|
495 } |
b01bf2399c20
client: available fairway depth vs lnwl: fetching data for diagrams on map
Markus Kottlaender <markus@intevation.de>
parents:
3335
diff
changeset
|
496 ); |
b01bf2399c20
client: available fairway depth vs lnwl: fetching data for diagrams on map
Markus Kottlaender <markus@intevation.de>
parents:
3335
diff
changeset
|
497 if (data) { |
b01bf2399c20
client: available fairway depth vs lnwl: fetching data for diagrams on map
Markus Kottlaender <markus@intevation.de>
parents:
3335
diff
changeset
|
498 store.commit("fairwayavailability/addFwLNWLOverviewData", { |
b01bf2399c20
client: available fairway depth vs lnwl: fetching data for diagrams on map
Markus Kottlaender <markus@intevation.de>
parents:
3335
diff
changeset
|
499 feature: f, |
b01bf2399c20
client: available fairway depth vs lnwl: fetching data for diagrams on map
Markus Kottlaender <markus@intevation.de>
parents:
3335
diff
changeset
|
500 data, |
b01bf2399c20
client: available fairway depth vs lnwl: fetching data for diagrams on map
Markus Kottlaender <markus@intevation.de>
parents:
3335
diff
changeset
|
501 createdAt: new Date() |
b01bf2399c20
client: available fairway depth vs lnwl: fetching data for diagrams on map
Markus Kottlaender <markus@intevation.de>
parents:
3335
diff
changeset
|
502 }); |
b01bf2399c20
client: available fairway depth vs lnwl: fetching data for diagrams on map
Markus Kottlaender <markus@intevation.de>
parents:
3335
diff
changeset
|
503 f.set("fa_data", data); |
b01bf2399c20
client: available fairway depth vs lnwl: fetching data for diagrams on map
Markus Kottlaender <markus@intevation.de>
parents:
3335
diff
changeset
|
504 } |
b01bf2399c20
client: available fairway depth vs lnwl: fetching data for diagrams on map
Markus Kottlaender <markus@intevation.de>
parents:
3335
diff
changeset
|
505 } |
3335
59db0b5921c5
client: added layer for fairway availability diagrams with demo diagrams
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
506 } |
59db0b5921c5
client: added layer for fairway availability diagrams with demo diagrams
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
507 return f; |
59db0b5921c5
client: added layer for fairway availability diagrams with demo diagrams
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
508 } |
59db0b5921c5
client: added layer for fairway availability diagrams with demo diagrams
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
509 ) |
59db0b5921c5
client: added layer for fairway availability diagrams with demo diagrams
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
510 ); |
59db0b5921c5
client: added layer for fairway availability diagrams with demo diagrams
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
511 return new VectorLayer({ |
59db0b5921c5
client: added layer for fairway availability diagrams with demo diagrams
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
512 id: "BOTTLENECKFAIRWAYAVAILABILITY", |
59db0b5921c5
client: added layer for fairway availability diagrams with demo diagrams
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
513 label: "Bottlenecks Fairway Availability", |
59db0b5921c5
client: added layer for fairway availability diagrams with demo diagrams
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
514 forLegendStyle: { point: true, resolution: 16 }, |
59db0b5921c5
client: added layer for fairway availability diagrams with demo diagrams
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
515 visible: false, |
59db0b5921c5
client: added layer for fairway availability diagrams with demo diagrams
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
516 zIndex: 1, |
59db0b5921c5
client: added layer for fairway availability diagrams with demo diagrams
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
517 style: styles.bottleneckFairwayAvailability, |
59db0b5921c5
client: added layer for fairway availability diagrams with demo diagrams
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
518 source |
59db0b5921c5
client: added layer for fairway availability diagrams with demo diagrams
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
519 }); |
59db0b5921c5
client: added layer for fairway availability diagrams with demo diagrams
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
520 })(), |
3434
9fba1be118e7
client: data accuracy: Show diagrams for gauges, bottlenecks and stretches on map.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3433
diff
changeset
|
521 (function() { |
9fba1be118e7
client: data accuracy: Show diagrams for gauges, bottlenecks and stretches on map.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3433
diff
changeset
|
522 const source = new VectorSource({ strategy: bboxStrategy }); |
9fba1be118e7
client: data accuracy: Show diagrams for gauges, bottlenecks and stretches on map.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3433
diff
changeset
|
523 source.setLoader( |
9fba1be118e7
client: data accuracy: Show diagrams for gauges, bottlenecks and stretches on map.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3433
diff
changeset
|
524 buildVectorLoader( |
9fba1be118e7
client: data accuracy: Show diagrams for gauges, bottlenecks and stretches on map.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3433
diff
changeset
|
525 { |
3436 | 526 featureTypes: [ |
527 "bottlenecks_geoserver", | |
528 "gauges_geoserver", | |
3444
1559566662f5
client: data accuracy: Add diagram for sections.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3436
diff
changeset
|
529 "stretches_geoserver", |
1559566662f5
client: data accuracy: Add diagram for sections.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3436
diff
changeset
|
530 "sections_geoserver" |
3436 | 531 ] |
3434
9fba1be118e7
client: data accuracy: Show diagrams for gauges, bottlenecks and stretches on map.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3433
diff
changeset
|
532 }, |
9fba1be118e7
client: data accuracy: Show diagrams for gauges, bottlenecks and stretches on map.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3433
diff
changeset
|
533 source, |
3501
c5c7cc24fe72
client: spuc12: implemented nash sutcliffe for forcast vs reality accuracy indicator
Markus Kottlaender <markus@intevation.de>
parents:
3457
diff
changeset
|
534 true, |
3507
a606d003730c
client: spuc12: implemented diagram for reference gauge of bottlenecks
Markus Kottlaender <markus@intevation.de>
parents:
3501
diff
changeset
|
535 // since we don't use bbox strategy, features will contain all features and we can use it |
a606d003730c
client: spuc12: implemented diagram for reference gauge of bottlenecks
Markus Kottlaender <markus@intevation.de>
parents:
3501
diff
changeset
|
536 // to find reference gauges for bottlenecks, yeah! |
a606d003730c
client: spuc12: implemented diagram for reference gauge of bottlenecks
Markus Kottlaender <markus@intevation.de>
parents:
3501
diff
changeset
|
537 async (f, store, features) => { |
a606d003730c
client: spuc12: implemented diagram for reference gauge of bottlenecks
Markus Kottlaender <markus@intevation.de>
parents:
3501
diff
changeset
|
538 // attach reference gauge to bottleneck |
a606d003730c
client: spuc12: implemented diagram for reference gauge of bottlenecks
Markus Kottlaender <markus@intevation.de>
parents:
3501
diff
changeset
|
539 if (f.getId().indexOf("bottlenecks") > -1) { |
a606d003730c
client: spuc12: implemented diagram for reference gauge of bottlenecks
Markus Kottlaender <markus@intevation.de>
parents:
3501
diff
changeset
|
540 f.set( |
a606d003730c
client: spuc12: implemented diagram for reference gauge of bottlenecks
Markus Kottlaender <markus@intevation.de>
parents:
3501
diff
changeset
|
541 "gauge_obj", |
a606d003730c
client: spuc12: implemented diagram for reference gauge of bottlenecks
Markus Kottlaender <markus@intevation.de>
parents:
3501
diff
changeset
|
542 features.find(feat => { |
a606d003730c
client: spuc12: implemented diagram for reference gauge of bottlenecks
Markus Kottlaender <markus@intevation.de>
parents:
3501
diff
changeset
|
543 return ( |
a606d003730c
client: spuc12: implemented diagram for reference gauge of bottlenecks
Markus Kottlaender <markus@intevation.de>
parents:
3501
diff
changeset
|
544 feat.getId().indexOf("gauges") > -1 && |
a606d003730c
client: spuc12: implemented diagram for reference gauge of bottlenecks
Markus Kottlaender <markus@intevation.de>
parents:
3501
diff
changeset
|
545 feat.get("objname") === f.get("gauge_objname") |
a606d003730c
client: spuc12: implemented diagram for reference gauge of bottlenecks
Markus Kottlaender <markus@intevation.de>
parents:
3501
diff
changeset
|
546 ); |
a606d003730c
client: spuc12: implemented diagram for reference gauge of bottlenecks
Markus Kottlaender <markus@intevation.de>
parents:
3501
diff
changeset
|
547 }) |
a606d003730c
client: spuc12: implemented diagram for reference gauge of bottlenecks
Markus Kottlaender <markus@intevation.de>
parents:
3501
diff
changeset
|
548 ); |
a606d003730c
client: spuc12: implemented diagram for reference gauge of bottlenecks
Markus Kottlaender <markus@intevation.de>
parents:
3501
diff
changeset
|
549 } |
a606d003730c
client: spuc12: implemented diagram for reference gauge of bottlenecks
Markus Kottlaender <markus@intevation.de>
parents:
3501
diff
changeset
|
550 |
a606d003730c
client: spuc12: implemented diagram for reference gauge of bottlenecks
Markus Kottlaender <markus@intevation.de>
parents:
3501
diff
changeset
|
551 // attach nsc data to gauge |
3501
c5c7cc24fe72
client: spuc12: implemented nash sutcliffe for forcast vs reality accuracy indicator
Markus Kottlaender <markus@intevation.de>
parents:
3457
diff
changeset
|
552 if (f.getId().indexOf("gauges") > -1) { |
c5c7cc24fe72
client: spuc12: implemented nash sutcliffe for forcast vs reality accuracy indicator
Markus Kottlaender <markus@intevation.de>
parents:
3457
diff
changeset
|
553 // look for nashSutcliffeOverview in store. If present and |
c5c7cc24fe72
client: spuc12: implemented nash sutcliffe for forcast vs reality accuracy indicator
Markus Kottlaender <markus@intevation.de>
parents:
3457
diff
changeset
|
554 // not older than 15 min use it or fetch new data and store it. |
c5c7cc24fe72
client: spuc12: implemented nash sutcliffe for forcast vs reality accuracy indicator
Markus Kottlaender <markus@intevation.de>
parents:
3457
diff
changeset
|
555 let data = store.getters["gauges/nashSutcliffeOverview"](f); |
c5c7cc24fe72
client: spuc12: implemented nash sutcliffe for forcast vs reality accuracy indicator
Markus Kottlaender <markus@intevation.de>
parents:
3457
diff
changeset
|
556 if ( |
c5c7cc24fe72
client: spuc12: implemented nash sutcliffe for forcast vs reality accuracy indicator
Markus Kottlaender <markus@intevation.de>
parents:
3457
diff
changeset
|
557 data && |
c5c7cc24fe72
client: spuc12: implemented nash sutcliffe for forcast vs reality accuracy indicator
Markus Kottlaender <markus@intevation.de>
parents:
3457
diff
changeset
|
558 new Date().getTime() - data.createdAt.getTime() < 900000 |
c5c7cc24fe72
client: spuc12: implemented nash sutcliffe for forcast vs reality accuracy indicator
Markus Kottlaender <markus@intevation.de>
parents:
3457
diff
changeset
|
559 ) { |
c5c7cc24fe72
client: spuc12: implemented nash sutcliffe for forcast vs reality accuracy indicator
Markus Kottlaender <markus@intevation.de>
parents:
3457
diff
changeset
|
560 f.set("nsc_data", data.data); |
c5c7cc24fe72
client: spuc12: implemented nash sutcliffe for forcast vs reality accuracy indicator
Markus Kottlaender <markus@intevation.de>
parents:
3457
diff
changeset
|
561 } else { |
c5c7cc24fe72
client: spuc12: implemented nash sutcliffe for forcast vs reality accuracy indicator
Markus Kottlaender <markus@intevation.de>
parents:
3457
diff
changeset
|
562 data = await store.dispatch( |
c5c7cc24fe72
client: spuc12: implemented nash sutcliffe for forcast vs reality accuracy indicator
Markus Kottlaender <markus@intevation.de>
parents:
3457
diff
changeset
|
563 "gauges/loadNashSutcliffeForOverview", |
c5c7cc24fe72
client: spuc12: implemented nash sutcliffe for forcast vs reality accuracy indicator
Markus Kottlaender <markus@intevation.de>
parents:
3457
diff
changeset
|
564 f.get("isrs_code") |
c5c7cc24fe72
client: spuc12: implemented nash sutcliffe for forcast vs reality accuracy indicator
Markus Kottlaender <markus@intevation.de>
parents:
3457
diff
changeset
|
565 ); |
c5c7cc24fe72
client: spuc12: implemented nash sutcliffe for forcast vs reality accuracy indicator
Markus Kottlaender <markus@intevation.de>
parents:
3457
diff
changeset
|
566 if (data) { |
c5c7cc24fe72
client: spuc12: implemented nash sutcliffe for forcast vs reality accuracy indicator
Markus Kottlaender <markus@intevation.de>
parents:
3457
diff
changeset
|
567 store.commit("gauges/addNashSutcliffeOverviewEntry", { |
c5c7cc24fe72
client: spuc12: implemented nash sutcliffe for forcast vs reality accuracy indicator
Markus Kottlaender <markus@intevation.de>
parents:
3457
diff
changeset
|
568 feature: f, |
c5c7cc24fe72
client: spuc12: implemented nash sutcliffe for forcast vs reality accuracy indicator
Markus Kottlaender <markus@intevation.de>
parents:
3457
diff
changeset
|
569 data, |
c5c7cc24fe72
client: spuc12: implemented nash sutcliffe for forcast vs reality accuracy indicator
Markus Kottlaender <markus@intevation.de>
parents:
3457
diff
changeset
|
570 createdAt: new Date() |
c5c7cc24fe72
client: spuc12: implemented nash sutcliffe for forcast vs reality accuracy indicator
Markus Kottlaender <markus@intevation.de>
parents:
3457
diff
changeset
|
571 }); |
c5c7cc24fe72
client: spuc12: implemented nash sutcliffe for forcast vs reality accuracy indicator
Markus Kottlaender <markus@intevation.de>
parents:
3457
diff
changeset
|
572 f.set("nsc_data", data); |
c5c7cc24fe72
client: spuc12: implemented nash sutcliffe for forcast vs reality accuracy indicator
Markus Kottlaender <markus@intevation.de>
parents:
3457
diff
changeset
|
573 } |
c5c7cc24fe72
client: spuc12: implemented nash sutcliffe for forcast vs reality accuracy indicator
Markus Kottlaender <markus@intevation.de>
parents:
3457
diff
changeset
|
574 } |
c5c7cc24fe72
client: spuc12: implemented nash sutcliffe for forcast vs reality accuracy indicator
Markus Kottlaender <markus@intevation.de>
parents:
3457
diff
changeset
|
575 } |
c5c7cc24fe72
client: spuc12: implemented nash sutcliffe for forcast vs reality accuracy indicator
Markus Kottlaender <markus@intevation.de>
parents:
3457
diff
changeset
|
576 } |
3434
9fba1be118e7
client: data accuracy: Show diagrams for gauges, bottlenecks and stretches on map.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3433
diff
changeset
|
577 ) |
9fba1be118e7
client: data accuracy: Show diagrams for gauges, bottlenecks and stretches on map.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3433
diff
changeset
|
578 ); |
9fba1be118e7
client: data accuracy: Show diagrams for gauges, bottlenecks and stretches on map.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3433
diff
changeset
|
579 return new VectorLayer({ |
9fba1be118e7
client: data accuracy: Show diagrams for gauges, bottlenecks and stretches on map.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3433
diff
changeset
|
580 id: "DATAAVAILABILITY", |
9fba1be118e7
client: data accuracy: Show diagrams for gauges, bottlenecks and stretches on map.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3433
diff
changeset
|
581 label: "Data Availability/Accuracy", |
9fba1be118e7
client: data accuracy: Show diagrams for gauges, bottlenecks and stretches on map.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3433
diff
changeset
|
582 forLegendStyle: { point: true, resolution: 16 }, |
9fba1be118e7
client: data accuracy: Show diagrams for gauges, bottlenecks and stretches on map.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3433
diff
changeset
|
583 visible: false, |
9fba1be118e7
client: data accuracy: Show diagrams for gauges, bottlenecks and stretches on map.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3433
diff
changeset
|
584 zIndex: 1, |
9fba1be118e7
client: data accuracy: Show diagrams for gauges, bottlenecks and stretches on map.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3433
diff
changeset
|
585 style: styles.dataAvailability, |
9fba1be118e7
client: data accuracy: Show diagrams for gauges, bottlenecks and stretches on map.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3433
diff
changeset
|
586 source |
9fba1be118e7
client: data accuracy: Show diagrams for gauges, bottlenecks and stretches on map.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3433
diff
changeset
|
587 }); |
9fba1be118e7
client: data accuracy: Show diagrams for gauges, bottlenecks and stretches on map.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3433
diff
changeset
|
588 })(), |
3081
9107c959bb3b
client: Changed distance marks ashore to WMS layer.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3075
diff
changeset
|
589 new ImageLayer({ |
9107c959bb3b
client: Changed distance marks ashore to WMS layer.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3075
diff
changeset
|
590 id: "DISTANCEMARKS", |
9107c959bb3b
client: Changed distance marks ashore to WMS layer.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3075
diff
changeset
|
591 label: "Distance Marks", |
9107c959bb3b
client: Changed distance marks ashore to WMS layer.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3075
diff
changeset
|
592 maxResolution: 10, |
9107c959bb3b
client: Changed distance marks ashore to WMS layer.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3075
diff
changeset
|
593 minResolution: 0, |
9107c959bb3b
client: Changed distance marks ashore to WMS layer.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3075
diff
changeset
|
594 source: new ImageSource({ |
9107c959bb3b
client: Changed distance marks ashore to WMS layer.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3075
diff
changeset
|
595 url: window.location.origin + "/api/internal/wms", |
9107c959bb3b
client: Changed distance marks ashore to WMS layer.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3075
diff
changeset
|
596 params: { |
9107c959bb3b
client: Changed distance marks ashore to WMS layer.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3075
diff
changeset
|
597 LAYERS: "distance_marks_ashore_geoserver", |
9107c959bb3b
client: Changed distance marks ashore to WMS layer.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3075
diff
changeset
|
598 VERSION: "1.1.1", |
9107c959bb3b
client: Changed distance marks ashore to WMS layer.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3075
diff
changeset
|
599 TILED: true |
9107c959bb3b
client: Changed distance marks ashore to WMS layer.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3075
diff
changeset
|
600 }, |
9107c959bb3b
client: Changed distance marks ashore to WMS layer.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3075
diff
changeset
|
601 imageLoadFunction: function(tile, src) { |
9107c959bb3b
client: Changed distance marks ashore to WMS layer.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3075
diff
changeset
|
602 HTTP.get(src, { |
9107c959bb3b
client: Changed distance marks ashore to WMS layer.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3075
diff
changeset
|
603 headers: { |
9107c959bb3b
client: Changed distance marks ashore to WMS layer.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3075
diff
changeset
|
604 "X-Gemma-Auth": localStorage.getItem("token") |
9107c959bb3b
client: Changed distance marks ashore to WMS layer.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3075
diff
changeset
|
605 }, |
9107c959bb3b
client: Changed distance marks ashore to WMS layer.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3075
diff
changeset
|
606 responseType: "blob" |
9107c959bb3b
client: Changed distance marks ashore to WMS layer.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3075
diff
changeset
|
607 }).then(response => { |
9107c959bb3b
client: Changed distance marks ashore to WMS layer.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3075
diff
changeset
|
608 tile.getImage().src = URL.createObjectURL(response.data); |
9107c959bb3b
client: Changed distance marks ashore to WMS layer.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3075
diff
changeset
|
609 }); |
9107c959bb3b
client: Changed distance marks ashore to WMS layer.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3075
diff
changeset
|
610 } // TODO tile.setState(TileState.ERROR); |
9107c959bb3b
client: Changed distance marks ashore to WMS layer.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3075
diff
changeset
|
611 }) |
9107c959bb3b
client: Changed distance marks ashore to WMS layer.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3075
diff
changeset
|
612 }), |
3029
81c2e561fe03
Use distance marks an axis via WMS. Added legend and featureinfo.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3021
diff
changeset
|
613 new ImageLayer({ |
81c2e561fe03
Use distance marks an axis via WMS. Added legend and featureinfo.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3021
diff
changeset
|
614 id: "DISTANCEMARKSAXIS", |
81c2e561fe03
Use distance marks an axis via WMS. Added legend and featureinfo.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3021
diff
changeset
|
615 label: "Distance Marks, Axis", |
81c2e561fe03
Use distance marks an axis via WMS. Added legend and featureinfo.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3021
diff
changeset
|
616 source: new ImageSource({ |
81c2e561fe03
Use distance marks an axis via WMS. Added legend and featureinfo.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3021
diff
changeset
|
617 url: window.location.origin + "/api/internal/wms", |
3031 | 618 params: { |
619 LAYERS: "distance_marks_geoserver", | |
620 VERSION: "1.1.1", | |
621 TILED: true | |
622 }, | |
3029
81c2e561fe03
Use distance marks an axis via WMS. Added legend and featureinfo.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3021
diff
changeset
|
623 imageLoadFunction: function(tile, src) { |
81c2e561fe03
Use distance marks an axis via WMS. Added legend and featureinfo.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3021
diff
changeset
|
624 HTTP.get(src, { |
81c2e561fe03
Use distance marks an axis via WMS. Added legend and featureinfo.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3021
diff
changeset
|
625 headers: { |
81c2e561fe03
Use distance marks an axis via WMS. Added legend and featureinfo.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3021
diff
changeset
|
626 "X-Gemma-Auth": localStorage.getItem("token") |
81c2e561fe03
Use distance marks an axis via WMS. Added legend and featureinfo.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3021
diff
changeset
|
627 }, |
81c2e561fe03
Use distance marks an axis via WMS. Added legend and featureinfo.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3021
diff
changeset
|
628 responseType: "blob" |
81c2e561fe03
Use distance marks an axis via WMS. Added legend and featureinfo.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3021
diff
changeset
|
629 }).then(response => { |
81c2e561fe03
Use distance marks an axis via WMS. Added legend and featureinfo.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3021
diff
changeset
|
630 tile.getImage().src = URL.createObjectURL(response.data); |
81c2e561fe03
Use distance marks an axis via WMS. Added legend and featureinfo.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3021
diff
changeset
|
631 }); |
81c2e561fe03
Use distance marks an axis via WMS. Added legend and featureinfo.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3021
diff
changeset
|
632 } // TODO tile.setState(TileState.ERROR); |
81c2e561fe03
Use distance marks an axis via WMS. Added legend and featureinfo.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3021
diff
changeset
|
633 }) |
81c2e561fe03
Use distance marks an axis via WMS. Added legend and featureinfo.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3021
diff
changeset
|
634 }), |
3011
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
635 (function() { |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
636 const source = new VectorSource({ strategy: bboxStrategy }); |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
637 source.setLoader( |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
638 buildVectorLoader( |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
639 { |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
640 featureTypes: ["gauges_geoserver"], |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
641 geometryName: "geom" |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
642 }, |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
643 source |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
644 ) |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
645 ); |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
646 return new VectorLayer({ |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
647 id: "GAUGES", |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
648 label: "Gauges", |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
649 forLegendStyle: { point: true, resolution: 8 }, |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
650 visible: true, |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
651 style: styles.gauge, |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
652 maxResolution: 100, |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
653 minResolution: 0, |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
654 source |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
655 }); |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
656 })(), |
3123
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
657 DRAWLAYER, |
f0af359391a0
client: map layers: share certain layer objects across map
Markus Kottlaender <markus@intevation.de>
parents:
3102
diff
changeset
|
658 CUTLAYER |
3011
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
659 ] |
fc8fbea24568
client: moved map component, layer factory and styles to own subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
660 }; |
3021
2e2a271c1026
client: fixed layer factory to actually serve different objects
Markus Kottlaender <markus@intevation.de>
parents:
3011
diff
changeset
|
661 } |