Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

State/Province validation in submission form #555

Open
evanodell opened this issue Dec 12, 2018 · 1 comment
Open

State/Province validation in submission form #555

evanodell opened this issue Dec 12, 2018 · 1 comment

Comments

@evanodell
Copy link

Scope / difficulty

Add validation for state/province names, to ensure consistent naming of those locations.

I suspect this is something that could be implemented without very much difficult through the geocoder gem already used in the project. This could be in the form of a drop-down list or a validation/suggesting system. Depending on what is available through geocoder this could also include city validation, or city suggestions.

Impact

This could improve the accuracy of searches, particularly those covering a wider area. For example, there are restrooms listed in 12 provinces and territories in Canada, but 79 different province and territory names used. It might also make submission of new restrooms easier.

Rationale

Consistent naming of states, provinces, etc, would make some searches more comprehensive, and allow for data from the API to be used for mapping/research (e.g. calculating the number of accessible restrooms per 100,000 people in different American states).

Proposal

Implement a suggestion/autocorrect/drop-down list for state and province locations.

How to actually do this:

I assume it can be implemented through geocoder but I'm not sure. It's more of a feature request as this time as I'm not sure of the best way to do this. If there is interest I can try to figure out an implementation and submit a PR.

@DeeDeeG
Copy link
Contributor

DeeDeeG commented Dec 12, 2018

Hi @evanodell, and thank you for the suggestion!

I think this would be solved if we can merge #529 (which is based on #518).

This approach involves sending the restroom's coordinates (which we get from a first round of geocoding) through a second round of "reverse-geocoding" to get the proper address for that location. This should be much more uniform, since we're getting the full text of the address directly from the Google Maps API.

If that sounds good to you, and you're comfortable with developing with Ruby/Rails etc. you could perhaps look over the pull request at #529 and leave any feedback you have.

Thanks again!

- DeeDeeG

Edit: I had two of the PR numbers wrong. Fixed them to point to the correct pull requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants