add breaks to routes

This commit is contained in:
Ben Goldsworthy 2024-06-09 15:02:19 +02:00
parent d8f29bdafb
commit fbd55c7718
Signed by: Rumperuu
SSH key fingerprint: SHA256:e5XfzNOr9UvWpEzyLfw0GtTMZWIFh3NmxH+/qQIi3xE
2 changed files with 12 additions and 0 deletions

View file

@ -72,6 +72,8 @@ return [
'current_trip_ignore' => explode(',', env('CURRENT_TRIP_IGNORE')), 'current_trip_ignore' => explode(',', env('CURRENT_TRIP_IGNORE')),
'current_trip_break_locations' => explode(',', env('CURRENT_TRIP_BREAK_LOCATIONS')),
'past_trip_ids' => explode(',', env('PAST_TRIP_IDS')), 'past_trip_ids' => explode(',', env('PAST_TRIP_IDS')),
/* /*

View file

@ -67,6 +67,16 @@
@if(!in_array($location->id, config('app.current_trip_ignore'))) @if(!in_array($location->id, config('app.current_trip_ignore')))
[{{ $location->latitude }}, {{ $location->longitude }}], [{{ $location->latitude }}, {{ $location->longitude }}],
@endif @endif
@if(in_array($location->id, config('app.current_trip_break_locations')))
], {
@php $colour = 180 * ( 1.0 - ( ( $idx - 99 ) / ( count($trip->locations) ) ) ); @endphp
color: 'rgb({{ $colour }}, {{ $colour }}, {{ $colour }})',
weight: 5,
}).addTo(map);
L.polyline([
@endif
@endforeach @endforeach
], { ], {
@php $colour = 180 * ( 1.0 - ( ( $idx ) / ( count($trip->locations) ) ) ); @endphp @php $colour = 180 * ( 1.0 - ( ( $idx ) / ( count($trip->locations) ) ) ); @endphp