opencoil-paracity/website/Speedshow_Map.py
2020-09-02 23:01:16 +02:00

23 lines
496 B
Python

import folium
import requests
import json
#import scooter data
with open('1scooter.json') as file:
data = json.load(file)
lat = data['data']['attributes']['lat']
lng = data['data']['attributes']['lng']
#create map object
m = folium.Map(location=[52.516190, 13.377693], zoom_start=13)
#create markers
folium.Marker([lat,lng],
popup='<strong>ARTIST_NAME + ARTWORK_TITLE<strong/>',
tooltip='ARTIST_NAME_HERE',
icon=folium.Icon(icon='cloud')).add_to(m)
#generate map.html
m.save('map.html')