From ebe85bdc005ec954daacacf204c7b81b1c30923d Mon Sep 17 00:00:00 2001 From: Miupro Date: Sun, 31 Oct 2021 06:39:02 +0100 Subject: [PATCH] Update interactive_maps.py --- apis/interactive_maps.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apis/interactive_maps.py b/apis/interactive_maps.py index e0533af..bd6725b 100644 --- a/apis/interactive_maps.py +++ b/apis/interactive_maps.py @@ -9,7 +9,12 @@ class SwissMap: # Returns travel map of customer as html string def travel_history_map(self, customer_id, travel_history): local_m = self.m + + counter = 0 # introduce counter for better overview for e in travel_history: + counter += 1 + if counter > 5: + break place, coordinates = e.location_name, e.location_coordinates folium.Marker( location=coordinates, # coordinates for the marker