API - allow keeping default tile server for static map - #83
This commit is contained in:
@ -265,14 +265,11 @@ def generate_map(map_filepath: str, map_data: List) -> None:
|
||||
"""
|
||||
Generate and save map image from map data
|
||||
"""
|
||||
m = StaticMap(
|
||||
400,
|
||||
225,
|
||||
10,
|
||||
url_template=current_app.config['TILE_SERVER']['URL'].replace(
|
||||
m = StaticMap(400, 225, 10)
|
||||
if not current_app.config['TILE_SERVER']['DEFAULT_STATICMAP']:
|
||||
m.url_template = current_app.config['TILE_SERVER']['URL'].replace(
|
||||
'{s}.', ''
|
||||
),
|
||||
)
|
||||
)
|
||||
line = Line(map_data, '#3388FF', 4)
|
||||
m.add_line(line)
|
||||
image = m.render()
|
||||
|
Reference in New Issue
Block a user