OpenLayers OpenLayers

Changeset 5751

Show
Ignore:
Timestamp:
01/15/08 12:14:18 (1 year ago)
Author:
crschmidt
Message:

Add reprojection support.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • sandbox/crschmidt/osm/lib/OpenLayers/Format/OSM.js

    r5750 r5751  
    124124            } else {     
    125125                geometry = new OpenLayers.Geometry.LineString(point_list); 
    126             }     
     126            } 
     127            if (this.internalProjection && this.externalProjection) { 
     128                geometry.transform(this.externalProjection,  
     129                    this.internalProjection); 
     130            }         
    127131            var feat = new OpenLayers.Feature.Vector(geometry, 
    128132                ways[i].tags); 
     
    148152                    new OpenLayers.Geometry.Point(node['lon'], node['lat']), 
    149153                    tags); 
     154                if (this.internalProjection && this.externalProjection) { 
     155                    feat.geometry.transform(this.externalProjection,  
     156                        this.internalProjection); 
     157                }         
    150158                feat.fid = node_id;  
    151159                feat_list.push(feat);