wheelmap-classic
wheelmap-classic copied to clipboard
adding a new node on iOS only saves wheelchair, not toilet
- I'm logged in on the iOS App (3.0.3 Build 209) and add a new node, giving it wheelchair=no and toilets:wheelchair=no and click save.
- I reload after some minutes and find the new node as expected. But the toilets:wheelchair is not set and displayed as "unknown". It is this node: https://www.openstreetmap.org/node/4563117791
- I expected that the toilet tag is also saved.
I just reproduced this today by adding this node: https://www.openstreetmap.org/node/4585169493/history (I removed it to avoid cluttering the OSM with test entries)
Using iPhone again, I added the toilets:wheelchair info to an existing POI and that worked as expected (this one: https://www.openstreetmap.org/node/1395834598 )
@Svenyo can you pleas test this on android?
Writing down my findings so far:
- Android sends
toilet_wheelchairas expected (saw this in the server logs) - According to the logs iPhone does not send
toilet_wheelchair
I also found but not directly related to this issue:
- iPhone sends all data in the request body, sends the API key via HTTP Header
- Android sends all data including the API Key via query parameters
Regarding toilet_wheelchair : This is an invalid tag I was not aware of before. Maybe you mean wheelchair_toilet as described in issue https://github.com/sozialhelden/wheelmap/issues/400 ? (also an invalid tag).
Correct is only toilets:wheelchair=yes/no.
@schultyy the issue here is that toilet is not saved if both attributes are set at the same time (wheelchair and toilets:wheelchair)
Regarding toilet_wheelchair and wheelchair_toilet:
When an API Client (iOS or Android) sends data to create a new POI they send toilet_wheelchair. The API then converts toilet_wheelchair to toilets:wheelchair for OSM.
To narrow the problem down I did the following:
- Wrote some tests to ensure that
wheelchairandtoilets:wheelchairare actually correctly set. This works as expected. - Wrote another test which ensures that the API endpoint correctly passes
wheelchairandtoilets:wheelchairto OpenStreetMap. This works as expected. - I created a new POI via the iPhone application and had a look at the server logs:
I created a new POI for a bakery with
"wheelchair": yesand"toilets:wheelchair": no. The log output shows that the API did not receive the toilet information:
{
"city"=>"Berlin",
"housenumber"=>"60",
"lat"=>"52.50921011145839",
"lon"=>"13.29678519821835",
"name"=>"Ihr Frischebäcker",
"phone"=>"",
"postcode"=>"14057",
"street"=>"Suarezstr",
"type"=>"fast_food",
"website"=>"",
"wheelchair"=>"yes",
"wheelchair_description"=>""
}
This seems to be an issue with the iPhone application only. On Android I can see that toilet_wheelchair is passed correctly.
Should we open an issue about this on https://github.com/sozialhelden/wheelmap-iphone2/issues ?
I will discuss this with @RaphaelHeber , thanks.
for reference, I reported it here: https://smartmobilefactory.atlassian.net/projects/WHEELMAP/issues/WHEELMAP-282
State of the iOS App:
wheelchair_toiletis send during toilet updates using [/nodes/%@/update_toilet]- the toilet state isn't set during complete node updates [
nodes/%@/]
@tschob @1000miles So this seems a source where the wrong toilet tag wheelchair_toilet is still coming from (see issue #400).
If the iOS app sends toilet_wheelchair it receives the error "error":"Param wheelchair_toilet is missing" during toilet state updates.
Will the backend be updated or should the iOS app use wheelchair_toilet ?
Hi @tschob, the correct tag in use is toilets:wheelchair Can you try if the error also occurs with this one?
@Svenyo Yes, the same error occurs.
@tschob Do you have an example were the use of the toilet tag wheelchair_toilet becomes visible in the edit history in OSM?
@1000miles Could you give @tschob the necessary information he needs from the backend in order to install the right toilet tag in the iOS App?
@tschob If the iOS App could use wheelchair_toilet that would be good, because Android also uses that identifier already.
The Backend takes the value as wheelchair_toilet but makes sure that when data is sent to OSM toilets:wheelchair is used.
Ok, I'll add wheelchair_toilet to the complete node update and keep it in the toilet update.