diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2024-10-05 08:11:04 +0200 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2024-10-05 08:11:04 +0200 |
commit | 09056e8ce76936f7d96d86e9f3303bace8158f30 (patch) | |
tree | d80804f3fa223bc2aa5000d47ea7ade5d49c58fc /lib/Travel/Status/DE | |
parent | ba5c64dbc0d6a53efc54339d0c59773792b34f33 (diff) |
Trip->polyline: looks like EFA returns [ [ [lat, lon], [lat, lon], ... ] ]
Diffstat (limited to 'lib/Travel/Status/DE')
-rw-r--r-- | lib/Travel/Status/DE/EFA/Trip.pm | 3 |
1 files changed, 3 insertions, 0 deletions
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 ); } |