diff --git a/airscore/core/console/design_map.py b/airscore/core/console/design_map.py index caa64ebb..53631816 100644 --- a/airscore/core/console/design_map.py +++ b/airscore/core/console/design_map.py @@ -53,7 +53,23 @@ def make_map( location = bbox_centre(bbox) else: location = [45, 10] - folium_map = folium.Map(location=location, zoom_start=13, tiles="Stamen Terrain", width='100%', height='75%') + + attr = ( + '© Stadia Maps' + '© Stamen Design' + '© OpenMapTiles' + '© OpenStreetMap' + 'integrated by FAI-Airscore' + ) + tiles = "https://tiles.stadiamaps.com/tiles/stamen_terrain/{z}/{x}/{y}{r}.png" + folium_map = folium.Map( + location=location, + zoom_start=13, + tiles=tiles, + width='100%', + height='75%', + attr=attr + ) # folium.LayerControl().add_to(folium_map) '''Define map borders''' # at this stage a track (layer_geojason has bbox inside, diff --git a/airscore/core/console/task_map.py b/airscore/core/console/task_map.py index c6ca8860..a66c2729 100644 --- a/airscore/core/console/task_map.py +++ b/airscore/core/console/task_map.py @@ -126,8 +126,21 @@ def dump_flight_to_geojson(flight, geojson_filename_local): # function to create the map template with optional geojson, circles and points objects def make_map(layer_geojson=False, circles=False, points=False): + attr = ( + '© Stadia Maps' + '© Stamen Design' + '© OpenMapTiles' + '© OpenStreetMap' + 'integrated by FAI-Airscore' + ) + tiles = "https://tiles.stadiamaps.com/tiles/stamen_terrain/{z}/{x}/{y}{r}.png" folium_map = folium.Map( - location=[45.922207, 8.673952], zoom_start=13, tiles="Stamen Terrain", width='100%', height='75%' + location=[45.922207, 8.673952], + zoom_start=13, + tiles=tiles, + width='100%', + height='75%', + attr=attr ) if layer_geojson: diff --git a/airscore/core/map.py b/airscore/core/map.py index 7eb3db97..9d0f936d 100644 --- a/airscore/core/map.py +++ b/airscore/core/map.py @@ -52,14 +52,23 @@ def make_map( else: location = [45, 10] + attr = ( + '© Stadia Maps ' + '© Stamen Design ' + '© OpenMapTiles ' + '© OpenStreetMap ' + 'integrated by FAI-Airscore' + ) + tiles = "https://tiles.stadiamaps.com/tiles/stamen_terrain/{z}/{x}/{y}{r}.png" folium_map = folium.Map( location=location, position='relative', zoom_start=13, - tiles="Stamen Terrain", + tiles=tiles, max_bounds=True, min_zoom=5, prefer_canvas=True, + attr=attr ) # folium.LayerControl().add_to(folium_map) '''Define map borders'''