[OpenLayers-Dev] OpenLayers.Format.Kml.trackAttributes not loaded correctly
Tim Schaub
tschaub at opengeo.org
Tue Oct 23 13:28:35 PDT 2012
Hey Domenico,
This is indeed a bug in the KML parser. Thanks for the catch.
https://github.com/openlayers/openlayers/pull/728
Tim
On Wed, Sep 19, 2012 at 4:31 AM, Domenico Febbo
<domenico.febbo at gmail.com> wrote:
> 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
> _______________________________________________
> Dev mailing list
> Dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-dev
--
Tim Schaub
OpenGeo http://opengeo.org/
Expert service straight from the developers.
More information about the Dev
mailing list