Mercurial > gemma
changeset 3031:f99f0cbb843f
client:linting
author | Fadi Abbud <fadi.abbud@intevation.de> |
---|---|
date | Fri, 12 Apr 2019 13:07:48 +0200 |
parents | 3524bbc5067e |
children | 3aca036e11f1 c2c1e3e3af1c |
files | client/src/components/layers/LegendElement.vue client/src/components/map/layers.js client/src/store/map.js |
diffstat | 3 files changed, 24 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/components/layers/LegendElement.vue Fri Apr 12 12:51:26 2019 +0200 +++ b/client/src/components/layers/LegendElement.vue Fri Apr 12 13:07:48 2019 +0200 @@ -65,22 +65,25 @@ if (this.layer.getType() == "VECTOR") { this.initMap(); } else { - if (this.layer.get("id") === "OPENSTREETMAP" || + if ( + this.layer.get("id") === "OPENSTREETMAP" || this.layer.get("id") === "INLANDECDIS" || this.layer.get("id") === "BOTTLENECKISOLINE" || this.layer.get("id") === "DIFFERENCES" ) { // TODO: Do something useful? - return + return; } - let img = document.createElement("img") - img.setAttribute("style", "margin: 0 auto;display: flex;") + let img = document.createElement("img"); + img.setAttribute("style", "margin: 0 auto;display: flex;"); if (this.layer.get("id") === "DISTANCEMARKSAXIS") { - img.setAttribute("src", require("@/assets/distancemarks-axis.png")) - } - else { + img.setAttribute("src", require("@/assets/distancemarks-axis.png")); + } else { // for simple WMS legends. - let url = `/internal/wms?REQUEST=GetLegendGraphic&VERSION=1.0.0&FORMAT=image/png&WIDTH=20&HEIGHT=20&LAYER=`+this.layer.getSource().getParams().LAYERS + `&legend_options=columns:4;fontAntiAliasing:true` + let url = + `/internal/wms?REQUEST=GetLegendGraphic&VERSION=1.0.0&FORMAT=image/png&WIDTH=20&HEIGHT=20&LAYER=` + + this.layer.getSource().getParams().LAYERS + + `&legend_options=columns:4;fontAntiAliasing:true`; HTTP.get(url, { headers: { "X-Gemma-Auth": localStorage.getItem("token")
--- a/client/src/components/map/layers.js Fri Apr 12 12:51:26 2019 +0200 +++ b/client/src/components/map/layers.js Fri Apr 12 13:07:48 2019 +0200 @@ -1,5 +1,9 @@ import TileWMS from "ol/source/TileWMS"; -import { Tile as TileLayer, Vector as VectorLayer, Image as ImageLayer } from "ol/layer"; +import { + Tile as TileLayer, + Vector as VectorLayer, + Image as ImageLayer +} from "ol/layer"; import OSM from "ol/source/OSM"; import { Icon, Stroke, Style } from "ol/style"; import VectorSource from "ol/source/Vector"; @@ -366,7 +370,11 @@ label: "Distance Marks, Axis", source: new ImageSource({ url: window.location.origin + "/api/internal/wms", - params: { LAYERS: "distance_marks_geoserver", VERSION: "1.1.1", TILED: true }, + params: { + LAYERS: "distance_marks_geoserver", + VERSION: "1.1.1", + TILED: true + }, imageLoadFunction: function(tile, src) { HTTP.get(src, { headers: {
--- a/client/src/store/map.js Fri Apr 12 12:51:26 2019 +0200 +++ b/client/src/store/map.js Fri Apr 12 13:07:48 2019 +0200 @@ -83,7 +83,9 @@ state.identifiedFeatures = identifiedFeatures; }, addIdentifiedFeatures: (state, identifiedFeatures) => { - state.identifiedFeatures = state.identifiedFeatures.concat(identifiedFeatures); + state.identifiedFeatures = state.identifiedFeatures.concat( + identifiedFeatures + ); console.log(state.identifiedFeatures); }, setCurrentMeasurement: (state, measurement) => {