Mercurial > gemma
comparison client/src/components/identify/Identify.vue @ 2735:3c2ac140ad30
identify_tool: zoom to BBox PoC implemented
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Tue, 19 Mar 2019 16:32:07 +0100 |
parents | bb5286acfee2 |
children | 4063adda3095 |
comparison
equal
deleted
inserted
replaced
2734:375c9dd935ad | 2735:3c2ac140ad30 |
---|---|
31 :key="prop.key" | 31 :key="prop.key" |
32 v-if="prop.val" | 32 v-if="prop.val" |
33 class="d-flex justify-content-between px-2" | 33 class="d-flex justify-content-between px-2" |
34 > | 34 > |
35 <b>{{ $gettext(prop.key) }}</b> | 35 <b>{{ $gettext(prop.key) }}</b> |
36 {{ prop.val }} | 36 <span v-if="prop.key != 'bbox'">{{ prop.val }}</span> |
37 <a v-else @click="zoomTo(prop.val)" href="#" | |
38 ><translate>Zoom to</translate></a | |
39 > | |
37 </small> | 40 </small> |
38 </div> | 41 </div> |
39 <div | 42 <div |
40 v-if="!currentMeasurement && !filteredIdentifiedFeatures.length" | 43 v-if="!currentMeasurement && !filteredIdentifiedFeatures.length" |
41 class="text-muted small text-center my-auto py-3 px-2" | 44 class="text-muted small text-center my-auto py-3 px-2" |
109 * Bernhard E. Reiter <bernhard.reiter@intevation.de> | 112 * Bernhard E. Reiter <bernhard.reiter@intevation.de> |
110 * Markus Kottländer <markus.kottlaender@intevation.de> | 113 * Markus Kottländer <markus.kottlaender@intevation.de> |
111 */ | 114 */ |
112 import { mapState, mapGetters } from "vuex"; | 115 import { mapState, mapGetters } from "vuex"; |
113 import { formatter } from "./formatter"; | 116 import { formatter } from "./formatter"; |
117 import { displayInfo } from "@/lib/errors.js"; | |
114 | 118 |
115 export default { | 119 export default { |
116 name: "identify", | 120 name: "identify", |
117 computed: { | 121 computed: { |
118 ...mapGetters("application", ["versionStr"]), | 122 ...mapGetters("application", ["versionStr"]), |
119 ...mapState("application", ["showIdentify"]), | 123 ...mapState("application", ["showIdentify"]), |
120 ...mapGetters("map", ["filteredIdentifiedFeatures"]), | 124 ...mapGetters("map", ["filteredIdentifiedFeatures"]), |
121 ...mapState("map", ["currentMeasurement"]) | 125 ...mapState("map", ["currentMeasurement"]) |
122 }, | 126 }, |
123 methods: { | 127 methods: { |
128 zoomTo(val) { | |
129 displayInfo({ | |
130 message: | |
131 "Coordinates:\n" + | |
132 JSON.stringify(val) | |
133 .split(",") | |
134 .join("\n") | |
135 }); | |
136 }, | |
124 close() { | 137 close() { |
125 this.$store.commit("application/showIdentify", false); | 138 this.$store.commit("application/showIdentify", false); |
126 }, | 139 }, |
127 featureId(feature) { | 140 featureId(feature) { |
128 // cut away everything from the last . to the end | 141 // cut away everything from the last . to the end |