Browse Source

map update

master
Anton Linus 4 years ago
parent
commit
34293d78c8
  1. 6
      website/Speedshow_Map.py
  2. 36
      website/map.html

6
website/Speedshow_Map.py

@ -11,12 +11,12 @@ lat = data['data']['attributes']['lat']
lng = data['data']['attributes']['lng']
#create map object
m = folium.Map(location=[lat, lng], zoom_start=15)
m = folium.Map(location=[52.516190, 13.377693], zoom_start=13)
#create markers
folium.Marker([lat,lng],
popup='<strong>Berghain<strong/>',
tooltip='ja was isch jetzt aus des?',
popup='<strong>ARTIST_NAME + ARTWORK_TITLE<strong/>',
tooltip='ARTIST_NAME_HERE',
icon=folium.Icon(icon='cloud')).add_to(m)
#generate map.html

36
website/map.html

@ -23,7 +23,7 @@
<meta name="viewport" content="width=device-width,
initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<style>
#map_cb793048355a4c4b8a0ff7cbba37c3a4 {
#map_800f23ef42b2486c9365a331953c6b9d {
position: relative;
width: 100.0%;
height: 100.0%;
@ -35,17 +35,17 @@
</head>
<body>
<div class="folium-map" id="map_cb793048355a4c4b8a0ff7cbba37c3a4" ></div>
<div class="folium-map" id="map_800f23ef42b2486c9365a331953c6b9d" ></div>
</body>
<script>
var map_cb793048355a4c4b8a0ff7cbba37c3a4 = L.map(
"map_cb793048355a4c4b8a0ff7cbba37c3a4",
var map_800f23ef42b2486c9365a331953c6b9d = L.map(
"map_800f23ef42b2486c9365a331953c6b9d",
{
center: [52.487175, 13.364731],
center: [52.51619, 13.377693],
crs: L.CRS.EPSG3857,
zoom: 15,
zoom: 13,
zoomControl: true,
preferCanvas: false,
}
@ -55,40 +55,40 @@
var tile_layer_461179e7827a4cdd866fb89391f23aae = L.tileLayer(
var tile_layer_a2d80cb8330b41349a0223f33625aa01 = L.tileLayer(
"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
{"attribution": "Data by \u0026copy; \u003ca href=\"http://openstreetmap.org\"\u003eOpenStreetMap\u003c/a\u003e, under \u003ca href=\"http://www.openstreetmap.org/copyright\"\u003eODbL\u003c/a\u003e.", "detectRetina": false, "maxNativeZoom": 18, "maxZoom": 18, "minZoom": 0, "noWrap": false, "opacity": 1, "subdomains": "abc", "tms": false}
).addTo(map_cb793048355a4c4b8a0ff7cbba37c3a4);
).addTo(map_800f23ef42b2486c9365a331953c6b9d);
var marker_725f832c88be4e7ba9adf6b631864300 = L.marker(
var marker_deefa72b26194f21bcf038a7dcc13975 = L.marker(
[52.487175, 13.364731],
{}
).addTo(map_cb793048355a4c4b8a0ff7cbba37c3a4);
).addTo(map_800f23ef42b2486c9365a331953c6b9d);
var icon_b90652a1cbcf4c01b0ac2f7622ce47a7 = L.AwesomeMarkers.icon(
var icon_cd8eb8abc975473096904bb63276e054 = L.AwesomeMarkers.icon(
{"extraClasses": "fa-rotate-0", "icon": "cloud", "iconColor": "white", "markerColor": "blue", "prefix": "glyphicon"}
);
marker_725f832c88be4e7ba9adf6b631864300.setIcon(icon_b90652a1cbcf4c01b0ac2f7622ce47a7);
marker_deefa72b26194f21bcf038a7dcc13975.setIcon(icon_cd8eb8abc975473096904bb63276e054);
var popup_a5bf051e2cf84f81963121ee6d794ec4 = L.popup({"maxWidth": "100%"});
var popup_6e040f480948411cb5fec5212343ca9d = L.popup({"maxWidth": "100%"});
var html_4524f3e131a84784ade2d8469abf57bc = $(`<div id="html_4524f3e131a84784ade2d8469abf57bc" style="width: 100.0%; height: 100.0%;"><strong>Berghain<strong/></div>`)[0];
popup_a5bf051e2cf84f81963121ee6d794ec4.setContent(html_4524f3e131a84784ade2d8469abf57bc);
var html_20674ff629474a07b3cfc372a04667eb = $(`<div id="html_20674ff629474a07b3cfc372a04667eb" style="width: 100.0%; height: 100.0%;"><strong>ARTIST_NAME + ARTWORK_TITLE<strong/></div>`)[0];
popup_6e040f480948411cb5fec5212343ca9d.setContent(html_20674ff629474a07b3cfc372a04667eb);
marker_725f832c88be4e7ba9adf6b631864300.bindPopup(popup_a5bf051e2cf84f81963121ee6d794ec4)
marker_deefa72b26194f21bcf038a7dcc13975.bindPopup(popup_6e040f480948411cb5fec5212343ca9d)
;
marker_725f832c88be4e7ba9adf6b631864300.bindTooltip(
marker_deefa72b26194f21bcf038a7dcc13975.bindTooltip(
`<div>
ja was isch jetzt aus des?
ARTIST_NAME_HERE
</div>`,
{"sticky": true}
);

Loading…
Cancel
Save