Browse Source

set person markers for players, style game_player polyline

testing
Burathar 4 years ago
parent
commit
2cd3ecd079
  1. 2
      app/templates/game_hunter_dashboard.html
  2. 4
      app/templates/game_player.html

2
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 }}') var self = JSON.parse('{{ json.dumps(current_user.last_location(game), cls=location_encoder)|safe }}')
if (self){ if (self){
addPlayerMarker(map, self) addPlayerMarker(map, self, greenPlayerIcon)
} }
map.fitBounds( map.fitBounds(

4
app/templates/game_player.html

@ -90,8 +90,10 @@
if (locations.length > 0) { if (locations.length > 0) {
var polyline = L.polyline(locations.map(l => [l.latitude, l.longitude]), { var polyline = L.polyline(locations.map(l => [l.latitude, l.longitude]), {
color: 'red' color: 'blue',
opacity: 0.6,
}).addTo(map); }).addTo(map);
// zoom the map to the polyline // zoom the map to the polyline
map.fitBounds(polyline.getBounds(), { map.fitBounds(polyline.getBounds(), {
maxZoom : 13 maxZoom : 13

Loading…
Cancel
Save