[OpenLayers-Dev] OpenLayers.Format.Kml.trackAttributes not loaded correctly
Domenico Febbo
domenico.febbo at gmail.com
Wed Sep 19 03:31:43 PDT 2012
Dear All,
I fond a possible bug using the Openlayers 2.12 Release, in the
OpenLayers.Format.KML class.
Using the trackAttributes Array property with more than one element,
the reader doesn't load correctly the obj attributes into the feature
attribute due to a for loop bug.
Modifing the row 736 (file: KML.js) like the code below, seems that
the bug is fixed.
## ORIGINAL code ##
= for (var j=0, jj=this.trackAttributes.length; j<jj; ++j) {
- feature.attributes[name] = obj.attributes[this.trackAttributes[j]][i];
= }
## MODIFIED code ##
= for (var j=0, jj=this.trackAttributes.length; j<jj; ++j) {
+ feature.attributes[this.trackAttributes[j]] =
obj.attributes[this.trackAttributes[j]][i];
= }
Sorry but I'm not registered as developer so I cannot open a ticket
and I'm not sure that the error is there, so If somebody can validate
the bug, please open a ticket.
Regards,
Domenico
More information about the Dev
mailing list