[OpenLayers-Users] projection of my data to them

Vidal, Antoni antoni.vidal at icc.cat
Thu Oct 1 06:15:28 EDT 2009


Hello Mario,

 

You should do a reprojection using Proj4JS lib from EPSG:25830 to EPSG:4326 in client side, I mean, including Proj4JS in your OL development.

 

Then You have to code something simillar to:

 

var src = new OpenLayers.Projection('EPSG: 25830');

      var dest = new OpenLayers.Projection('EPSG: 4326');

 

        for(var i=0; i<features.length; ++i) {

            aCoord = features[i].geometry;

            aCoord.transform(src,dest);

        }

 

Regards,

 

Antoni Vidal

Unitat d'Aplicacions SIG-WEB
Institut Cartogràfic de Catalunya <http://mercuri.icc.cat/website/mob_nf/mob1/mob2/inici2.htm?CONSULTA=Institut%20Cartogr%25E0fic%20de%20Catalunya&XYADDRESS=429486:4580392> 
Parc de Montjuïc, E-08038 Barcelona
Tel. (+34) 93 567 15 00 (ext. 3228)
www.icc.cat <http://www.icc.cat/> 

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091001/dd276ca9/attachment.html


More information about the Users mailing list