I have a strange problem with several of my custom presets that I've tried to fix many times without success. Below is my XML preset for tagging certain waterway features. When I invoke it on a new untagged river or stream way, the section to tag source:name (a multiselect key) is always grayed out. However, if the way is already tagged with waterway=stream or waterway=river, that section behaves as it should and I can select one of the values from the source:name multiselect and apply the tags. Furthermore, the default note "Actual direction of flow unknown." only appears in the first scenario. If there is an existing waterway tag as in the second situation, it does not appear. The identical behavior is observed in the second item, Lakes/Ponds. If no tags exist on a closedway, the source:name section is grayed out. If a water=pond, or water=lake tag exists before the preset is invoked, everything works as it should. Can someone lend a hand? Any help or suggestions will be most appreciated. Dave (Note: I have replaced < and > with @ symbols to allow XML code to display herein. Also, all "_" get automatically removed when posting XML code)
asked 11 Nov '16, 01:10 AlaskaDave scai ♦ |
Hi @AlaskaDave, However, I could not figure out how to get the default value for optional attributes for nodes/ways with pre-existing tags. Could not find anything in the documentation. I would imagine that it is the normal behavior. If the tags are already present, one may not be required to put a default attribute which is optional. Hope this helps. answered 12 Nov '16, 07:28 primej 1
Many thanks. I tried removing the delete_if_empty parameters first and that seemed to do the trick. I did not know that it had been deprecated. My multiselect and combo statements work as expected now even with the default set to "Bing" or some other value. I also added the values_sort="false" parameter to my combo and multiselect directives because that behaviour, new to JOSM for the past several releases AFAIK, was annoying me.
(12 Nov '16, 12:08)
AlaskaDave
|
The main difference that I see with the preset that I maintain (BENELUX) is that I keep all combo and multiselects in the optional part. I do not notice the behaviour that you see. answered 11 Nov '16, 07:01 escada Thanks escada - That's not it. I moved those lines into the optional section and they still exhibit the same behavior.
(11 Nov '16, 08:09)
AlaskaDave
|