Remove markers, fade out polyline

This commit is contained in:
Ben Goldsworthy 2023-03-15 22:48:41 +00:00
parent e5a5ddffcd
commit 375a8774b7

View file

@ -59,22 +59,24 @@
attribution: 'OpenStreetMap'
}).addTo(map);
@for($idx = 0; $idx <= count($trip->locations); $idx += 100)
/*
* Populate the route line.
*/
var routePoints = L.polyline([
@foreach($trip->locations as $location)
L.polyline([
@foreach(array_slice($trip->locations, $idx, 100) as $location)
@if(!in_array($location->id, config('app.current_trip_ignore')))
[{{ $location->latitude }}, {{ $location->longitude }}], // {{$location->id}}
@endif
@endforeach
], {
color: '#3d3d3d'
color: 'rgba(62, 62, 62, {{ ( $idx - (-50) ) / (count($trip->locations) - (-50)) }})'
}).addTo(map);
@endfor
/*
* Populate all the checkins and popup texts.
*/
*
var checkinMarkers = [];
var marker = null, popupMarkup = null;
var markerIcon = L.icon({
@ -122,7 +124,7 @@
checkinMarkers[{{ $checkin->id }}] = marker;
@endforeach
*/
/*
* Fit the map to the last 25 locations, and then zoom out
* (to help provide context).