From 3c7c9cd42de8e6881af66bbd018e8d892059bc46 Mon Sep 17 00:00:00 2001 From: Beat Christen Date: Sat, 22 Oct 2016 16:20:14 +0200 Subject: [PATCH] handle navionics.kml files with tab-separated coordinates --- lib/adapters/KML.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/adapters/KML.class.php b/lib/adapters/KML.class.php index 8be9f680..5cdfb0e1 100644 --- a/lib/adapters/KML.class.php +++ b/lib/adapters/KML.class.php @@ -176,7 +176,7 @@ protected function _extractCoordinates($xml) { $coord_elements = $this->childElements($xml, 'coordinates'); $coordinates = array(); if (count($coord_elements)) { - $coord_sets = explode(' ', preg_replace('/[\r\n]+/', ' ', $coord_elements[0]->nodeValue)); + $coord_sets = explode(' ', preg_replace('/[\r\n\t]+/', ' ', $coord_elements[0]->nodeValue)); foreach ($coord_sets as $set_string) { $set_string = trim($set_string); if ($set_string) {