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
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
The text was updated successfully, but these errors were encountered:
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
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.
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?
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.
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
The text was updated successfully, but these errors were encountered: