Hi, thanks for the report and the investigation. I created http://trac.osgeo.org/openlayers/ticket/3418 and attached a patch.
Andreas. On Thu, Jul 14, 2011 at 6:54 PM, Arnd Wippermann <arnd.wipperm...@web.de> wrote: > Hi, > > I can confirm the behaviour for OpenLayers 2.11. > > In OpenLayers 2.11 the format KML has changed in function buildGeometryNode. > > The transformation are done only for geometries, that are not instanceof > OpenLayers.Geometry.Collection. > Only points seems not to be instanceof OpenLayers.Geometry.Collection, so > they will transformed. > > Most likely it's a bug in 2.11. > > OpenLayers 2.10 : KML.js > > buildGeometryNode: function(geometry) { > if (this.internalProjection && this.externalProjection) { > geometry = geometry.clone(); > geometry.transform(this.internalProjection, > this.externalProjection); > } > > OpenLayers 2.11 RC1 : KML.js > > buildGeometryNode: function(geometry) { > if (this.internalProjection && this.externalProjection && > !(geometry instanceof OpenLayers.Geometry.Collection)) { > geometry = geometry.clone(); > geometry.transform(this.internalProjection, > this.externalProjection); > } > > Arnd > > -----Ursprüngliche Nachricht----- > Von: openlayers-users-boun...@lists.osgeo.org > [mailto:openlayers-users-boun...@lists.osgeo.org] Im Auftrag von jllodra > Gesendet: Mittwoch, 13. Juli 2011 12:39 > An: us...@openlayers.org > Betreff: [OpenLayers-Users] Re: Writing KML - Reprojection problem > > Hi again, just uploaded a test which demonstrates this bug. > > http://socib.es/~jllodra/workspace/cdrift/write_features_google.html > > Left textarea shows output in KML, > right textarea shows output in GeoJSON. > > If you draw a point, coords appear in "degrees" both for KML and GeoJSON > (correct). > If you draw a linestring or poly, coords appear in "m x/y" for the KML > (wrong!) but in "degrees" for the GeoJSON (correct). > > Please can anyone confirm? > > -- > View this message in context: > http://osgeo-org.1803224.n2.nabble.com/Writing-KML-Reprojection-problem-tp65 > 78255p6578521.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > us...@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/openlayers-users > > _______________________________________________ > Users mailing list > us...@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/openlayers-users > -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. _______________________________________________ Users mailing list us...@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/openlayers-users