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

Improve maplibre usability #294

Merged
merged 2 commits into from
Dec 3, 2024
Merged

Conversation

davecraig
Copy link
Contributor

There were a couple of issues with the way in which our GUI map was rendered:

  1. The icons, text and roads were very small and zooming in didn't make them larger. The fix is to set the pixelRatio which means that the map is now rendered as if the DPI were a quarter of it's previous value and then scaled up. This gives a slightly "soft" look, but at least everything is larger.
  2. Rotating the map with the phone wasn't performant on complex map tiles. The fix is to switch to rotate only the icon showing the user location and to keep the map with North at the top. This matches the iOS behaviour.

On my phone at least, the text on maps is too small and the roads too
narrow to easily read. Zooming in doesn't help with this as they are
still small, just spread further apart. Changing the pixelRatio on
the map to be 4.0 results in larger text, icons and roads which is
better size wise. The rendering is a bit 'soft', presumably because
it's being rendered at 1/16th size and then scaled up, but it's still
an overall win.
Rotating the whole map was proving hard work for lower power phones,
so switch to our mode where the icon showing the user location rotates
instead.
@davecraig davecraig merged commit f59962e into Scottish-Tech-Army:main Dec 3, 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.

1 participant