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

bug: locations in Boston with existing street name in Cambridge are displaying #58

Open
lucyq opened this issue Oct 20, 2016 · 3 comments
Labels

Comments

@lucyq
Copy link
Member

lucyq commented Oct 20, 2016

When a street name in Boston is entered and the same street exists in Cambridge, the polling place for the location in Cambridge is displayed.

Example:
10 Pearl St., Boston --> 10 Pearl St., Cambridge
200 Mass. Ave., Boston --> 200 Mass. Ave., Cambridge

screen shot 2016-10-20 at 10 15 14 am

@lucyq lucyq changed the title bug: street addresses in Boston displaying bug: locations in Boston with existing street name in Cambridge are displaying Oct 20, 2016
@carpeliam carpeliam added the bug label Oct 21, 2016
@moczka
Copy link
Member

moczka commented Oct 23, 2016

Do you think this would be considered a bug? The reason I ask is because when the .geocode() method is called and no cambridge result is returned, it tries again by concatenating "Cambridge MA" to the address leading to the result we see above. Resulting in 10 Pearl St Boston, Cambridge, MA which of course is technically in Cambridge.

@carpeliam
Copy link
Member

hmm - i'd say this is probably a bug as it violates principle of least surprise (if I enter an address that's legitimately in Boston, and it directs me to a DIFFERENT address in Cambridge, that may not be what I wanted), but I'm guessing it's low-priority, if I understand correctly... hopefully no Boston residents are using votecambridge.com and then trekking into Cambridge to come vote. or did I misunderstand, @lucyq?

@moczka
Copy link
Member

moczka commented Oct 24, 2016

A possible solution would be to use a regular expression on the "address" variable inside the options object that gets passed to the geocode() method to check for "cambridge" in the address. And to only call the .geocode() method again (for failed addresses of course), if the regExp returns true. The reason I say this is because, the above is caused after calling the .geocode() again after it failed the first time.

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

No branches or pull requests

3 participants