Open johnnyblasta opened 2 years ago
Great suggestion!
This idea made QGIS' handling of its "Value Map" in its attribute form come to mind.
Perhaps there is something to be gained by having a look at the https://origo-map.github.io/origo-documentation/latest/#editor-attributes while implementing this.
Like, instead of adding replaceValue
as a new option, maybe the options
functionality could be expanded to use a key/value map. Then that could work just as you suggested when opening a feature info window, but supply a drop down with permitted values when editing?
Great suggestion!
This idea made QGIS' handling of its "Value Map" in its attribute form come to mind.
Perhaps there is something to be gained by having a look at the https://origo-map.github.io/origo-documentation/latest/#editor-attributes while implementing this.
Like, instead of adding
replaceValue
as a new option, maybe theoptions
functionality could be expanded to use a key/value map. Then that could work just as you suggested when opening a feature info window, but supply a drop down with permitted values when editing?
I've already implemented it but can look to see if a rework is appropriate.
Is your feature request related to a problem? Please describe. When getting data from external source and the data is in english f.e. it would be nice to be able to replace the values with the swedish translation. The first use case in my mind is when the attribute contains a short list of known values f.e. status or some property.
Describe the solution you'd like I would like to be able to add a key/values object specifying the what should be replaced. If the value isn't in the list the original value is kept.