How to install Proj4js.js in my localhost directory?

المشرف العام

Administrator
طاقم الإدارة
I'm developing a GIS website for vineyard management. I am using Openlayers with the WMTS IGN (French institute for geography) datas. It works fine.

I also would like to add the possibility for the user to switch to a geology map provided by the BRGM (geological french institute) geoservice.

The issue is that IGN datas avec in Webmercator projection (EPSG:3857) and BRGM datas avec in EPSG:27572 (NTF (Paris)) and i would like to keep map center and bounds while switching from one to the other one. After reading a lot on the internet, i found i needed to use Proj4js for projection transformation. I also have vestor shapes (vineyard fields) and i would need to visualize in both projections by transforming them.

I am quite used to implement js librairies (by copying js files in my localhost and include it in the header of my php/html file) but in the case of proj4js, it looks different. The gituhub page only gives this information for installation :

npm install proj4bower install proj4jam install proj4component install proj4js/proj4jsI have no idea how it works and i can't get any clear information from what i read. In the github files, there is no proj4js.js file... Is there somewhere a clear tutorial for installation ? Does someone have experience on this installation ?

I tried a "classical" installation downloading 1.1.0 from this link http://download.osgeo.org/proj4js/proj4js-1.1.0.zip but it seems to be an old version and i'm getting errors with the test code below : "lcc:forward: llInputOutOfRange: NaN : NaN"

Here is my test code :



أكثر...
 
أعلى