-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Proper scaling on mobile phones #992
Conversation
@ocefpaf you want to go ahead and merge this? (after Travis gave the green) Or do you have any comments? |
Thanks @Conengmo! LGTM!! |
A simple fix that has enabled scaling of both the icons and the interface itself, I add the following meta tag in the HTML file:
This may not be a permanent workaround, but it works just fine for me, and has already improved the user experience of my map application when viewed on a mobile device. There is an important caveat, however. Each time you run your .py to publish a new HTML file, the old one is overwritten, which means you need to add this code back each time you run |
l have a problem with Folium maps not being scaled properly in portrait mode on mobile. The controls and every other element is too small, and I can't zoom in fully to my map/markers. However on mobile in horizontal mode everything looks great. |
I have the same problem as @AdnanHodzic. This is part of the code I'm using:
Is there anything missing? you can check what I'm doing here: |
Closes #842. On mobile devices currently maps have tiny controls and text. In this PR a line is added to the html page header that disables scaling. This way, on mobile phones the controls and text become larger. This is also the way it's done in a Leaflet example:
https://leafletjs.com/examples/mobile/
I don't think there are any downsides to this, but if anyone knows any please share them.