[MetaCRS] Proj4js dynamic CRS lookup

Jon Britton jonbritton3 at googlemail.com
Tue Nov 2 10:37:27 EDT 2010


Hi guys, thanks for the reply.

I've noticed that you can use the spatialreference.org REST interface to
make calls like:

http://spatialreference.org/ref/epsg/2805/proj4js/

<http://spatialreference.org/ref/epsg/2805/proj4js/>which gives you the
javascript code needed to use the projection.

I assume I need to generate a URL for my given projection, get the contents
of the URL and run it as JavaScript.  Unfortunately I've got no idea how to
do this!

Jon

On 1 November 2010 18:46, Clément Ronzon <clem.rz at gmail.com> wrote:

> Hi Jon,
>
> I worked on a similar project before : http://twcc.free.fr
> You can check the JS sources.
>
> If you need any help to understand the code, feel free to contact me !
>
> Sincerely,
> Clément Ronzon
> 151 Av. Félix Faure
> 69003 LYON, FRANCE
> Tel. # : +33 (0)9 54 43 12 20
> Fax # : +33 (0)9 59 43 12 20
> Cell. # : +33 (0)6 08 21 23 27
> http://perso.apec.fr/clement_ronzon1
> http://www.computrabajo.com.mx/cvs/clementronzon
> http://twcc.free.fr
> http://www.grottocenter.org
> http://www.zakbag.com
>
>
> On Mon, Nov 1, 2010 at 6:34 PM, Jon Britton <jonbritton3 at googlemail.com>wrote:
>
>> Hi,
>>
>> I'm trying to use proj4js in my project and will need to project to
>> various CRSs.  The projection codes are submitted by the user, so I have no
>> way of knowing what CRSs will be used.  I've looked at the user guide and it
>> says that proj4js can dynamically look up CRS info at run-time, but I can't
>> figure out how to set this up.  When I try and carry out a projection, I
>> just get the original values back...
>>
>> Any help would be appreciated,
>>
>> Jon
>>
>> _______________________________________________
>> MetaCRS mailing list
>> MetaCRS at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/metacrs
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/metacrs/attachments/20101102/e1308d3d/attachment.html


More information about the MetaCRS mailing list