From c6ad9404002f6bd3c647a260b3f16b7bf600fa7a Mon Sep 17 00:00:00 2001 From: Ryan Hodges Date: Fri, 18 Sep 2026 09:41:48 -0700 Subject: [PATCH] AttributeInfo field labels work for all layer types tied to GenerateAttributeReport --- visualize/static/js/wrappers/ol8/ol8_events.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/visualize/static/js/wrappers/ol8/ol8_events.js b/visualize/static/js/wrappers/ol8/ol8_events.js index 9879c162..d9d74241 100644 --- a/visualize/static/js/wrappers/ol8/ol8_events.js +++ b/visualize/static/js/wrappers/ol8/ol8_events.js @@ -499,9 +499,14 @@ app.wrapper.events.formatAttributeReportEntry = function(feature, mp_layer) { var attr_keys = Object.keys(feature); var attr_fields = mp_layer.attributes; var report_attributes = {}; + let field_label = ''; for (var i = 0; i < attr_fields.length; i++) { + field_label = attr_fields[i].display; + if (attr_fields[i].hasOwnProperty('label') && !!attr_fields[i].label) { + field_label = attr_fields[i].label; + } report_attributes[attr_fields[i].field] = { - display: attr_fields[i].display, + display: field_label, // mp_layer.attributes is ordered by 'order' on the server side. We can derive effective order from the list's own order order: i, precision: attr_fields[i].precision