Remove markers, fade out polyline
This commit is contained in:
parent
e5a5ddffcd
commit
375a8774b7
1 changed files with 16 additions and 14 deletions
|
@ -59,22 +59,24 @@
|
||||||
attribution: 'OpenStreetMap'
|
attribution: 'OpenStreetMap'
|
||||||
}).addTo(map);
|
}).addTo(map);
|
||||||
|
|
||||||
|
@for($idx = 0; $idx <= count($trip->locations); $idx += 100)
|
||||||
/*
|
/*
|
||||||
* Populate the route line.
|
* Populate the route line.
|
||||||
*/
|
*/
|
||||||
var routePoints = L.polyline([
|
L.polyline([
|
||||||
@foreach($trip->locations as $location)
|
@foreach(array_slice($trip->locations, $idx, 100) as $location)
|
||||||
@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->id}}
|
[{{ $location->latitude }}, {{ $location->longitude }}], // {{$location->id}}
|
||||||
@endif
|
@endif
|
||||||
@endforeach
|
@endforeach
|
||||||
], {
|
], {
|
||||||
color: '#3d3d3d'
|
color: 'rgba(62, 62, 62, {{ ( $idx - (-50) ) / (count($trip->locations) - (-50)) }})'
|
||||||
}).addTo(map);
|
}).addTo(map);
|
||||||
|
@endfor
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Populate all the checkins and popup texts.
|
* Populate all the checkins and popup texts.
|
||||||
*/
|
*
|
||||||
var checkinMarkers = [];
|
var checkinMarkers = [];
|
||||||
var marker = null, popupMarkup = null;
|
var marker = null, popupMarkup = null;
|
||||||
var markerIcon = L.icon({
|
var markerIcon = L.icon({
|
||||||
|
@ -122,7 +124,7 @@
|
||||||
|
|
||||||
checkinMarkers[{{ $checkin->id }}] = marker;
|
checkinMarkers[{{ $checkin->id }}] = marker;
|
||||||
@endforeach
|
@endforeach
|
||||||
|
*/
|
||||||
/*
|
/*
|
||||||
* Fit the map to the last 25 locations, and then zoom out
|
* Fit the map to the last 25 locations, and then zoom out
|
||||||
* (to help provide context).
|
* (to help provide context).
|
||||||
|
|
Loading…
Reference in a new issue