Skip to content

Commit 8d5418b

Browse files
authored
🐛 Fix broken GeoJSON polylines (#3163)
1 parent 4d309f8 commit 8d5418b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

app/DataProviders/Bahn.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,9 @@ private function getPolyLineFromTrip($journey, Collection $stopovers): PolyLine
439439
$geoJson['features'][$closestFeatureKey]['properties'] = $properties;
440440
}
441441

442+
// Make features to array again, if they get broken by the code above
443+
$geoJson['features'] = array_values($geoJson['features']);
444+
442445
$geoJsonString = json_encode($geoJson);
443446
$polyline = PolyLine::create([
444447
'hash' => md5($geoJsonString),

0 commit comments

Comments
 (0)