Mercurial > gemma
comparison client/src/map/store.js @ 733:e57955c1996f
client: improve code structure
* Change loading strategy for waterway axis to bbox mainly for consistency.
Its size is small compared to other WFS features, so the speed gain
is not big by changing to dynamic loading.
* Use getLayerByName() instead of hard references.
* Refactor section about loading layers to be shorter and to reference the
name of each layer only once.
author | Bernhard Reiter <bernhard@intevation.de> |
---|---|
date | Mon, 24 Sep 2018 09:23:09 +0200 |
parents | 22159077b564 |
children | f2691e0d4970 |
comparison
equal
deleted
inserted
replaced
732:39b5cf9a6b8f | 733:e57955c1996f |
---|---|
73 isVisible: true | 73 isVisible: true |
74 }, | 74 }, |
75 { | 75 { |
76 name: "Waterway Axis", | 76 name: "Waterway Axis", |
77 data: new VectorLayer({ | 77 data: new VectorLayer({ |
78 source: new VectorSource(), | 78 source: new VectorSource({ |
79 strategy: bboxStrategy | |
80 }), | |
79 style: new Style({ | 81 style: new Style({ |
80 stroke: new Stroke({ | 82 stroke: new Stroke({ |
81 color: "rgba(0, 0, 255, .5)", | 83 color: "rgba(0, 0, 255, .5)", |
82 lineDash: [5, 5], | 84 lineDash: [5, 5], |
83 width: 2 | 85 width: 2 |