Skip to content

Commit

Permalink
Merge pull request #992 from Conengmo/mobile-scaling
Browse files Browse the repository at this point in the history
Proper scaling on mobile phones
  • Loading branch information
ocefpaf committed Oct 29, 2018
2 parents 8253c72 + 8889379 commit 4d54e22
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
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

0 comments on commit 4d54e22

Please sign in to comment.