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

Using browser language to determine country-specific features is flawed #360

Closed
mendberg opened this issue Jan 19, 2021 · 10 comments · Fixed by #362
Closed

Using browser language to determine country-specific features is flawed #360

mendberg opened this issue Jan 19, 2021 · 10 comments · Fixed by #362
Labels

Comments

@mendberg
Copy link

I don't know if anyone reads comments on already closed issues, so please see #358 (comment)

@nrenner
Copy link
Owner

nrenner commented Jan 19, 2021

Thanks for reporting. I find it better to not re-open implemented feature requests, but to open a separate issue for a bug like you did here.

@nrenner nrenner added the bug label Jan 19, 2021
@nrenner
Copy link
Owner

nrenner commented Jan 19, 2021

from #358 (comment) by @Negativland:

Nice feature, but it has a little bug: when the browser ist set to another language than german (e. g. english) it draws a buffer zone of only 1 km around the home location; see screenshot attached.

Screenshot from 2021-01-19 10-47-02

P. S.: the "1 km go-to-zone" can be set worldwide which is also a bit odd.

@nrenner nrenner changed the title re-open #358 for a bugfix Using browser language to determine country-specific features is flawed Jan 19, 2021
@nrenner
Copy link
Owner

nrenner commented Jan 19, 2021

We currently use the browser language setting to determine if the French or German radius rules apply or if the button should appear at all. I already got another report, so the language setting is less reliable than I hoped.

As a workaround you can override the language by passing it in the URL:
https://brouter.de/brouter-web/?lng=de-DE
https://brouter.de/brouter-web/?lng=de-DE#map=10/50.0977/8.6641/osm-mapnik-german_style&ringgo=8.677826,50.111332,15000

P. S.: the "1 km go-to-zone" can be set worldwide which is also a bit odd.

This is an additional bug, the check to not add the button outside FR/DE does not work.

@nrenner
Copy link
Owner

nrenner commented Jan 19, 2021

My only idea right now is to check on every map move if the map center is inside the country boundary of FR or DE, either in addition or as a replacement for the browser language check.

@mendberg
Copy link
Author

mendberg commented Jan 19, 2021

language setting is less reliable than I hoped.
(…)
This is an additional bug, the check to not add the button outside FR/DE does not work.

From the user perspective it's the same, because the buffer zone depends on the location you're in, not the language you speak.

Possible solutions:

  1. Change the function to "set buffer zone (where applicable)". If the user then sets his home location in germany, the 15 km rule is used; if e. g. in the UK it just says "you're lucky – no limitation"
  2. … make it a general "choose your activity radius". So by default, one can choose to move no further than n km from home. Wherever limitations apply accordingly, these are used (as of today in FR and DE).

My only idea right now is to check on every map move if the map center is inside the country boundary of FR or DE

As a rough guess solution, maybe. I'd better like a more general approach.

@nrenner
Copy link
Owner

nrenner commented Jan 23, 2021

You're right. Implemented 1. (sort of) in #362.

I'm trying to keep the number of buttons on the screen as minimal as possible, especially didn't want to show this one for users that don't need it. But hiding doesn't really make sense here, as when zoomed far out we would need to show it anyway.

Not sure about a general solution 2, I don't really see the use case and personally don't want to spend time on it.

@mendberg
Copy link
Author

mendberg commented Jan 23, 2021

Good choice. Keep it simple in useability and GUI.

Btw, to make the situation even more complicated, some german states (like Hessia and Rhineland-Palatinate) just dropped the 15 km rule…

@nrenner
Copy link
Owner

nrenner commented Jan 29, 2021

some german states (like Hessia and Rhineland-Palatinate) just dropped the 15 km rule…

Thanks for the info, I updated Hessia in the wiki. For Rhineland-Palatinate I haven't found a mention in the new regulation either, do you have a source? Somehow I missed this in the news, even though I'm also following the spiegel.de Corona-News.

But generally this doesn't affect the code, it doesn't tell you if the rule applies or not, it only implements the different definitions of the rule.

@mendberg
Copy link
Author

I've bookmarked https://www.bundesregierung.de/breg-de/themen/coronavirus/corona-bundeslaender-1745198 as a directory to the corona rules of the states.

Hessia clearly says that the 15 km rule was dropped. RLP just does not mention that rule any more; from that I conclude that they've also dropped that rule.

I don't know if other states also dropped the rule. In these times I don't cycle further than RLP…

@nrenner
Copy link
Owner

nrenner commented Jan 29, 2021

Thanks.

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

Successfully merging a pull request may close this issue.

2 participants