[OpenLayers-Users] External use of proj4js?

Mike Adair madair at dmsolutions.ca
Wed Mar 5 10:05:43 EST 2008


Hufjan,

It looks like the SRS input fields on that form need an onchange event 
to load the projection definition, i.e. just typing in a SRS code in the 
field doesn't create the Proj4js object required, that only gets created 
by selecting a code from the drop down list. 

We can fix that, but if you want to get it working now, you will need a 
local copy of Proj4js and then:
- add a file for EPSG:25833 in lib/defs and use this as the content: 
http://spatialreference.org/ref/epsg/25833/proj4js/
- in test.html, include that def file using the script tag:
<SCRIPT type="text/javascript" src="lib/defs/EPSG25833.js"></SCRIPT>

That will get that projection into your drop down list and then the form 
should work.

Mike


hufjan wrote:
> Hi Christopher,
>
> thank's for your reply. On my research I even found that link before.
> But neither in the online-version nor an offline-test (xampp; root =
> modified html-page, proj4js.js and /defs with EPSG4326.js and
> EPSG25833.js) helped me out of my question.
> When I tried to get coordinates online I got no reaction (left to right:
> SRS: 4326, x: 12.0, y: 52.0, > SRS: 25833).
>
> Aren't there any tutorials?
>
> Greetz,
> hufjan
>
>
>   
>> http://proj4js.org/test.html
>>
>> Regards,
>> -- 
>> Christopher Schmidt
>> MetaCarta
>>     
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
>   



More information about the Users mailing list