[OpenLayers-Users] How may I use transform ?

Fernando fnorte at gmail.com
Thu Dec 22 10:51:32 EST 2011


2011/12/22 Pierre Muckensturm <pierre at georezo.net>

>  markers.addMarker(new
> OpenLayers.Marker(OpenLayers.Projection.transform(
> OpenLayers.Point(775133.95,6907235.95),
> EPSG:2154,EPSG:900913),icon2);
>

Pierre,

The transform() receive the from and to Projection object, not the string
name of the projection.

Try something like this:
 markers.addMarker(new
OpenLayers.Marker(OpenLayers.Projection.transform(
OpenLayers.Point(775133.95,6907235.95),
new OpenLayers.Projection('EPSG:2154'), new
OpenLayers.Projection('EPSG:900913')),icon2);


bon chance,

Fernando G. Norte
BHte - MG - Brazil
cel: +55 31 9119 8814
-------------------------
MSN e Gtalk # fnorte at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20111222/cc316179/attachment-0001.html


More information about the Users mailing list