Merge branch 'main' of https://github.com/moll-re/polyhack_2021
This commit is contained in:
commit
9db9ff198c
@ -9,7 +9,12 @@ class SwissMap:
|
|||||||
# Returns travel map of customer as html string
|
# Returns travel map of customer as html string
|
||||||
def travel_history_map(self, customer_id, travel_history):
|
def travel_history_map(self, customer_id, travel_history):
|
||||||
local_m = self.m
|
local_m = self.m
|
||||||
|
|
||||||
|
counter = 0 # introduce counter for better overview
|
||||||
for e in travel_history:
|
for e in travel_history:
|
||||||
|
counter += 1
|
||||||
|
if counter > 5:
|
||||||
|
break
|
||||||
place, coordinates = e.location_name, e.location_coordinates
|
place, coordinates = e.location_name, e.location_coordinates
|
||||||
folium.Marker(
|
folium.Marker(
|
||||||
location=coordinates, # coordinates for the marker
|
location=coordinates, # coordinates for the marker
|
||||||
|
Loading…
x
Reference in New Issue
Block a user