diff --git a/resources/views/tracker.blade.php b/resources/views/tracker.blade.php index c9d1f93..c7435a9 100644 --- a/resources/views/tracker.blade.php +++ b/resources/views/tracker.blade.php @@ -66,11 +66,14 @@ 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}} + [{{ $location->latitude }}, {{ $location->longitude }}], @endif @endforeach ], { - color: 'rgba(62, 62, 62, {{ ( $idx - (-50) ) / (count($trip->locations) - (-50)) }})' + @php $colour = 180 * ( 1.0 - ( ( $idx ) / ( count($trip->locations) ) ) ); @endphp + color: 'rgb({{ $colour }}, {{ $colour }}, {{ $colour }})', + weight: 5, + //color: 'rgba(62, 62, 62, {{ ( $idx - 0.5) / (count($trip->locations) - 0.5 ) }})' }).addTo(map); @endfor