comparison client/src/components/map/layers.js @ 4241:27434b0d4d96

Map: setting styles correctly for fairwaydimensions Originally the style of fairwaydimensions was implemented as a function, returning an array of styles. After implementing dynamics for accepting styles from the backend, the style was set as a style object instead of the original function. The fix was done in making both using a function instead of an object. Whether using an object or a function would be better is beyond my understanding of OL and is in the end a matter of taste.
author Thomas Junk <thomas.junk@intevation.de>
date Thu, 22 Aug 2019 10:56:05 +0200
parents a76a6b26e327
children ac99e13e9ca9
comparison
equal deleted inserted replaced
4240:a4f76e170290 4241:27434b0d4d96
11 import { bbox as bboxStrategy } from "ol/loadingstrategy"; 11 import { bbox as bboxStrategy } from "ol/loadingstrategy";
12 import { WFS, GeoJSON } from "ol/format"; 12 import { WFS, GeoJSON } from "ol/format";
13 import OSM from "ol/source/OSM"; 13 import OSM from "ol/source/OSM";
14 import { equalTo } from "ol/format/filter"; 14 import { equalTo } from "ol/format/filter";
15 import { HTTP } from "@/lib/http"; 15 import { HTTP } from "@/lib/http";
16 import styleFactory from "./styles"; 16 import { styleFactory } from "./styles";
17 import store from "@/store/index"; 17 import store from "@/store/index";
18 18
19 const buildVectorLoader = ( 19 const buildVectorLoader = (
20 featureRequestOptions, 20 featureRequestOptions,
21 vectorSource, 21 vectorSource,