GeoRSS fails on large line/poly nodes in FF. Use concatChildNodes to get all

the text into one string before parsing. Includes manual test. r=ahocevar. 
(Closes #1614) 


git-svn-id: http://svn.openlayers.org/trunk/openlayers@7871 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2008-08-26 23:24:44 +00:00
parent 319c8f87ef
commit 091d3cfbeb
3 changed files with 38 additions and 2 deletions

View File

@@ -128,7 +128,7 @@ OpenLayers.Format.GeoRSS = OpenLayers.Class(OpenLayers.Format.XML, {
parseFloat(location[0]));
} else if (line.length > 0) {
var coords = OpenLayers.String.trim(line[0].firstChild.nodeValue).split(/\s+/);
var coords = OpenLayers.String.trim(this.concatChildValues(line[0])).split(/\s+/);
var components = [];
var point;
for (var i=0, len=coords.length; i<len; i+=2) {
@@ -138,7 +138,7 @@ OpenLayers.Format.GeoRSS = OpenLayers.Class(OpenLayers.Format.XML, {
}
geometry = new OpenLayers.Geometry.LineString(components);
} else if (polygon.length > 0) {
var coords = OpenLayers.String.trim(polygon[0].firstChild.nodeValue).split(/\s+/);
var coords = OpenLayers.String.trim(this.concatChildValues(polygon[0])).split(/\s+/);
var components = [];
var point;
for (var i=0, len=coords.length; i<len; i+=2) {