Fix the double-reprojection of components of a collection in KML, and write a

test for it in both GeoJSON and KML to demonstrate that it works. r=bartvde,
(Closes #2040)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@11644 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2011-03-07 11:15:20 +00:00
parent 105351995e
commit ce4ff521b0
3 changed files with 30 additions and 3 deletions
+2 -1
View File
@@ -1222,7 +1222,8 @@ OpenLayers.Format.KML = OpenLayers.Class(OpenLayers.Format.XML, {
* {DOMElement}
*/
buildGeometryNode: function(geometry) {
if (this.internalProjection && this.externalProjection) {
if (this.internalProjection && this.externalProjection &&
!(geometry instanceof OpenLayers.Geometry.Collection)) {
geometry = geometry.clone();
geometry.transform(this.internalProjection,
this.externalProjection);