Permalink
Browse files

kml: Fix incorrect parsing in firefox (fixes #17)

Only first text node was processed
  • Loading branch information...
1 parent 7559bda commit 8f3d925598d305e3c67f77737bd1418798d44b23 Pavel Shramov committed Jun 12, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 layer/vector/KML.js
View
@@ -180,7 +180,7 @@ L.Util.extend(L.KML, {
parseCoords: function(xml) {
var el = xml.getElementsByTagName('coordinates');
var coords = [];
- var text = el[0].childNodes[0].nodeValue.split(' ');
+ var text = el[0].textContent.split(' ');
for (var i = 0; i < text.length; i++) {
var ll = text[i].split(',');
if (ll.length < 2) continue;

0 comments on commit 8f3d925

Please sign in to comment.