You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mapeo Mobile and Desktop (Observation View) support tag values to be non-strings, e.g. they could be a number, boolean or array (for select multiple fields). iD Editor (and I think the OSM API) only recognizes string values. This could cause errors or bugs when editing observations in the territory view. It could either cause iD to crash, or result in a value being converted to a string.
We haven't actually implemented number or boolean fields in Mapeo Mobile yet, but we have added support for multi-select fields, which store the value as an Array. This is the only place currently where we would encounter non-string tags "in the wild".
One (hacky) approach would be to strip non-string tags from the observation when we convert it, and add them back when it is edited. This might cause some user confusion because some fields would appear empty (when they actually have non-string data) and if they edited those empty fields then the edits would be overwritten (with the non-string values from the server). However, we could also modify the presets that are passed to iD Editor to remove any fields which are non-string, which would hide the fields completely from the Territory view.
The other option would be to add support for different types in the iD code, but this would be a fair amount of work.
TL;DR in obj2osm remove tag properties whose typeof tag[key] !== string and put them back in osm2obj
The text was updated successfully, but these errors were encountered:
Mapeo Mobile and Desktop (Observation View) support tag values to be non-strings, e.g. they could be a number, boolean or array (for select multiple fields). iD Editor (and I think the OSM API) only recognizes string values. This could cause errors or bugs when editing observations in the territory view. It could either cause iD to crash, or result in a value being converted to a string.
We haven't actually implemented number or boolean fields in Mapeo Mobile yet, but we have added support for multi-select fields, which store the value as an Array. This is the only place currently where we would encounter non-string tags "in the wild".
One (hacky) approach would be to strip non-string tags from the observation when we convert it, and add them back when it is edited. This might cause some user confusion because some fields would appear empty (when they actually have non-string data) and if they edited those empty fields then the edits would be overwritten (with the non-string values from the server). However, we could also modify the presets that are passed to iD Editor to remove any fields which are non-string, which would hide the fields completely from the Territory view.
The other option would be to add support for different types in the iD code, but this would be a fair amount of work.
TL;DR in
obj2osm
remove tag properties whosetypeof tag[key] !== string
and put them back inosm2obj
The text was updated successfully, but these errors were encountered: