Fix polyline decoding
This commit is contained in:
parent
c55d572ec4
commit
97b85e1380
2 changed files with 5 additions and 5 deletions
|
@ -51,7 +51,7 @@
|
|||
/*
|
||||
* Initialise the map
|
||||
*/
|
||||
var map = L.map('map');//.setView([{{ end($trip->locations)->latitude }}, {{ end($trip->locations)->longitude }}], 7);
|
||||
var map = L.map('map');
|
||||
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||
maxZoom: 19,
|
||||
attribution: 'OpenStreetMap'
|
||||
|
@ -127,8 +127,8 @@
|
|||
*/
|
||||
map.fitBounds([
|
||||
@if ($trip->is_active)
|
||||
@foreach(array_slice(array_reverse($trip->locations), 0, 25) as $location)
|
||||
[{{ $location->latitude }}, {{$location->longitude }}],
|
||||
@foreach(array_slice(array_reverse($trip->checkins), 0, 25) as $checkin)
|
||||
[{{ $checkin->location->latitude }}, {{$checkin->location->longitude }}],
|
||||
@endforeach
|
||||
@else
|
||||
@foreach($trip->locations as $location)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue