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

setting accuracy circle also when acc == null #169

Merged

Conversation

tuffnerdstuff
Copy link
Contributor

@tuffnerdstuff tuffnerdstuff commented Mar 29, 2021

This fix makes sure that an accuracy circle with radius 0 is instantiated even if acc == null, otherwise the missing circle leads to a "Session expired" error further down the line. Although a radius of 0 implies "perfect accuracy", I think other solutions, be it a fixed width circle or a custom icon, are more distracting than helpful. Fixes #165

@bilde2910
Copy link
Owner

Thanks for your suggested fix for this issue. The intent behind this code was to only make a circle if there is an accuracy value provided, and not draw any circle at all if that wasn't the case. The problem stems from the periodic location update wrongly assuming that there will always be an accuracy circle - this happens when it checks whether or not a client is "dead", so it can update the color of the marker and circle appropriately. I think this might be a better place to fix the code, so we avoid having the circle in the first place.

@tuffnerdstuff
Copy link
Contributor Author

OK, I'm now checking if circle !== null instead of setting an accuracy circle with radius = 0

warren-bank added a commit to warren-bank/render-web-services that referenced this pull request Feb 16, 2023
bilde2910/Hauk#169

validate that accuracy circle is not NULL before settings its style
@bilde2910 bilde2910 merged commit 6b3d8dc into bilde2910:master May 24, 2024
1 check passed
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

Successfully merging this pull request may close these issues.

Client errors out when accuracy is not provided
2 participants