Making it so format.getChildValue concatenates all simple content (except for GeoRSS format). Use getChildValue instead of concatChildValues. Adding a number of other format methods for those who do manual dom traversal. Original patch from dparker. r=me (see #1846)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@9180 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -726,7 +726,7 @@ OpenLayers.Format.KML = OpenLayers.Class(OpenLayers.Format.XML, {
|
||||
"coordinates");
|
||||
var line = null;
|
||||
if(nodeList.length > 0) {
|
||||
var coordString = this.concatChildValues(nodeList[0]);
|
||||
var coordString = this.getChildValue(nodeList[0]);
|
||||
|
||||
coordString = coordString.replace(this.regExes.trimSpace,
|
||||
"");
|
||||
@@ -897,11 +897,11 @@ OpenLayers.Format.KML = OpenLayers.Class(OpenLayers.Format.XML, {
|
||||
var ed = {};
|
||||
var valueNode = data.getElementsByTagName("value");
|
||||
if (valueNode.length) {
|
||||
ed['value'] = this.concatChildValues(valueNode[0]);
|
||||
ed['value'] = this.getChildValue(valueNode[0]);
|
||||
}
|
||||
var nameNode = data.getElementsByTagName("displayName");
|
||||
if (nameNode.length) {
|
||||
ed['displayName'] = this.concatChildValues(nameNode[0]);
|
||||
ed['displayName'] = this.getChildValue(nameNode[0]);
|
||||
}
|
||||
attributes[key] = ed;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user