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:
1 parent
8a8b3076c8
commit
596ac680da
1 file changed
+2
-1
@@ -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