Mercurial > gemma
diff 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 |
line wrap: on
line diff
--- a/client/src/components/identify/Identify.vue Tue Mar 19 16:01:58 2019 +0100 +++ b/client/src/components/identify/Identify.vue Tue Mar 19 16:32:07 2019 +0100 @@ -33,7 +33,10 @@ class="d-flex justify-content-between px-2" > <b>{{ $gettext(prop.key) }}</b> - {{ prop.val }} + <span v-if="prop.key != 'bbox'">{{ prop.val }}</span> + <a v-else @click="zoomTo(prop.val)" href="#" + ><translate>Zoom to</translate></a + > </small> </div> <div @@ -111,6 +114,7 @@ */ import { mapState, mapGetters } from "vuex"; import { formatter } from "./formatter"; +import { displayInfo } from "@/lib/errors.js"; export default { name: "identify", @@ -121,6 +125,15 @@ ...mapState("map", ["currentMeasurement"]) }, methods: { + zoomTo(val) { + displayInfo({ + message: + "Coordinates:\n" + + JSON.stringify(val) + .split(",") + .join("\n") + }); + }, close() { this.$store.commit("application/showIdentify", false); },