Merge branch 'main' of https://github.com/moll-re/polyhack_2021
This commit is contained in:
commit
8c1380394e
52
apis/interactive_maps.py
Normal file
52
apis/interactive_maps.py
Normal file
@ -0,0 +1,52 @@
|
||||
import folium
|
||||
|
||||
|
||||
class SwissMap:
|
||||
def __init__(self) -> None:
|
||||
self.m = folium.Map(location=[46.8132, 8.2242], tiles='OpenStreetMap', zoom_start=7.6, min_zoom = 6, max_zoom = 12)
|
||||
|
||||
|
||||
# Returns travel map of customer as html string
|
||||
def travel_history_map(self, customer_id, location_list):
|
||||
local_m = self.m
|
||||
for place, coordinates in location_list:
|
||||
folium.Marker(
|
||||
location=coordinates, # coordinates for the marker
|
||||
popup=place, # pop-up label for the marker
|
||||
icon=folium.Icon(color="red")
|
||||
).add_to(local_m)
|
||||
local_m.save(f'static/travelhistorymap_customer{customer_id}.html')
|
||||
return(f'static/travelhistorymap_customer{customer_id}.html')
|
||||
|
||||
|
||||
# own_location and destination are tuples in form (coordinates, place)
|
||||
def destination_map(self, customer_id, own_location, destination):
|
||||
local_m = self.m
|
||||
folium.Marker(
|
||||
location=own_location[1], # coordinates for the marker
|
||||
popup=own_location[0], # pop-up label for the marker
|
||||
icon=folium.Icon(color="blue")
|
||||
).add_to(local_m)
|
||||
folium.Marker(
|
||||
location=destination[1], # coordinates for the marker
|
||||
popup=destination[0], # pop-up label for the marker
|
||||
icon=folium.Icon(color="red")
|
||||
).add_to(local_m)
|
||||
local_m.save(f'static/destinationmap_customer={customer_id}_destination{destination[0]}.html')
|
||||
return(f'static/destinationmap_customer={customer_id}_destination{destination[0]}.html')
|
||||
|
||||
|
||||
|
||||
# Working examples for travel history map and destination map
|
||||
|
||||
# Hard coded location list
|
||||
location_list = [('Center of Switzerland' , [46.8132, 8.2242]), ('Zermatt', [46.11654, 7.445683])]
|
||||
customer_id = 235
|
||||
|
||||
# Travel history
|
||||
thmap = SwissMap()
|
||||
thmap.travel_history_map(customer_id, location_list)
|
||||
|
||||
# Destination
|
||||
dmap = SwissMap()
|
||||
dmap.destination_map(customer_id, location_list[0], location_list[1])
|
@ -1,5 +1,6 @@
|
||||
import tortilla
|
||||
import requests
|
||||
import pandas as pd
|
||||
|
||||
|
||||
class SBBWrapper:
|
||||
@ -25,7 +26,4 @@ class SBBWrapper:
|
||||
# 'X-Conversation-Id': str(conv_id),
|
||||
}
|
||||
return auth
|
||||
|
||||
|
||||
def get_closest_station(self, station_name):
|
||||
pass
|
@ -0,0 +1,28 @@
|
||||
import tortilla
|
||||
import requests
|
||||
|
||||
class WeatherWrapper:
|
||||
def __init__(self) -> None:
|
||||
self.wrapper = tortilla.wrap('https://weather.api.sbb.ch/')
|
||||
self.wrapper.config.headers = self.get_auth()
|
||||
|
||||
def get_auth(self):
|
||||
token_query = {
|
||||
'grant_type': 'client_credentials',
|
||||
'client_id': '56bae62c',
|
||||
'client_secret': '59603134536c874e47245b4de403e3d3'
|
||||
}
|
||||
|
||||
#response = requests.post('https://sso-int.sbb.ch/auth/realms/SBB_Public/protocol/openid-connect/token', data=token_query).json()
|
||||
response = requests.post('https://sso.sbb.ch/auth/realms/SBB_Public/protocol/openid-connect/token', data=token_query).json()
|
||||
token = response["access_token"]
|
||||
auth = {
|
||||
'Authorization': f"Bearer {token}",
|
||||
'X-Contract-Id': 'PLY223P',
|
||||
# 'X-Conversation-Id': str(conv_id),
|
||||
}
|
||||
return auth
|
||||
|
||||
weather = WeatherWrapper()
|
||||
print('TEST')
|
||||
print(weather.wrapper.get('2021-07-12T00:00ZP50D:PT30M/sfc_pressure:hPa,msl_pressure:hPa/47.36669,8.54858+47.35209,7.90779/json'))
|
113
foliummap.html
Normal file
113
foliummap.html
Normal file
@ -0,0 +1,113 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
||||
|
||||
<script>
|
||||
L_NO_TOUCH = false;
|
||||
L_DISABLE_3D = false;
|
||||
</script>
|
||||
|
||||
<style>html, body {width: 100%;height: 100%;margin: 0;padding: 0;}</style>
|
||||
<style>#map {position:absolute;top:0;bottom:0;right:0;left:0;}</style>
|
||||
<script src="https://cdn.jsdelivr.net/npm/leaflet@1.6.0/dist/leaflet.js"></script>
|
||||
<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
|
||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.js"></script>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/leaflet@1.6.0/dist/leaflet.css"/>
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"/>
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css"/>
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css"/>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.css"/>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/python-visualization/folium/folium/templates/leaflet.awesome.rotate.min.css"/>
|
||||
|
||||
<meta name="viewport" content="width=device-width,
|
||||
initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
||||
<style>
|
||||
#map_d4ac73c2df9c41bea14c016835811cc9 {
|
||||
position: relative;
|
||||
width: 100.0%;
|
||||
height: 100.0%;
|
||||
left: 0.0%;
|
||||
top: 0.0%;
|
||||
}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="folium-map" id="map_d4ac73c2df9c41bea14c016835811cc9" ></div>
|
||||
|
||||
</body>
|
||||
<script>
|
||||
|
||||
var map_d4ac73c2df9c41bea14c016835811cc9 = L.map(
|
||||
"map_d4ac73c2df9c41bea14c016835811cc9",
|
||||
{
|
||||
center: [46.8132, 8.2242],
|
||||
crs: L.CRS.EPSG3857,
|
||||
zoom: 7.6,
|
||||
zoomControl: true,
|
||||
preferCanvas: false,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var tile_layer_6e44d0eabedd40aeb144e24806bc8cda = 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": 12, "maxZoom": 12, "minZoom": 6, "noWrap": false, "opacity": 1, "subdomains": "abc", "tms": false}
|
||||
).addTo(map_d4ac73c2df9c41bea14c016835811cc9);
|
||||
|
||||
|
||||
var marker_bf25bd7f39b44ac5b551564b8a5b7c27 = L.marker(
|
||||
[46.8132, 8.2242],
|
||||
{}
|
||||
).addTo(map_d4ac73c2df9c41bea14c016835811cc9);
|
||||
|
||||
|
||||
var icon_7de26889b7ff4e619d6c67754637c7a1 = L.AwesomeMarkers.icon(
|
||||
{"extraClasses": "fa-rotate-0", "icon": "info-sign", "iconColor": "white", "markerColor": "red", "prefix": "glyphicon"}
|
||||
);
|
||||
marker_bf25bd7f39b44ac5b551564b8a5b7c27.setIcon(icon_7de26889b7ff4e619d6c67754637c7a1);
|
||||
|
||||
|
||||
var popup_68bd288fe9ff4339a145fa1ad4225693 = L.popup({"maxWidth": "100%"});
|
||||
|
||||
|
||||
var html_0cdcd383f2d74fb89cdb0e817d289dcd = $(`<div id="html_0cdcd383f2d74fb89cdb0e817d289dcd" style="width: 100.0%; height: 100.0%;">Center of Switzerland</div>`)[0];
|
||||
popup_68bd288fe9ff4339a145fa1ad4225693.setContent(html_0cdcd383f2d74fb89cdb0e817d289dcd);
|
||||
|
||||
|
||||
marker_bf25bd7f39b44ac5b551564b8a5b7c27.bindPopup(popup_68bd288fe9ff4339a145fa1ad4225693)
|
||||
;
|
||||
|
||||
|
||||
|
||||
|
||||
var marker_d1bccc00b9f240739ed8cd81a499af5e = L.marker(
|
||||
[46.11654, 7.445683],
|
||||
{}
|
||||
).addTo(map_d4ac73c2df9c41bea14c016835811cc9);
|
||||
|
||||
|
||||
var icon_48e2aecfade240b58c286204bca3b48a = L.AwesomeMarkers.icon(
|
||||
{"extraClasses": "fa-rotate-0", "icon": "info-sign", "iconColor": "white", "markerColor": "red", "prefix": "glyphicon"}
|
||||
);
|
||||
marker_d1bccc00b9f240739ed8cd81a499af5e.setIcon(icon_48e2aecfade240b58c286204bca3b48a);
|
||||
|
||||
|
||||
var popup_b5014cc24e6f422caebfa8d714b48ebd = L.popup({"maxWidth": "100%"});
|
||||
|
||||
|
||||
var html_97e6624386104c2a8799f2e441e63714 = $(`<div id="html_97e6624386104c2a8799f2e441e63714" style="width: 100.0%; height: 100.0%;">Zermatt</div>`)[0];
|
||||
popup_b5014cc24e6f422caebfa8d714b48ebd.setContent(html_97e6624386104c2a8799f2e441e63714);
|
||||
|
||||
|
||||
marker_d1bccc00b9f240739ed8cd81a499af5e.bindPopup(popup_b5014cc24e6f422caebfa8d714b48ebd)
|
||||
;
|
||||
|
||||
|
||||
|
||||
</script>
|
113
static/destinationmap_customer=235_destinationZermatt.html
Normal file
113
static/destinationmap_customer=235_destinationZermatt.html
Normal file
@ -0,0 +1,113 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
||||
|
||||
<script>
|
||||
L_NO_TOUCH = false;
|
||||
L_DISABLE_3D = false;
|
||||
</script>
|
||||
|
||||
<style>html, body {width: 100%;height: 100%;margin: 0;padding: 0;}</style>
|
||||
<style>#map {position:absolute;top:0;bottom:0;right:0;left:0;}</style>
|
||||
<script src="https://cdn.jsdelivr.net/npm/leaflet@1.6.0/dist/leaflet.js"></script>
|
||||
<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
|
||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.js"></script>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/leaflet@1.6.0/dist/leaflet.css"/>
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"/>
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css"/>
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css"/>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.css"/>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/python-visualization/folium/folium/templates/leaflet.awesome.rotate.min.css"/>
|
||||
|
||||
<meta name="viewport" content="width=device-width,
|
||||
initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
||||
<style>
|
||||
#map_4b63fb42cb6348acbbbbe2dc0559bc1e {
|
||||
position: relative;
|
||||
width: 100.0%;
|
||||
height: 100.0%;
|
||||
left: 0.0%;
|
||||
top: 0.0%;
|
||||
}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="folium-map" id="map_4b63fb42cb6348acbbbbe2dc0559bc1e" ></div>
|
||||
|
||||
</body>
|
||||
<script>
|
||||
|
||||
var map_4b63fb42cb6348acbbbbe2dc0559bc1e = L.map(
|
||||
"map_4b63fb42cb6348acbbbbe2dc0559bc1e",
|
||||
{
|
||||
center: [46.8132, 8.2242],
|
||||
crs: L.CRS.EPSG3857,
|
||||
zoom: 7.6,
|
||||
zoomControl: true,
|
||||
preferCanvas: false,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var tile_layer_b2bae53ccf9445a0b5609c122deab36b = 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": 12, "maxZoom": 12, "minZoom": 6, "noWrap": false, "opacity": 1, "subdomains": "abc", "tms": false}
|
||||
).addTo(map_4b63fb42cb6348acbbbbe2dc0559bc1e);
|
||||
|
||||
|
||||
var marker_84f3e52feaf44598b8d58d47cf2ad70f = L.marker(
|
||||
[46.8132, 8.2242],
|
||||
{}
|
||||
).addTo(map_4b63fb42cb6348acbbbbe2dc0559bc1e);
|
||||
|
||||
|
||||
var icon_987ec2f0ba2749639d6e66b006ca73fe = L.AwesomeMarkers.icon(
|
||||
{"extraClasses": "fa-rotate-0", "icon": "info-sign", "iconColor": "white", "markerColor": "blue", "prefix": "glyphicon"}
|
||||
);
|
||||
marker_84f3e52feaf44598b8d58d47cf2ad70f.setIcon(icon_987ec2f0ba2749639d6e66b006ca73fe);
|
||||
|
||||
|
||||
var popup_db1aeaec08e344808ae98672134955ad = L.popup({"maxWidth": "100%"});
|
||||
|
||||
|
||||
var html_8865aed1bbfd4317a3a1237ebf1ab2e6 = $(`<div id="html_8865aed1bbfd4317a3a1237ebf1ab2e6" style="width: 100.0%; height: 100.0%;">Center of Switzerland</div>`)[0];
|
||||
popup_db1aeaec08e344808ae98672134955ad.setContent(html_8865aed1bbfd4317a3a1237ebf1ab2e6);
|
||||
|
||||
|
||||
marker_84f3e52feaf44598b8d58d47cf2ad70f.bindPopup(popup_db1aeaec08e344808ae98672134955ad)
|
||||
;
|
||||
|
||||
|
||||
|
||||
|
||||
var marker_1272f16aaca64b1ab1f4cb9b6d780f7b = L.marker(
|
||||
[46.11654, 7.445683],
|
||||
{}
|
||||
).addTo(map_4b63fb42cb6348acbbbbe2dc0559bc1e);
|
||||
|
||||
|
||||
var icon_738d450b21d14420a5d2cd646d02205e = L.AwesomeMarkers.icon(
|
||||
{"extraClasses": "fa-rotate-0", "icon": "info-sign", "iconColor": "white", "markerColor": "red", "prefix": "glyphicon"}
|
||||
);
|
||||
marker_1272f16aaca64b1ab1f4cb9b6d780f7b.setIcon(icon_738d450b21d14420a5d2cd646d02205e);
|
||||
|
||||
|
||||
var popup_e9d4a3b3f96c4667a814e1ce08cd182a = L.popup({"maxWidth": "100%"});
|
||||
|
||||
|
||||
var html_25f8c05b4a6148f9ad5c6afdef318f62 = $(`<div id="html_25f8c05b4a6148f9ad5c6afdef318f62" style="width: 100.0%; height: 100.0%;">Zermatt</div>`)[0];
|
||||
popup_e9d4a3b3f96c4667a814e1ce08cd182a.setContent(html_25f8c05b4a6148f9ad5c6afdef318f62);
|
||||
|
||||
|
||||
marker_1272f16aaca64b1ab1f4cb9b6d780f7b.bindPopup(popup_e9d4a3b3f96c4667a814e1ce08cd182a)
|
||||
;
|
||||
|
||||
|
||||
|
||||
</script>
|
113
static/swissmap_customer=235.html
Normal file
113
static/swissmap_customer=235.html
Normal file
@ -0,0 +1,113 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
||||
|
||||
<script>
|
||||
L_NO_TOUCH = false;
|
||||
L_DISABLE_3D = false;
|
||||
</script>
|
||||
|
||||
<style>html, body {width: 100%;height: 100%;margin: 0;padding: 0;}</style>
|
||||
<style>#map {position:absolute;top:0;bottom:0;right:0;left:0;}</style>
|
||||
<script src="https://cdn.jsdelivr.net/npm/leaflet@1.6.0/dist/leaflet.js"></script>
|
||||
<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
|
||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.js"></script>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/leaflet@1.6.0/dist/leaflet.css"/>
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"/>
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css"/>
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css"/>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.css"/>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/python-visualization/folium/folium/templates/leaflet.awesome.rotate.min.css"/>
|
||||
|
||||
<meta name="viewport" content="width=device-width,
|
||||
initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
||||
<style>
|
||||
#map_092483588e2c4ac5924c3622b8af1134 {
|
||||
position: relative;
|
||||
width: 100.0%;
|
||||
height: 100.0%;
|
||||
left: 0.0%;
|
||||
top: 0.0%;
|
||||
}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="folium-map" id="map_092483588e2c4ac5924c3622b8af1134" ></div>
|
||||
|
||||
</body>
|
||||
<script>
|
||||
|
||||
var map_092483588e2c4ac5924c3622b8af1134 = L.map(
|
||||
"map_092483588e2c4ac5924c3622b8af1134",
|
||||
{
|
||||
center: [46.8132, 8.2242],
|
||||
crs: L.CRS.EPSG3857,
|
||||
zoom: 7.6,
|
||||
zoomControl: true,
|
||||
preferCanvas: false,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var tile_layer_3ec4b3b1853e4987b667905c6ee46bd4 = 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": 12, "maxZoom": 12, "minZoom": 6, "noWrap": false, "opacity": 1, "subdomains": "abc", "tms": false}
|
||||
).addTo(map_092483588e2c4ac5924c3622b8af1134);
|
||||
|
||||
|
||||
var marker_c066dc7694ab4b9e9fd55be869c0fb43 = L.marker(
|
||||
[46.8132, 8.2242],
|
||||
{}
|
||||
).addTo(map_092483588e2c4ac5924c3622b8af1134);
|
||||
|
||||
|
||||
var icon_01dba90ea2af47ea88ed77a52322effb = L.AwesomeMarkers.icon(
|
||||
{"extraClasses": "fa-rotate-0", "icon": "info-sign", "iconColor": "white", "markerColor": "red", "prefix": "glyphicon"}
|
||||
);
|
||||
marker_c066dc7694ab4b9e9fd55be869c0fb43.setIcon(icon_01dba90ea2af47ea88ed77a52322effb);
|
||||
|
||||
|
||||
var popup_4db25cb18ec545efbde0b7251804cae4 = L.popup({"maxWidth": "100%"});
|
||||
|
||||
|
||||
var html_edaa011c18c648a093b0f3b96bc9e7d1 = $(`<div id="html_edaa011c18c648a093b0f3b96bc9e7d1" style="width: 100.0%; height: 100.0%;">Center of Switzerland</div>`)[0];
|
||||
popup_4db25cb18ec545efbde0b7251804cae4.setContent(html_edaa011c18c648a093b0f3b96bc9e7d1);
|
||||
|
||||
|
||||
marker_c066dc7694ab4b9e9fd55be869c0fb43.bindPopup(popup_4db25cb18ec545efbde0b7251804cae4)
|
||||
;
|
||||
|
||||
|
||||
|
||||
|
||||
var marker_a70d653c5f63441bbbdda56d55a1fd9a = L.marker(
|
||||
[46.11654, 7.445683],
|
||||
{}
|
||||
).addTo(map_092483588e2c4ac5924c3622b8af1134);
|
||||
|
||||
|
||||
var icon_dba68870c65f416583684126793cfbb4 = L.AwesomeMarkers.icon(
|
||||
{"extraClasses": "fa-rotate-0", "icon": "info-sign", "iconColor": "white", "markerColor": "red", "prefix": "glyphicon"}
|
||||
);
|
||||
marker_a70d653c5f63441bbbdda56d55a1fd9a.setIcon(icon_dba68870c65f416583684126793cfbb4);
|
||||
|
||||
|
||||
var popup_0d9507747ef94271a44340243a8aed20 = L.popup({"maxWidth": "100%"});
|
||||
|
||||
|
||||
var html_304ce481b37f4636ac95f95ef203e2a9 = $(`<div id="html_304ce481b37f4636ac95f95ef203e2a9" style="width: 100.0%; height: 100.0%;">Zermatt</div>`)[0];
|
||||
popup_0d9507747ef94271a44340243a8aed20.setContent(html_304ce481b37f4636ac95f95ef203e2a9);
|
||||
|
||||
|
||||
marker_a70d653c5f63441bbbdda56d55a1fd9a.bindPopup(popup_0d9507747ef94271a44340243a8aed20)
|
||||
;
|
||||
|
||||
|
||||
|
||||
</script>
|
113
static/travelhistorymap_customer235.html
Normal file
113
static/travelhistorymap_customer235.html
Normal file
@ -0,0 +1,113 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
||||
|
||||
<script>
|
||||
L_NO_TOUCH = false;
|
||||
L_DISABLE_3D = false;
|
||||
</script>
|
||||
|
||||
<style>html, body {width: 100%;height: 100%;margin: 0;padding: 0;}</style>
|
||||
<style>#map {position:absolute;top:0;bottom:0;right:0;left:0;}</style>
|
||||
<script src="https://cdn.jsdelivr.net/npm/leaflet@1.6.0/dist/leaflet.js"></script>
|
||||
<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
|
||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.js"></script>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/leaflet@1.6.0/dist/leaflet.css"/>
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"/>
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css"/>
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css"/>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.css"/>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/python-visualization/folium/folium/templates/leaflet.awesome.rotate.min.css"/>
|
||||
|
||||
<meta name="viewport" content="width=device-width,
|
||||
initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
||||
<style>
|
||||
#map_43982fff96ac4010a4abc5d891617cbb {
|
||||
position: relative;
|
||||
width: 100.0%;
|
||||
height: 100.0%;
|
||||
left: 0.0%;
|
||||
top: 0.0%;
|
||||
}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="folium-map" id="map_43982fff96ac4010a4abc5d891617cbb" ></div>
|
||||
|
||||
</body>
|
||||
<script>
|
||||
|
||||
var map_43982fff96ac4010a4abc5d891617cbb = L.map(
|
||||
"map_43982fff96ac4010a4abc5d891617cbb",
|
||||
{
|
||||
center: [46.8132, 8.2242],
|
||||
crs: L.CRS.EPSG3857,
|
||||
zoom: 7.6,
|
||||
zoomControl: true,
|
||||
preferCanvas: false,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var tile_layer_b9dad930005b49d7a6ede10b36ae3893 = 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": 12, "maxZoom": 12, "minZoom": 6, "noWrap": false, "opacity": 1, "subdomains": "abc", "tms": false}
|
||||
).addTo(map_43982fff96ac4010a4abc5d891617cbb);
|
||||
|
||||
|
||||
var marker_3f81fbaf36ef48e4aac4e125680bcbde = L.marker(
|
||||
[46.8132, 8.2242],
|
||||
{}
|
||||
).addTo(map_43982fff96ac4010a4abc5d891617cbb);
|
||||
|
||||
|
||||
var icon_8f74cd48d4174f2da53e683ebe79b2a1 = L.AwesomeMarkers.icon(
|
||||
{"extraClasses": "fa-rotate-0", "icon": "info-sign", "iconColor": "white", "markerColor": "red", "prefix": "glyphicon"}
|
||||
);
|
||||
marker_3f81fbaf36ef48e4aac4e125680bcbde.setIcon(icon_8f74cd48d4174f2da53e683ebe79b2a1);
|
||||
|
||||
|
||||
var popup_0516c2ff9ba64321beab63bd5c2dc036 = L.popup({"maxWidth": "100%"});
|
||||
|
||||
|
||||
var html_3fb7d1b852e440e38d58826bc6138c85 = $(`<div id="html_3fb7d1b852e440e38d58826bc6138c85" style="width: 100.0%; height: 100.0%;">Center of Switzerland</div>`)[0];
|
||||
popup_0516c2ff9ba64321beab63bd5c2dc036.setContent(html_3fb7d1b852e440e38d58826bc6138c85);
|
||||
|
||||
|
||||
marker_3f81fbaf36ef48e4aac4e125680bcbde.bindPopup(popup_0516c2ff9ba64321beab63bd5c2dc036)
|
||||
;
|
||||
|
||||
|
||||
|
||||
|
||||
var marker_56b1a2aedccd4326a7a2fd12e6e90e33 = L.marker(
|
||||
[46.11654, 7.445683],
|
||||
{}
|
||||
).addTo(map_43982fff96ac4010a4abc5d891617cbb);
|
||||
|
||||
|
||||
var icon_4c40d69ea15e447782f4671a041bcf71 = L.AwesomeMarkers.icon(
|
||||
{"extraClasses": "fa-rotate-0", "icon": "info-sign", "iconColor": "white", "markerColor": "red", "prefix": "glyphicon"}
|
||||
);
|
||||
marker_56b1a2aedccd4326a7a2fd12e6e90e33.setIcon(icon_4c40d69ea15e447782f4671a041bcf71);
|
||||
|
||||
|
||||
var popup_f50bc115e4424589908ad94c7a17c6f2 = L.popup({"maxWidth": "100%"});
|
||||
|
||||
|
||||
var html_ae4e05924c31455bb2a115c202a4f83a = $(`<div id="html_ae4e05924c31455bb2a115c202a4f83a" style="width: 100.0%; height: 100.0%;">Zermatt</div>`)[0];
|
||||
popup_f50bc115e4424589908ad94c7a17c6f2.setContent(html_ae4e05924c31455bb2a115c202a4f83a);
|
||||
|
||||
|
||||
marker_56b1a2aedccd4326a7a2fd12e6e90e33.bindPopup(popup_f50bc115e4424589908ad94c7a17c6f2)
|
||||
;
|
||||
|
||||
|
||||
|
||||
</script>
|
Loading…
x
Reference in New Issue
Block a user