[OpenLayers-Users] Transform Points Help

Mario Danelli mario.danelli at gmail.com
Wed Aug 1 05:11:35 PDT 2012


Riaan Lombaard <rlombaard at ...> writes:

> 
> 
> Hi,
>  
> I need some transformation advice.
>  
> Running this script in Firebug.
> "
> var point = new OpenLayers.Geometry.Point(128.627103622948, 
-15.8249150838119);var point_transformed = point.transform(new 
OpenLayers.Projection("EPSG:4283"), new 
OpenLayers.Projection("EPSG:4269"));console.log(point);console.log(point_transfo
rmed)
> "
>  
> What happens is the data I am getting is from `GDA94 (SRID 4283)` and I need 
convert it to ` WGS84 (SRID 4326)` for the map base layer I am using ` 
http://vmap0.tiles.osgeo.org/wms/vmap0`
>  
> But looking at the example it does not seem to convert anything, the x,y 
stay's the same? 
> What am I missing?
>  
> Riaan
> 
> 
> _______________________________________________
> Users mailing list
> Users at ...
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
> 


Hi Rian,

by my experience, with OpenLayers 2.11, the WGS84 projection is obtained with a 
code line similar to this:

    var wgs84Projection = new OpenLayers.Projection("EPSG:4326");

Hoping it will be useful

Mario 




More information about the Users mailing list