mirror of https://gitlab.com/bashrc2/epicyon
Map dimensions
parent
a32452f72e
commit
5c5b861435
7
maps.py
7
maps.py
|
@ -215,7 +215,9 @@ def geocoords_from_map_link(url: str,
|
||||||
|
|
||||||
def html_open_street_map(url: str,
|
def html_open_street_map(url: str,
|
||||||
bounding_box_degrees: float,
|
bounding_box_degrees: float,
|
||||||
translate: {}) -> str:
|
translate: {},
|
||||||
|
width: str = "725",
|
||||||
|
height: str = "650") -> str:
|
||||||
"""Returns embed html for an OSM link
|
"""Returns embed html for an OSM link
|
||||||
"""
|
"""
|
||||||
osm_domain = 'openstreetmap.org'
|
osm_domain = 'openstreetmap.org'
|
||||||
|
@ -228,7 +230,8 @@ def html_open_street_map(url: str,
|
||||||
return ''
|
return ''
|
||||||
|
|
||||||
html_str = \
|
html_str = \
|
||||||
'<iframe width="725" height="650" frameborder="0" ' + \
|
'<iframe width="' + width + '" height="' + height + \
|
||||||
|
'" frameborder="0" ' + \
|
||||||
'scrolling="no" marginheight="0" marginwidth="0" ' + \
|
'scrolling="no" marginheight="0" marginwidth="0" ' + \
|
||||||
'src="https://www.' + osm_domain + '/export/embed.html?' + \
|
'src="https://www.' + osm_domain + '/export/embed.html?' + \
|
||||||
'bbox=' + str(longitude - bounding_box_degrees) + \
|
'bbox=' + str(longitude - bounding_box_degrees) + \
|
||||||
|
|
|
@ -193,7 +193,8 @@ def _html_calendar_day(person_cache: {}, css_cache: {}, translate: {},
|
||||||
event_map = \
|
event_map = \
|
||||||
html_open_street_map(event_place,
|
html_open_street_map(event_place,
|
||||||
bounding_box_degrees,
|
bounding_box_degrees,
|
||||||
translate)
|
translate,
|
||||||
|
'30vw', '30vw')
|
||||||
if event_map:
|
if event_map:
|
||||||
event_place = event_map
|
event_place = event_map
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue