From 09056e8ce76936f7d96d86e9f3303bace8158f30 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Sat, 5 Oct 2024 08:11:04 +0200 Subject: Trip->polyline: looks like EFA returns [ [ [lat, lon], [lat, lon], ... ] ] --- lib/Travel/Status/DE/EFA/Trip.pm | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/Travel/Status/DE/EFA/Trip.pm') diff --git a/lib/Travel/Status/DE/EFA/Trip.pm b/lib/Travel/Status/DE/EFA/Trip.pm index b61c215..b7f495d 100644 --- a/lib/Travel/Status/DE/EFA/Trip.pm +++ b/lib/Travel/Status/DE/EFA/Trip.pm @@ -38,6 +38,9 @@ sub new { time_zone => 'UTC' ), }; + if ( ref( $ref->{polyline} ) eq 'ARRAY' and @{ $ref->{polyline} } == 1 ) { + $ref->{polyline} = $ref->{polyline}[0]; + } return bless( $ref, $obj ); } -- cgit v1.2.3