lukesanch / timemap

Automatically exported from code.google.com/p/timemap
MIT License
0 stars 0 forks source link

XMLDocString Limit in getTagValue #36

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a KML with a large data field (i.e. a LineString with many
coordinates)
2. getTagValue will only return the first 4096 characters (at least in
Firefox). 

Simple change, the function (line 838) only returns
nList[0].firstChild.nodeValue

Instead you should iterate through the "nextSibling" member on
nList[0].firstChild. 

verbose code shown below:
        if (nList.length > 0) {
            temp = nList[0].firstChild.nodeValue;
            nextSib = nList[0].firstChild.nextSibling;
            while(nextSib != null) {
                console.log("Appended a value.")
                temp += nextSib.nodeValue;
                nextSib = nextSib.nextSibling;
            }
            return temp;

Original issue reported on code.google.com by chu...@gmail.com on 17 Feb 2009 at 2:32

GoogleCodeExporter commented 8 years ago

Original comment by nick.rab...@gmail.com on 17 Feb 2009 at 3:58

GoogleCodeExporter commented 8 years ago

Original comment by nick.rab...@gmail.com on 17 Feb 2009 at 3:59

GoogleCodeExporter commented 8 years ago
This should be fixed in SVN. Note that in the latest version, the KML parser 
function
has been moved out of timemap.js and into a separate file.

Original comment by nick.rab...@gmail.com on 17 Feb 2009 at 5:22