Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for line breaks between KML coordinate tuples #80

Merged
merged 1 commit into from Jul 16, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/adapters/KML.class.php
Expand Up @@ -169,7 +169,7 @@ protected function _extractCoordinates($xml) {
$coord_elements = $this->childElements($xml, 'coordinates'); $coord_elements = $this->childElements($xml, 'coordinates');
$coordinates = array(); $coordinates = array();
if (count($coord_elements)) { if (count($coord_elements)) {
$coord_sets = explode(' ', $coord_elements[0]->nodeValue); $coord_sets = explode(' ', preg_replace('/[\r\n]+/', ' ', $coord_elements[0]->nodeValue));
foreach ($coord_sets as $set_string) { foreach ($coord_sets as $set_string) {
$set_string = trim($set_string); $set_string = trim($set_string);
if ($set_string) { if ($set_string) {
Expand Down