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

Proper scaling on mobile phones #992

Merged
merged 4 commits into from
Oct 29, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Bug Fixes
- Fix icon_create_function argument in MarkerCluster (conengmo #954)
- Update stylesheet url in TimestampedGeoJson (frodebjerke #963)
- Use Javascript template literals in Tooltip and Popup (jtbaker #955 #962)
- Proper scaling on mobile phones (conengmo #992)

0.6.0
~~~~~
Expand Down
2 changes: 2 additions & 0 deletions folium/folium.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,8 @@ class Map(MacroElement):
"""
_template = Template(u"""
{% macro header(this, kwargs) %}
<meta name="viewport" content="width=device-width,
initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<style>#{{this.get_name()}} {
position: {{this.position}};
width: {{this.width[0]}}{{this.width[1]}};
Expand Down
2 changes: 2 additions & 0 deletions folium/templates/fol_template.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
<style>html, body {width: 100%;height: 100%;margin: 0;padding: 0;}</style>
<style>#map {position:absolute;top:0;bottom:0;right:0;left:0;}</style>

<meta name="viewport" content="width=device-width,
initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<style>#{{ map_id }} {
position: relative;
{{ width }}
Expand Down