Bonjour, je veux convertir des coordonnées en EPSG:27563 en latitude et longitude puis faire la localisation, j'ai suit le tuto :
http://trac.osgeo.org/proj4js/wiki/UserGuide
mais rien ne marche
veuillez m'orienter
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 var lt = parseFloat(lat.replace(',','.')); var lg = parseFloat(lgt.replace(',','.')); // creating source and destination Proj4js objects // once initialized, these may be re-used as often as needed var Source = new Proj4js.Proj('EPSG:27563'); //Source coordinates in LCC, south of France var Destination = new Proj4js.Proj('EPSG:4326'); //Destination coordinates will be in Longitude/Latitude // transforming point coordinates var p = new Proj4js.Point(-76.0,45.0); //any object will do as long as it has 'x' and 'y' properties Proj4js.transform(Source, Destination, p); //do the transformation. x and y are modified in place lt=p.x; lg=p.y; document.getElementById('latitude').value.value=p.x; document.getElementById('longitude').value=p.y; var latlng = new google.maps.LatLng(p.x, p.y);
Partager