Add support to Format.OSM to reproject on writing. Initial suggestion from

Arnd Wipperman, turned into a patch by me, r=bartvde (Closes #2988)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@11647 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2011-03-07 11:21:32 +00:00
parent c27af60153
commit d3f5100327
2 changed files with 19 additions and 0 deletions

View File

@@ -347,6 +347,13 @@ OpenLayers.Format.OSM = OpenLayers.Class(OpenLayers.Format.XML, {
'point': function(point) {
var id = null;
var geometry = point.geometry ? point.geometry : point;
if (this.internalProjection && this.externalProjection) {
geometry = geometry.clone();
geometry.transform(this.internalProjection,
this.externalProjection);
}
var already_exists = false; // We don't return anything if the node
// has already been created
if (point.osm_id) {