Use correct track attribute
Previously, the last track attribute name would be used as the feature attribute name. For tracks with multiple attributes, this doesn't work.
This commit is contained in:
@@ -731,7 +731,8 @@ OpenLayers.Format.KML = OpenLayers.Class(OpenLayers.Format.XML, {
|
||||
}
|
||||
if (this.trackAttributes) {
|
||||
for (var j=0, jj=this.trackAttributes.length; j<jj; ++j) {
|
||||
feature.attributes[name] = obj.attributes[this.trackAttributes[j]][i];
|
||||
var name = this.trackAttributes[j];
|
||||
feature.attributes[name] = obj.attributes[name][i];
|
||||
}
|
||||
}
|
||||
feature.attributes.when = obj.whens[i];
|
||||
|
||||
Reference in New Issue
Block a user