Mercurial > gemma
comparison client/src/components/map/Map.vue @ 4422:562f9da8ba0b
map: restore zoom to extent functionality
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Wed, 18 Sep 2019 15:33:43 +0200 |
parents | b4f04f9076b2 |
children | a769e14f4baf |
comparison
equal
deleted
inserted
replaced
4421:b4f04f9076b2 | 4422:562f9da8ba0b |
---|---|
192 "X-Gemma-Auth": localStorage.getItem("token"), | 192 "X-Gemma-Auth": localStorage.getItem("token"), |
193 "Content-type": "text/xml; charset=UTF-8" | 193 "Content-type": "text/xml; charset=UTF-8" |
194 } | 194 } |
195 }) | 195 }) |
196 .then(response => { | 196 .then(response => { |
197 this.mountMap(); | |
197 this.$store.dispatch("map/moveToBoundingBox", { | 198 this.$store.dispatch("map/moveToBoundingBox", { |
198 boundingBox: [ | 199 boundingBox: [ |
199 response.data.extent.x1, | 200 response.data.extent.x1, |
200 response.data.extent.y1, | 201 response.data.extent.y1, |
201 response.data.extent.x2, | 202 response.data.extent.x2, |
205 preventZoomOut: true, | 206 preventZoomOut: true, |
206 duration: 0 | 207 duration: 0 |
207 }); | 208 }); |
208 }) | 209 }) |
209 .catch(error => { | 210 .catch(error => { |
211 this.mountMap(); | |
210 const { status, data } = error.response; | 212 const { status, data } = error.response; |
211 displayError({ | 213 displayError({ |
212 title: this.$gettext("Backend Error"), | 214 title: this.$gettext("Backend Error"), |
213 message: `${status}: ${data.message || data}` | 215 message: `${status}: ${data.message || data}` |
214 }); | 216 }); |
215 }) | |
216 .finally(() => { | |
217 this.mountMap(); | |
218 }); | 217 }); |
219 } else { | 218 } else { |
220 this.mountMap(); | 219 this.mountMap(); |
221 } | 220 } |
222 }, | 221 }, |