From 2cd3ecd079b73396c093703459569e61f8a11412 Mon Sep 17 00:00:00 2001 From: Burathar Date: Thu, 23 Jul 2020 00:55:46 +0200 Subject: [PATCH] set person markers for players, style game_player polyline --- app/templates/game_hunter_dashboard.html | 2 +- app/templates/game_player.html | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/templates/game_hunter_dashboard.html b/app/templates/game_hunter_dashboard.html index 0b22e33..f405891 100644 --- a/app/templates/game_hunter_dashboard.html +++ b/app/templates/game_hunter_dashboard.html @@ -79,7 +79,7 @@ var self = JSON.parse('{{ json.dumps(current_user.last_location(game), cls=location_encoder)|safe }}') if (self){ - addPlayerMarker(map, self) + addPlayerMarker(map, self, greenPlayerIcon) } map.fitBounds( diff --git a/app/templates/game_player.html b/app/templates/game_player.html index 04fdd7b..cc5cd83 100644 --- a/app/templates/game_player.html +++ b/app/templates/game_player.html @@ -90,8 +90,10 @@ if (locations.length > 0) { var polyline = L.polyline(locations.map(l => [l.latitude, l.longitude]), { - color: 'red' + color: 'blue', + opacity: 0.6, }).addTo(map); + // zoom the map to the polyline map.fitBounds(polyline.getBounds(), { maxZoom : 13