Mercurial > gemma
comparison client/src/store/map.js @ 2486:bca9a7a89f28 octree-diff
Merged default into octree-diff branch.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Fri, 01 Mar 2019 18:28:50 +0100 |
parents | 960550ccca55 |
children | 194b42f28ea3 |
comparison
equal
deleted
inserted
replaced
2485:86173ac7f222 | 2486:bca9a7a89f28 |
---|---|
18 | 18 |
19 import TileWMS from "ol/source/TileWMS.js"; | 19 import TileWMS from "ol/source/TileWMS.js"; |
20 import { Tile as TileLayer, Vector as VectorLayer } from "ol/layer.js"; | 20 import { Tile as TileLayer, Vector as VectorLayer } from "ol/layer.js"; |
21 import OSM from "ol/source/OSM"; | 21 import OSM from "ol/source/OSM"; |
22 import Draw from "ol/interaction/Draw.js"; | 22 import Draw from "ol/interaction/Draw.js"; |
23 import { Icon, Stroke, Style, Fill, Text, Circle } from "ol/style.js"; | 23 import { |
24 Icon, | |
25 Stroke, | |
26 Style, | |
27 Fill, | |
28 Text, | |
29 Circle, | |
30 RegularShape | |
31 } from "ol/style.js"; | |
24 import VectorSource from "ol/source/Vector.js"; | 32 import VectorSource from "ol/source/Vector.js"; |
25 import Point from "ol/geom/Point.js"; | 33 import Point from "ol/geom/Point.js"; |
26 import { bbox as bboxStrategy } from "ol/loadingstrategy"; | 34 import { bbox as bboxStrategy } from "ol/loadingstrategy"; |
27 import { HTTP } from "../lib/http"; | 35 import { HTTP } from "../lib/http"; |
28 import { fromLonLat } from "ol/proj"; | 36 import { fromLonLat } from "ol/proj"; |
45 WATERWAYPROFILES: "Waterway Profiles", | 53 WATERWAYPROFILES: "Waterway Profiles", |
46 BOTTLENECKS: "Bottlenecks", | 54 BOTTLENECKS: "Bottlenecks", |
47 BOTTLENECKISOLINE: "Bottleneck isolines", | 55 BOTTLENECKISOLINE: "Bottleneck isolines", |
48 DISTANCEMARKS: "Distance marks", | 56 DISTANCEMARKS: "Distance marks", |
49 DISTANCEMARKSAXIS: "Distance marks, Axis", | 57 DISTANCEMARKSAXIS: "Distance marks, Axis", |
58 GAUGES: "Gauges", | |
50 DRAWTOOL: "Draw Tool", | 59 DRAWTOOL: "Draw Tool", |
51 CUTTOOL: "Cut Tool" | 60 CUTTOOL: "Cut Tool" |
52 }; | 61 }; |
53 | 62 |
54 const moveMap = ({ view, extent, zoom, preventZoomOut }) => { | 63 const moveMap = ({ view, extent, zoom, preventZoomOut }) => { |
365 } | 374 } |
366 } | 375 } |
367 }), | 376 }), |
368 isVisible: true, | 377 isVisible: true, |
369 showInLegend: true | 378 showInLegend: true |
379 }, | |
380 { | |
381 name: LAYERS.GAUGES, | |
382 forLegendStyle: { point: true, resolution: 8 }, | |
383 data: new VectorLayer({ | |
384 source: new VectorSource({ | |
385 strategy: bboxStrategy | |
386 }), | |
387 style: function(feature) { | |
388 return new Style({ | |
389 image: new RegularShape({ | |
390 radius: 6, | |
391 fill: new Fill({ color: "rgba(255, 255, 0, 0.1)" }), | |
392 stroke: new Stroke({ color: "red", width: 1 }), | |
393 points: 3, | |
394 rotation: 0, | |
395 angle: 0 | |
396 }), | |
397 text: new Text({ | |
398 font: '10px "Open Sans", "sans-serif"', | |
399 offsetY: 10, | |
400 fill: new Fill({ | |
401 color: "black" | |
402 }), | |
403 text: feature.get("objname") | |
404 }) | |
405 }); | |
406 }, | |
407 maxResolution: 100, | |
408 minResolution: 0 | |
409 }), | |
410 isVisible: true, | |
411 showInLegend: true, | |
370 }, | 412 }, |
371 { | 413 { |
372 name: LAYERS.DRAWTOOL, | 414 name: LAYERS.DRAWTOOL, |
373 data: new VectorLayer({ | 415 data: new VectorLayer({ |
374 source: new VectorSource({ wrapX: false }), | 416 source: new VectorSource({ wrapX: false }), |