diff --git a/src/editing/editFeatureComponent.js b/src/editing/editFeatureComponent.js index c9386d983740..e4aaaf447157 100644 --- a/src/editing/editFeatureComponent.js +++ b/src/editing/editFeatureComponent.js @@ -1283,7 +1283,13 @@ Controller.prototype.openFeatureMenu_ = function (coordinate, features) { /** @type {import('ngeo/Menu').MenuActionOptions[]} */ const actions = []; features.forEach((feature) => { - const label = feature.get('name') ? feature.get('name') : feature.getId(); + let label = null; + const selectionName = this.editableTreeCtrl.node.metadata['editingSelectionAttribute']; + if (selectionName) { + label = feature.get(selectionName); + } else { + label = feature.get('name') ? feature.get('name') : feature.getId(); + } /** @type {import('ngeo/Menu').MenuActionOptions} */ const choice = { cls: '', diff --git a/src/themes.js b/src/themes.js index 3b1cea00591c..98ac3ee7eb24 100644 --- a/src/themes.js +++ b/src/themes.js @@ -228,6 +228,8 @@ * @property {string} [iconUrl] The URL of the icon to display in the layer tree. For every kind of layer. * @property {string} identifierAttributeField The field used in the 'display query window' as feature title. * For WMS layers. + * @property {string} editingSelectionAttribute The field used in the selector tooltip to name the layer when multiple ones are selected on the map. + * For WMS layers. * @property {boolean|undefined} [isChecked=false] Is the layer checked by default. For WMS and WMTS layers. * @property {boolean|undefined} [isExpanded=false] Whether the layer group is expanded by default. For * layer groups (only).