savoirfairelinux / sous-chef

Sous-Chef is a web application to help organizations to plan and deliver meals, and to manage clients files.
GNU Affero General Public License v3.0
67 stars 45 forks source link

Broken Geolocations #768

Open kousu opened 7 years ago

kousu commented 7 years ago

On /member/$N/update/address_information/ I have found that:

"1000, de Bullion" + "Montreal" fails to geolocate "1000 de Bullion" + "Montreal" fails to geolocate "1000, Bullion" + "Montreal" succeeds "1000 Bullion" + "Montreal" succeeds

However on OSM "1000, de Bullion, montreal" succeeds: http://www.openstreetmap.org/search?query=1000%2C%20de%20Bullion%2C%20montreal#map=19/45.51065/-73.56162 "1000 de Bullion, montreal" succeeds: http://www.openstreetmap.org/search?query=1000%20de%20Bullion%2C%20montreal#map=19/45.51065/-73.56162 and of course "1000, Bullion, montreal" succeeds http://www.openstreetmap.org/search?query=1000%2C%20Bullion%2C%20montreal#map=19/45.51065/-73.56162 and "1000 Bullion, montreal" succeeds http://www.openstreetmap.org/search?query=1000%20Bullion%2C%20montreal#map=19/45.51065/-73.56162

Is there some kind of normalization leaflet is trying to do that is breaking OSM Nominatim?

lingxiaoyang commented 7 years ago

@kousu Thank you for the report! This is a bug, because the related JS code uses "&" (%26) character to connect street name and city and postal codes:

https://nominatim.openstreetmap.org/search?q=1000%2C%20de%20buillon%26Montreal%26&limit=5&format=json&addressdetails=1&countrycodes=ca&json_callback=_l_geocoder_2

And also the postal code was not present in the query.

This needs to be fixed.