Mercurial > gemma
comparison client/src/components/Maplayer.vue @ 2966:4bc2cc6364bc
client: inlined component property
author | Markus Kottlaender <markus@intevation.de> |
---|---|
date | Mon, 08 Apr 2019 17:44:49 +0200 |
parents | 8acd0a235a94 |
children | 61f69e8919d3 |
comparison
equal
deleted
inserted
replaced
2965:8acd0a235a94 | 2966:4bc2cc6364bc |
---|---|
47 /* eslint-disable no-console */ | 47 /* eslint-disable no-console */ |
48 export default { | 48 export default { |
49 name: "maplayer", | 49 name: "maplayer", |
50 data() { | 50 data() { |
51 return { | 51 return { |
52 projection: "EPSG:3857", | |
53 splitscreen: false | 52 splitscreen: false |
54 }; | 53 }; |
55 }, | 54 }, |
56 computed: { | 55 computed: { |
57 ...mapState("map", [ | 56 ...mapState("map", [ |
175 controls: [], | 174 controls: [], |
176 view: new View({ | 175 view: new View({ |
177 center: [this.extent.lon, this.extent.lat], | 176 center: [this.extent.lon, this.extent.lat], |
178 minZoom: 5, // restrict zooming out to ~size of Europe for width 1000px | 177 minZoom: 5, // restrict zooming out to ~size of Europe for width 1000px |
179 zoom: this.extent.zoom, | 178 zoom: this.extent.zoom, |
180 projection: this.projection | 179 projection: "EPSG:3857" |
181 }) | 180 }) |
182 }); | 181 }); |
183 map.on("moveend", event => { | 182 map.on("moveend", event => { |
184 const center = event.map.getView().getCenter(); | 183 const center = event.map.getView().getCenter(); |
185 this.$store.commit("map/extent", { | 184 this.$store.commit("map/extent", { |