Mercurial > gemma
diff client/src/layers/Identify.vue @ 793:073394629ec6
client: add measurement and improve identify
* Only display features that have an Id in the identify box, because
during the drawmode, after the first click, there is an additional
feature that has no Id. Probably this is the point.
* Add setting an Id to the feature that is drawn, which makes it show
up in the identify box.
* Add code to add the length of the drawn line to the store and a rounded
value to the feature property. This creates a simple measurement tool,
if the feature box is shown.
author | Bernhard Reiter <bernhard@intevation.de> |
---|---|
date | Thu, 27 Sep 2018 10:02:39 +0200 |
parents | 1d8ccdb532de |
children | 383fac3e5d1e |
line wrap: on
line diff
--- a/client/src/layers/Identify.vue Thu Sep 27 09:55:25 2018 +0200 +++ b/client/src/layers/Identify.vue Thu Sep 27 10:02:39 2018 +0200 @@ -13,10 +13,12 @@ <hr> <div class="d-flex flex-column"> <div v-for="feature of identifiedFeatures" :key="feature.getId()"> - {{ feature.getId().replace(/[.][^.]*$/,"") /* cut away everything from the last . to the end */}}: - <small v-for="(value, key) in prepareProperties(feature)" :key="key"> - <div v-if="value">{{key}}:{{value}}</div> - </small> + <div v-if="feature.getId()"> + {{ feature.getId().replace(/[.][^.]*$/,"") /* cut away everything from the last . to the end */}}: + <small v-for="(value, key) in prepareProperties(feature)" :key="key"> + <div v-if="value">{{key}}:{{value}}</div> + </small> + </div> </div> </div> </div>