Subversion Repositories Sites.obs-saisons.fr

Rev

Rev 201 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 201 Rev 203
Line 9... Line 9...
9
 
9
 
10
<br>
10
<br>
11
<form id="addr" action="#" method="get" onsubmit="return showAddress(this);" style="float:left;">
11
<form id="addr" action="#" method="get" onsubmit="return showAddress(this);" style="float:left;">
12
		<ul style="list-style-type:none;margin:0;padding:0;">
12
		<ul style="list-style-type:none;margin:0;padding:0;">
13
			<li>
13
			<li>
14
				<label for="lieu">Selectionnez la commune la plus proche de votre station :</label> 
14
				<label for="lieu">Selectionnez la commune la plus proche de votre station :</label>
15
				<input id="lieu" type="text" size="30" name="lieu" value=""/>
15
				<input id="lieu" type="text" size="30" name="lieu" value=""/>
16
				<input type="submit" value="Localiser" />
16
				<input type="submit" value="Localiser" />
17
			</li>
17
			</li>
18
			<li>
18
			<li>
Line 25... Line 25...
25
<div id="map" style="width:600px;height:400px;border:2px solid grey;margin:10px 0;clear:both;"></div>
25
<div id="map" style="width:600px;height:400px;border:2px solid grey;margin:10px 0;clear:both;"></div>
Line 26... Line 26...
26
 
26
 
Line 27... Line 27...
27
<?php
27
<?php
28
 
28
 
29
  //Récupération des stations existantes
29
  //Récupération des stations existantes
30
  
30
 
31
  //FONCTIONNEMENT_TESTE_ET_OK
31
  //FONCTIONNEMENT_TESTE_ET_OK
32
  
32
 
33
  
33
 
34
  // les stations de l'observateur :
34
  // les stations de l'observateur :
35
  
35
 
36
  $requete_stations = mysql_query("select  STATION_ID, STATION_NOM, STATION_LATITUDE,  STATION_LONGITUDE, STATION_ALTITUDE, STATION_ENVIRONNEMENT_ID, ENVIRONNEMENT_NOM from STATION, ENVIRONNEMENT  where STATION.PARTICIPANT_ID=".$_SESSION['participant']." AND ENVIRONNEMENT_ID=STATION_ENVIRONNEMENT_ID ORDER BY STATION_NOM");
36
  $requete_stations = mysql_query("select  STATION_ID, STATION_NOM, STATION_LATITUDE,  STATION_LONGITUDE, STATION_ALTITUDE, STATION_ENVIRONNEMENT_ID, ENVIRONNEMENT_NOM from STATION, ENVIRONNEMENT  where STATION.PARTICIPANT_ID=".$_SESSION['participant']." AND ENVIRONNEMENT_ID=STATION_ENVIRONNEMENT_ID ORDER BY STATION_NOM");
37
  
37
 
38
  
38
 
39
    
-
 
40
  $nb_requete_stations = @mysql_num_rows($requete_stations);
-
 
41
  
-
 
Line -... Line 39...
-
 
39
 
42
  
40
  $nb_requete_stations = @mysql_num_rows($requete_stations);
-
 
41
 
-
 
42
 
43
  
43
 
44
 
44
 
Line 45... Line 45...
45
  
45
 
46
  
46
 
47
  $stations=array();
47
  $stations=array();
Line 48... Line 48...
48
 
48
 
49
 
49
 
50
  echo "<br>";
50
  echo "<br>";
51
  echo "</br>\n";
51
  echo "</br>\n";
52
  echo "<b>Vos stations enregistrées (Cliquez sur le nom de la station pour ajouter de nouvelles espèces) :</b> <br>";
52
  echo "<b>Vos stations enregistrées (Cliquez sur le nom de la station pour ajouter de nouvelles espèces) :</b> <br>";
53
 
53
 
54
  
54
 
55
  ?>
55
  ?>
56
  <form name="form_station" method="post" action="<?= $url_page ?>">
56
  <form name="form_station" method="post" action="<?= $url_page ?>">
57
  <input type="hidden" name="etape" value="<?= $etape ?>">
57
  <input type="hidden" name="etape" value="<?= $etape ?>">
58
  <input type="hidden" name="<?= $provenance ?>" value="1">
58
  <input type="hidden" name="<?= $provenance ?>" value="1">
59
  <input type="hidden" name="<?= $provenance ?>etape" value="<?= $etape ?>">
59
  <input type="hidden" name="<?= $provenance ?>etape" value="<?= $etape ?>">
60
  <?php
60
  <?php
61
  
61
 
62
  echo "<table id='tabstations'>";
62
  echo "<table id='tabstations'>";
63
    
63
 
64
       
64
 
65
 
65
 
66
  if ($nb_requete_stations > 0) {
66
  if ($nb_requete_stations > 0) {
67
  	
67
 
68
  
68
 
69
  // Liste des stations 
69
  // Liste des stations
70
  
70
 
71
  $MOIS_EN_COURS = '09';
71
  $MOIS_EN_COURS = '09';
72
  $MOIS_RENTREE = '09'; // FIXME : quelle difference avec la variable precedente ?
72
  $MOIS_RENTREE = '09'; // FIXME : quelle difference avec la variable precedente ?
73
  $mois = date('m');
73
  $mois = date('m');
74
  $annee = date('Y');
74
  $annee = date('Y');
75
  
75
 
76
  //$annee=$annee+1;
76
  //$annee=$annee+1;
77
 /* 
77
 /*
78
  if ($mois > $MOIS_RENTREE) {
78
  if ($mois > $MOIS_RENTREE) {
79
  		$annee = $annee+1;
79
  		$annee = $annee+1;
80
  }
80
  }
81
  */
81
  */
82
  
82
 
83
  while ($station = mysql_fetch_assoc($requete_stations)) {
83
  while ($station = mysql_fetch_assoc($requete_stations)) {
84
  		
84
 
85
  	
85
 
86
  	  $stations [] = $station;
86
  	  $stations [] = $station;
87
  	  echo "<tr>";
87
  	  echo "<tr>";
88
  	  echo "<td><strong>Station : <a title=\"Ajouter de nouvelles espèces\" href=\"".$url_page."&station_id=".$station['STATION_ID']."\">".$station['STATION_NOM']."</a><strong></td>";
88
  	  echo "<td><strong>Station : <a title=\"Ajouter de nouvelles espèces\" href=\"".$url_page."&station_id=".$station['STATION_ID']."\">".$station['STATION_NOM']."</a><strong></td>";
89
  	  
89
 
90
  	  
90
 
91
  	  
91
 
92
  	 // echo "<td>".$station['STATION_LATITUDE']."</td>";
92
  	 // echo "<td>".$station['STATION_LATITUDE']."</td>";
93
  	  //echo "<td>".$station['STATION_LONGITUDE']."</td>";
93
  	  //echo "<td>".$station['STATION_LONGITUDE']."</td>";
94
  	  //echo "<td>".$station['STATION_ALTITUDE']."</td>";
94
  	  //echo "<td>".$station['STATION_ALTITUDE']."</td>";
95
  	  //echo "<td>"."<input type=\"submit\" class=\"submit\" name=\"".$station['STATION_ID']."\" value=\"Choisir cette station\"></td>";
95
  	  //echo "<td>"."<input type=\"submit\" class=\"submit\" name=\"".$station['STATION_ID']."\" value=\"Choisir cette station\"></td>";
96
  	  
96
 
97
  	  // A t-on des mesures associe a cette station ? Si oui on ne peut pas la modifier ni supprimer
97
  	  // A t-on des mesures associe a cette station ? Si oui on ne peut pas la modifier ni supprimer
98
  	  
98
 
99
  	  $requete_mesure =  mysql_query("SELECT MESURE.SEQUENCE_ID FROM   MESURE,SEQUENCE,STATION where MESURE.SEQUENCE_ID=SEQUENCE.SEQUENCE_ID AND STATION.STATION_ID=SEQUENCE.STATION_ID AND  STATION.PARTICIPANT_ID=".$_SESSION['participant']." AND STATION.STATION_ID=".$station['STATION_ID']);
99
  	  $requete_mesure =  mysql_query("SELECT MESURE.SEQUENCE_ID FROM   MESURE,SEQUENCE,STATION where MESURE.SEQUENCE_ID=SEQUENCE.SEQUENCE_ID AND STATION.STATION_ID=SEQUENCE.STATION_ID AND  STATION.PARTICIPANT_ID=".$_SESSION['participant']." AND STATION.STATION_ID=".$station['STATION_ID']);
100
  	  $nb_requete_mesure = mysql_num_rows($requete_mesure);
100
  	  $nb_requete_mesure = mysql_num_rows($requete_mesure);
101
      
101
 
102
      $obs_existe=false;
102
      $obs_existe=false;
103
      
103
 
104
      if ($nb_requete_mesure  == 0) {  // Pas de mesure on peut modifier 
104
      if ($nb_requete_mesure  == 0) {  // Pas de mesure on peut modifier
105
      	  echo "<td>"."<input type=\"submit\" class=\"submit\"  name=\"".$station['STATION_ID']."\" value=\"Modifier\"></td>";		  
105
      	  echo "<td>"."<input type=\"submit\" class=\"submit\"  name=\"".$station['STATION_ID']."\" value=\"Modifier\"></td>";
106
      }
106
      }
Line 107... Line 107...
107
      else {
107
      else {
Line 108... Line 108...
108
      	   $obs_existe=true;
108
      	   $obs_existe=true;
109
      	  echo "<td></td>";
109
      	  echo "<td></td>";
110
      }
110
      }
111
  
111
 
112
  	  echo "</tr>";
112
  	  echo "</tr>";
113
 
113
 
114
 
114
 
115
  
115
 
116
 
116
 
Line 117... Line -...
117
	 $requete_obs_annee = mysql_query("select distinct SEQUENCE.SEQUENCE_ID, ESPECE_NOM_VERNACULAIRE, STATION_NOM from SEQUENCE,ESPECE,STATION,MESURE ".
-
 
118
	"where ESPECE.ESPECE_ID=SEQUENCE.ESPECE_ID".
-
 
119
	" and MESURE.SEQUENCE_ID=SEQUENCE.SEQUENCE_ID".
-
 
120
	" and SEQUENCE.PARTICIPANT_ID=".$_SESSION['participant'].
117
	 $requete_obs_annee = mysql_query("select distinct SEQUENCE.SEQUENCE_ID, ESPECE_NOM_VERNACULAIRE, STATION_NOM from SEQUENCE,ESPECE,STATION,MESURE ".
121
	" and STATION.STATION_ID=". $station['STATION_ID'] .
118
	"where ESPECE.ESPECE_ID=SEQUENCE.ESPECE_ID".
122
	" and STATION.STATION_ID=SEQUENCE.STATION_ID". 
119
	" and MESURE.SEQUENCE_ID=SEQUENCE.SEQUENCE_ID".
123
	" AND MESURE_DATE!='0000-00-00' and MESURE_DATE>'".($annee-1).($mois)."-01'".
120
	" and SEQUENCE.PARTICIPANT_ID=".$_SESSION['participant'].
124
	" and MESURE_DATE<'".($annee).($mois)."-01'".
121
	" and STATION.STATION_ID=". $station['STATION_ID'] .
125
	" order by STATION_NOM, ESPECE_NOM_VERNACULAIRE");
122
	" and STATION.STATION_ID=SEQUENCE.STATION_ID".
126
 
123
	" AND MESURE_DATE!='0000-00-00' and MESURE_DATE>'".($annee-2).'-'.($mois)."-01'".
127
 
124
	" and MESURE_DATE<'".($annee).'-'.($mois)."-01'".
128
 
125
	" order by STATION_NOM, ESPECE_NOM_VERNACULAIRE");
129
	
126
 
130
	$nb_requete_obs_annee = mysql_num_rows($requete_obs_annee);
127
	$nb_requete_obs_annee = mysql_num_rows($requete_obs_annee);
131
	
128
 
132
	if (($nb_requete_obs_annee  == 0) && ($obs_existe)) {
129
	if (($nb_requete_obs_annee  == 0) && ($obs_existe)) {
133
		echo "<tr>";
130
		echo "<tr>";
134
		echo "<td>Observations archivées </td>";
131
		echo "<td>Observations archivées </td>";
135
		echo "</tr>";
132
		echo "</tr>";
136
	   	
133
 
137
	}
134
	}
138
	
135
 
139
	while ($obs = mysql_fetch_assoc($requete_obs_annee)) {
136
	while ($obs = mysql_fetch_assoc($requete_obs_annee)) {
140
		echo "<tr>";
137
		echo "<tr>";
141
		echo "<td>Espèce : <a title=\"Ajouter/modifier des observations\" href=\"".$url_page."&sequence_id=".$obs['SEQUENCE_ID']."\">".$obs['ESPECE_NOM_VERNACULAIRE']."</a></td>";
138
		echo "<td>Espèce : <a title=\"Ajouter/modifier des observations\" href=\"".$url_page."&sequence_id=".$obs['SEQUENCE_ID']."\">".$obs['ESPECE_NOM_VERNACULAIRE']."</a></td>";
142
		echo "</tr>";
139
		echo "</tr>";
143
	}
140
	}
144
  	  
141
 
145
  	 echo "<tr>";
142
  	 echo "<tr>";
146
	 echo "</tr>";
143
	 echo "</tr>";
147
	 echo "<tr>";
144
	 echo "<tr>";
148
	 echo "</tr>";
145
	 echo "</tr>";
149
          
146
 
150
  }
147
  }
151
  	
148
 
152
  
149
 
153
  
150
 
154
  	// On retient la premiere station pour centrage
151
  	// On retient la premiere station pour centrage
155
  	
152
 
156
  	$init_lat=$stations[0]['STATION_LATITUDE'];
153
  	$init_lat=$stations[0]['STATION_LATITUDE'];
157
 	$init_lon=$stations[0]['STATION_LONGITUDE'];
154
 	$init_lon=$stations[0]['STATION_LONGITUDE'];
158
 		
155
 
159
  	
156
 
160
  }
157
  }
161
  else {
158
  else {
162
  	
159
 
163
  	// Pas de stations : affichage centre carte france
160
  	// Pas de stations : affichage centre carte france
164
  	// FONCTIONNEMENT_TESTE_ET_OK
161
  	// FONCTIONNEMENT_TESTE_ET_OK
165
  	
162
 
166
  	
163
 
167
 	$init_lat=45.545;
164
 	$init_lat=45.545;
168
 	$init_lon=3.249722;
165
 	$init_lon=3.249722;
169
 	
166
 
170
  	echo "<td><strong>Pas de station enregistr&eacute;e</strong></td>";
167
  	echo "<td><strong>Pas de station enregistr&eacute;e</strong></td>";
171
  	echo "<td></td>";
168
  	echo "<td></td>";
172
  	echo "<td></td>";
169
  	echo "<td></td>";
173
  	echo "<td></td>";
170
  	echo "<td></td>";
174
  	echo "<td></td>";
171
  	echo "<td></td>";
175
  	echo "<td></td>";
172
  	echo "<td></td>";
176
  	echo "</tr>";
173
  	echo "</tr>";
Line 177... Line 174...
177
  	  
174
 
178
 	
175
 
Line 179... Line 176...
179
 	 
176
 
180
  }
177
  }
181
  
178
 
Line 182... Line 179...
182
  echo "</table>";
179
  echo "</table>";
183
  echo "</form>";
180
  echo "</form>";
Line 207... Line 204...
207
				<input id="ll_longitude" name="ll_longitude"  type="hidden" value="" />
204
				<input id="ll_longitude" name="ll_longitude"  type="hidden" value="" />
208
				<input id="ll_longitude_dms" name="ll_longitude_dms"  type="hidden" value="" />
205
				<input id="ll_longitude_dms" name="ll_longitude_dms"  type="hidden" value="" />
209
				<input id="ll_altitude" name="ll_altitude"  type="hidden" value="" />
206
				<input id="ll_altitude" name="ll_altitude"  type="hidden" value="" />
210
				<input id="form_coordonnee_valider" name="valid_station" class="submit" type="hidden" value="Poursuivre" />
207
				<input id="form_coordonnee_valider" name="valid_station" class="submit" type="hidden" value="Poursuivre" />
211
				<input type="hidden" name="etape" value="3">
208
				<input type="hidden" name="etape" value="3">
212
				<input type="hidden" name="provenance" value="<?= $provenance ?>">				
209
				<input type="hidden" name="provenance" value="<?= $provenance ?>">
213
			</li>
210
			</li>
214
		</ul>
211
		</ul>
215
	
212
 
216
</form>
213
</form>
Line 217... Line 214...
217
 
214
 
Line 230... Line 227...
230
?>
227
?>
231
<script type="text/javascript" src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAFMANWib9GSm7T4W6AN9qzxRmHYqXwt_BUwczny2vFmnHz3sr3BTy_SMRJ-NzWXDUynHHSWQ7_aEZ6Q" type="text/javascript"></script>
228
<script type="text/javascript" src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAFMANWib9GSm7T4W6AN9qzxRmHYqXwt_BUwczny2vFmnHz3sr3BTy_SMRJ-NzWXDUynHHSWQ7_aEZ6Q" type="text/javascript"></script>
232
<?php
229
<?php
233
}
230
}
Line 234... Line 231...
234
 
231
 
235
 
232
 
Line 236... Line 233...
236
// Centrage initial : premiere station ou ville d'inscription
233
// Centrage initial : premiere station ou ville d'inscription
237
 
234
 
238
   echo "<script type=\"text/javascript\">";
235
   echo "<script type=\"text/javascript\">";
239
   echo "\n//<![CDATA[\n";
236
   echo "\n//<![CDATA[\n";
240
   echo "var init_lat = ".$init_lat.";\n";
237
   echo "var init_lat = ".$init_lat.";\n";
241
   echo "var init_long = ".$init_lon.";\n";
238
   echo "var init_long = ".$init_lon.";\n";
Line 242... Line 239...
242
   
239
 
243
?>
240
?>
244
 
241
 
245
 
242
 
246
	var largeur_carte = 690;
243
	var largeur_carte = 690;
247
	var haureur_retrait = 330;
244
	var haureur_retrait = 330;
248
	
245
 
249
	var init_zoom = 10;
246
	var init_zoom = 10;
250
	
247
 
251
// Contient la carte GoogleMap
248
// Contient la carte GoogleMap
Line 289... Line 286...
289
		map.enableContinuousZoom();
286
		map.enableContinuousZoom();
290
		// Zoom avec la molette de la souris
287
		// Zoom avec la molette de la souris
291
		map.enableScrollWheelZoom();
288
		map.enableScrollWheelZoom();
292
		// Zoom avec le double clic de la souris
289
		// Zoom avec le double clic de la souris
293
		map.enableDoubleClickZoom();
290
		map.enableDoubleClickZoom();
294
		
291
 
295
		// Création du GéoCoder
292
		// Création du GéoCoder
296
		EfGeocoder = new GClientGeocoder() ;
293
		EfGeocoder = new GClientGeocoder() ;
297
		
294
 
298
		// Icone station enregistrees (vert)
295
		// Icone station enregistrees (vert)
299
		icon = new GIcon();
296
		icon = new GIcon();
300
		icon.image = "http://www.google.com/mapfiles/ms/micons/green-dot.png";
297
		icon.image = "http://www.google.com/mapfiles/ms/micons/green-dot.png";
301
		icon.shadow = "http://www.google.com/mapfiles/shadow50.png";
298
		icon.shadow = "http://www.google.com/mapfiles/shadow50.png";
302
        icon.iconSize = new GSize(34, 34);
299
        icon.iconSize = new GSize(34, 34);
303
        icon.shadowSize = new GSize(37, 34);
300
        icon.shadowSize = new GSize(37, 34);
304
        icon.iconAnchor = new GPoint(16, 34);
301
        icon.iconAnchor = new GPoint(16, 34);
305
        // Pour affichage infobulle
302
        // Pour affichage infobulle
306
        icon.infoWindowAnchor = new GPoint(5,1);
303
        icon.infoWindowAnchor = new GPoint(5,1);
307
        
304
 
Line 308... Line 305...
308
 
305
 
309
		// Icone nouvelle  station (rouge) ou station en modification
306
		// Icone nouvelle  station (rouge) ou station en modification
310
		Nicon = new GIcon();
307
		Nicon = new GIcon();
311
		Nicon.image = "http://www.google.com/mapfiles/ms/micons/red-dot.png";
308
		Nicon.image = "http://www.google.com/mapfiles/ms/micons/red-dot.png";
Line 315... Line 312...
315
        Nicon.iconAnchor = new GPoint(16, 34);
312
        Nicon.iconAnchor = new GPoint(16, 34);
316
        // Pour affichage infobulle
313
        // Pour affichage infobulle
317
        Nicon.infoWindowAnchor = new GPoint(5,1);
314
        Nicon.infoWindowAnchor = new GPoint(5,1);
Line 318... Line 315...
318
 
315
 
Line 319... Line 316...
319
 
316
 
Line 320... Line 317...
320
	    
317
 
321
 
318
 
322
	// Creates a marker at the given point with the given number label
319
	// Creates a marker at the given point with the given number label
323
 
320
 
324
		function createMarker(point, text, altitude, envir) {
321
		function createMarker(point, text, altitude, envir) {
325
		  var marker = new GMarker(point,icon);
322
		  var marker = new GMarker(point,icon);
326
		  var html = text;
323
		  var html = text;
327
		  GEvent.addListener(marker, "click", function() {
324
		  GEvent.addListener(marker, "click", function() {
328
		  	map.setCenter(marker.getPoint());
325
		  	map.setCenter(marker.getPoint());
329
			afficherInfo(marker.getPoint());
326
			afficherInfo(marker.getPoint());
Line 330... Line 327...
330
		    afficherMasque(marker,text,altitude,envir);	 
327
		    afficherMasque(marker,text,altitude,envir);
331
		  	});
328
		  	});
332
		  return marker;
329
		  return marker;
333
		}
330
		}
334
 
331
 
335
	// Affichage des stations presentes TODO : et si plusieurs  stations  au meme endroit ? Utiliser cluster ? 
332
	// Affichage des stations presentes TODO : et si plusieurs  stations  au meme endroit ? Utiliser cluster ?
336
		
333
 
337
        <? foreach($stations as $station) { ?>
334
        <? foreach($stations as $station) { ?>
338
          var point = new GLatLng(<?= $station['STATION_LATITUDE'] ?>, <?= $station['STATION_LONGITUDE'] ?>);
335
          var point = new GLatLng(<?= $station['STATION_LATITUDE'] ?>, <?= $station['STATION_LONGITUDE'] ?>);
339
          map.addOverlay(createMarker(point, "<?= $station['STATION_NOM'] ?>","<?= $station['STATION_ALTITUDE'] ?>", "<?= $station['ENVIRONNEMENT_NOM'] ?>"));
336
          map.addOverlay(createMarker(point, "<?= $station['STATION_NOM'] ?>","<?= $station['STATION_ALTITUDE'] ?>", "<?= $station['ENVIRONNEMENT_NOM'] ?>"));
Line 379... Line 376...
379
	addrpnt.enableDragging() ;
376
	addrpnt.enableDragging() ;
380
	map.addOverlay(addrpnt) ;
377
	map.addOverlay(addrpnt) ;
381
	GEvent.addListener(addrpnt,'dragend',function() {
378
	GEvent.addListener(addrpnt,'dragend',function() {
382
			map.setCenter(addrpnt.getPoint());
379
			map.setCenter(addrpnt.getPoint());
383
			afficherInfo(addrpnt.getPoint());
380
			afficherInfo(addrpnt.getPoint());
384
		    afficherMasque(addrpnt,"");	 
381
		    afficherMasque(addrpnt,"");
385
                         
382
 
386
		}) ;
383
		}) ;
387
		
384
 
388
	GEvent.addListener(addrpnt, "click", function() {
385
	GEvent.addListener(addrpnt, "click", function() {
389
		  	map.setCenter(addrpnt.getPoint());
386
		  	map.setCenter(addrpnt.getPoint());
390
			afficherInfo(addrpnt.getPoint());
387
			afficherInfo(addrpnt.getPoint());
391
		    afficherMasque(addrpnt,"");	 
388
		    afficherMasque(addrpnt,"");
392
		  	});
389
		  	});
393
		  	
390
 
394
	afficherInfo(position);
391
	afficherInfo(position);
395
}
392
}
Line 396... Line 393...
396
 
393
 
Line 397... Line 394...
397
// Masque de mise a jour station :
394
// Masque de mise a jour station :
398
 
395
 
399
function afficherMasque(position,nom,altitude,envir) {
396
function afficherMasque(position,nom,altitude,envir) {
400
	
397
 
401
	// On recupere les données du formulaire (caché) , notamment pour traiter simplement l'appel asynchrone de recup altitude
398
	// On recupere les données du formulaire (caché) , notamment pour traiter simplement l'appel asynchrone de recup altitude
402
	
399
 
403
	           			 var html = "<table>";
400
	           			 var html = "<table>";
404
	           			 if (nom.length>0) {
401
	           			 if (nom.length>0) {
405
	           			 	  html = html + "<tr><td>Station :</td> <td>" + nom + "</td> </tr>";
402
	           			 	  html = html + "<tr><td>Station :</td> <td>" + nom + "</td> </tr>";
406
	           			 	 
403
 
407
	           			 	  
404
 
408
	           			 	  
405
 
409
	           		
406
 
410
  							html = html + "<tr><td>Environnement :</td> <td>" + envir + "</td> </tr>";
407
  							html = html + "<tr><td>Environnement :</td> <td>" + envir + "</td> </tr>";
411
  							
408
 
412
							html = html + "</td></tr>";
409
							html = html + "</td></tr>";
413
						
410
 
414
							
411
 
415
							
412
 
416
	           			 }
413
	           			 }
417
	           			 else {
414
	           			 else {
418
	           			 	 html = html + "<tr><td>Station</td> <td><input type='text' id='nom_station' value=''/> </td> </tr>";
415
	           			 	 html = html + "<tr><td>Station</td> <td><input type='text' id='nom_station' value=''/> </td> </tr>";
419
	           			 	 <?
416
	           			 	 <?
Line 420... Line 417...
420
								$requete_environnement = mysql_query("select ENVIRONNEMENT_ID, ENVIRONNEMENT_NOM from ENVIRONNEMENT");
417
								$requete_environnement = mysql_query("select ENVIRONNEMENT_ID, ENVIRONNEMENT_NOM from ENVIRONNEMENT");
421
							?>
418
							?>
422
 
419
 
423
							html = html + "<tr><td>Environnement :</td>";
420
							html = html + "<tr><td>Environnement :</td>";
424
							html = html + "<td><select id='environnement_id' name='environnement'>";
421
							html = html + "<td><select id='environnement_id' name='environnement'>";
425
						
422
 
426
							<? while ($env = mysql_fetch_row($requete_environnement)) { ?>
423
							<? while ($env = mysql_fetch_row($requete_environnement)) { ?>
427
							html = html + "<option value='<?= $env[0] ?>'><?= $env[1] ?>";
424
							html = html + "<option value='<?= $env[0] ?>'><?= $env[1] ?>";
428
							<? } ?>
425
							<? } ?>
429
						
426
 
430
 							html = html + "</select></td></tr>";
427
 							html = html + "</select></td></tr>";
431
	           			 	 
428
 
432
	           			 } 
429
	           			 }
433
	           			 
430
 
434
		   
431
 
435
	   					 						
432
 
436
			
433
 
437
	           			 html = html + "<tr><td>Latitude :</td> <td>" +document.getElementById('ll_latitude').value + "</td> </tr>" ;
434
	           			 html = html + "<tr><td>Latitude :</td> <td>" +document.getElementById('ll_latitude').value + "</td> </tr>" ;
438
                         html = html + "<tr><td>Latitude :</td> <td>" +document.getElementById('ll_latitude').value + "</td> </tr>" ;
435
                         html = html + "<tr><td>Latitude :</td> <td>" +document.getElementById('ll_latitude').value + "</td> </tr>" ;
Line 444... Line 441...
444
                         	html = html + "<tr><td>Altitude :</td> <td>" + document.getElementById('ll_altitude').value + "</td> </tr>";
441
                         	html = html + "<tr><td>Altitude :</td> <td>" + document.getElementById('ll_altitude').value + "</td> </tr>";
445
                         }
442
                         }
446
                         if (nom.length==0) {
443
                         if (nom.length==0) {
447
	           			 	html = html + "<tr><td></td><td><input type='button' value='Enregistrer' onclick='saveData()'/></td></tr>";
444
	           			 	html = html + "<tr><td></td><td><input type='button' value='Enregistrer' onclick='saveData()'/></td></tr>";
448
	           			 }
445
	           			 }
449
                         
446
 
450
                         
447
 
451
              position.openInfoWindow(html);
448
              position.openInfoWindow(html);
452
 
449
 
453
}
450
}
Line 454... Line 451...
454
 
451
 
Line 455... Line 452...
455
 
452
 
Line 456... Line 453...
456
// Sauvegarde station 
453
// Sauvegarde station
457
 
454
 
458
// TODO : Retrouver marker depuis lat/lon
455
// TODO : Retrouver marker depuis lat/lon
459
 
456
 
460
 function saveData() {
457
 function saveData() {
461
 	
458
 
462
      var nom_station = escape(document.getElementById("nom_station").value);
459
      var nom_station = escape(document.getElementById("nom_station").value);
Line 463... Line 460...
463
      var lat_station = document.getElementById("ll_latitude").value;
460
      var lat_station = document.getElementById("ll_latitude").value;
464
      var lon_station = document.getElementById("ll_longitude").value;
461
      var lon_station = document.getElementById("ll_longitude").value;
465
      var alt_station = document.getElementById("ll_altitude").value;
462
      var alt_station = document.getElementById("ll_altitude").value;
466
	  var environnement_id = document.getElementById("environnement_id").value;
463
	  var environnement_id = document.getElementById("environnement_id").value;
467
 
464
 
468
      var url = "modules/observations/sauvegarde_station.php?nom_station=" + nom_station + "&action=C" + "&lat_station=" + lat_station +
465
      var url = "modules/observations/sauvegarde_station.php?nom_station=" + nom_station + "&action=C" + "&lat_station=" + lat_station +
469
               "&lon_station=" + lon_station +  "&environnement_id=" + environnement_id + "&alt_station=" + alt_station + "&participant_id=<?= $_SESSION['participant'] ?>";
466
               "&lon_station=" + lon_station +  "&environnement_id=" + environnement_id + "&alt_station=" + alt_station + "&participant_id=<?= $_SESSION['participant'] ?>";
470
               
467
 
Line 482... Line 479...
482
 
479
 
483
function afficherCoordonnees(lati, longi) {
480
function afficherCoordonnees(lati, longi) {
484
	var ellipsoid = 21;// 21 = WGS-84 (voir geo_constants)
481
	var ellipsoid = 21;// 21 = WGS-84 (voir geo_constants)
485
	var xtm = 0;// 0 = UTM et 1= MTM
482
	var xtm = 0;// 0 = UTM et 1= MTM
486
	var Coordonnee = calculer_coordonnee(lati, longi, ellipsoid, xtm);
483
	var Coordonnee = calculer_coordonnee(lati, longi, ellipsoid, xtm);
487
	
484
 
488
	// Nous affichons des informations.
485
	// Nous affichons des informations.
489
	document.getElementById('ll_latitude').value =  Coordonnee.latitude.toFixed(4);
486
	document.getElementById('ll_latitude').value =  Coordonnee.latitude.toFixed(4);
490
	document.getElementById('ll_longitude').value = Coordonnee.longitude.toFixed(4);
487
	document.getElementById('ll_longitude').value = Coordonnee.longitude.toFixed(4);
491
	document.getElementById('ll_latitude_dms').value = Coordonnee.latitude_dms;
488
	document.getElementById('ll_latitude_dms').value = Coordonnee.latitude_dms;
Line 492... Line 489...
492
	document.getElementById('ll_longitude_dms').value = Coordonnee.longitude_dms;
489
	document.getElementById('ll_longitude_dms').value = Coordonnee.longitude_dms;
493
 
490
 
494
 	// Calcul altitude
491
 	// Calcul altitude
495
 	var script = document.createElement('script');
492
 	var script = document.createElement('script');
496
    document.body.appendChild(script);
493
    document.body.appendChild(script);
497
    script.src = 'http://ws.geonames.org/' + "srtm3" + 'JSON?lat=' + lati + '&lng=' + longi + '&callback=GetAltitude';
494
    script.src = 'http://ws.geonames.org/' + "srtm3" + 'JSON?lat=' + lati + '&lng=' + longi + '&callback=GetAltitude';
498
    
495
 
Line 499... Line 496...
499
 		
496
 
500
}
497
}
501
 
498
 
Line 502... Line 499...
502
function GetAltitude(result ) {
499
function GetAltitude(result ) {
503
			document.getElementById('ll_altitude').value = result.srtm3;
500
			document.getElementById('ll_altitude').value = result.srtm3;
Line -... Line 501...
-
 
501
}
Line 504... Line 502...
504
} 
502
 
505
 
503
window.onload = load
Line 506... Line 504...
506
window.onload = load
504
window.onunload = GUnload
Line 507... Line 505...
507
window.onunload = GUnload
505
 
Line 525... Line 523...
525
*     da:       Change in semi-major axis length (meters); "to" minus "from"
523
*     da:       Change in semi-major axis length (meters); "to" minus "from"
526
*     df:       Change in flattening; "to" minus "from"  (double)
524
*     df:       Change in flattening; "to" minus "from"  (double)
527
*     dx:       Change in x between "from" and "to" datum.  (double)
525
*     dx:       Change in x between "from" and "to" datum.  (double)
528
*     dy:       Change in y between "from" and "to" datum.  (double)
526
*     dy:       Change in y between "from" and "to" datum.  (double)
529
*     dz:       Change in z between "from" and "to" datum.  (double)
527
*     dz:       Change in z between "from" and "to" datum.  (double)
530
* 
528
*
531
* Paramêtres :
529
* Paramêtres :
532
* 	from :		l'objet GeodesiquePosition à transformer (contient latitute, longitude et hauteur)
530
* 	from :		l'objet GeodesiquePosition à transformer (contient latitute, longitude et hauteur)
533
* 	from_a : 	le demi grand axe (=a) de l'ellipsoïde utilisé pour la position géodésique contenu dans l'objet "from".
531
* 	from_a : 	le demi grand axe (=a) de l'ellipsoïde utilisé pour la position géodésique contenu dans l'objet "from".
534
* 	from_f :	l'applatissement (=f) = 1/valeur... de l'ellipsoïde de l'objet "from"
532
* 	from_f :	l'applatissement (=f) = 1/valeur... de l'ellipsoïde de l'objet "from"
535
* 	from_esq :	l'excentricité au carré de l'ellipsoïde de l'objet "from"
533
* 	from_esq :	l'excentricité au carré de l'ellipsoïde de l'objet "from"
Line 546... Line 544...
546
	var clon = Math.cos (from.lon);
544
	var clon = Math.cos (from.lon);
547
	var ssqlat = slat * slat;
545
	var ssqlat = slat * slat;
548
	// "a divided by b"
546
	// "a divided by b"
549
	var adb = 1.0 / (1.0 - from_f);
547
	var adb = 1.0 / (1.0 - from_f);
550
	var dlat, dlon, dh;
548
	var dlat, dlon, dh;
551
	
549
 
552
	var rn = from_a / Math.sqrt (1.0 - from_esq * ssqlat);
550
	var rn = from_a / Math.sqrt (1.0 - from_esq * ssqlat);
553
	var rm = from_a * (1. - from_esq) / Math.pow ((1.0 - from_esq * ssqlat), 1.5);
551
	var rm = from_a * (1. - from_esq) / Math.pow ((1.0 - from_esq * ssqlat), 1.5);
554
	
552
 
555
	dlat = (((((-dx * slat * clon - dy * slat * slon) + dz * clat) + (da * ((rn * from_esq * slat * clat) / from_a))) + (df * (rm * adb + rn / adb) * slat * clat))) / (rm + from.h);
553
	dlat = (((((-dx * slat * clon - dy * slat * slon) + dz * clat) + (da * ((rn * from_esq * slat * clat) / from_a))) + (df * (rm * adb + rn / adb) * slat * clat))) / (rm + from.h);
556
	
554
 
557
	dlon = (-dx * slon + dy * clon) / ((rn + from.h) * clat);
555
	dlon = (-dx * slon + dy * clon) / ((rn + from.h) * clat);
558
	
556
 
559
	dh = (dx * clat * clon) + (dy * clat * slon) + (dz * slat) - (da * (from_a / rn)) + ((df * rn * ssqlat) / adb);
557
	dh = (dx * clat * clon) + (dy * clat * slon) + (dz * slat) - (da * (from_a / rn)) + ((df * rn * ssqlat) / adb);
560
	
558
 
561
	// Retour des données sous forme d'objet
559
	// Retour des données sous forme d'objet
562
	var GeodeticPosition = 	{	lon: from.lon + dlon,
560
	var GeodeticPosition = 	{	lon: from.lon + dlon,
563
								lat: from.lat + dlat,
561
								lat: from.lat + dlat,
564
								h: from.h + dh
562
								h: from.h + dh
565
							};
563
							};
566
	
564
 
567
	return GeodeticPosition;
565
	return GeodeticPosition;
568
}
566
}
Line 569... Line 567...
569
 
567
 
570
function test_transform() {
568
function test_transform() {
Line 598... Line 596...
598
	ellipsoid_axis[17] = 6378160; ellipsoid_eccen[17] = 0.006694542;  // s america
596
	ellipsoid_axis[17] = 6378160; ellipsoid_eccen[17] = 0.006694542;  // s america
599
	ellipsoid_axis[18] = 6378165; ellipsoid_eccen[18] = 0.006693422;  // wgs-60
597
	ellipsoid_axis[18] = 6378165; ellipsoid_eccen[18] = 0.006693422;  // wgs-60
600
	ellipsoid_axis[19] = 6378145; ellipsoid_eccen[19] = 0.006694542;  // wgs-66
598
	ellipsoid_axis[19] = 6378145; ellipsoid_eccen[19] = 0.006694542;  // wgs-66
601
	ellipsoid_axis[20] = 6378135; ellipsoid_eccen[20] = 0.006694318;  // wgs-72
599
	ellipsoid_axis[20] = 6378135; ellipsoid_eccen[20] = 0.006694318;  // wgs-72
602
	ellipsoid_axis[21] = 6378137; ellipsoid_eccen[21] = 0.00669438;  //wgs-84 (et NAD83 : pourquoi mis avec WGS84 ?)
600
	ellipsoid_axis[21] = 6378137; ellipsoid_eccen[21] = 0.00669438;  //wgs-84 (et NAD83 : pourquoi mis avec WGS84 ?)
603
	
601
 
604
	if (ellipsoid == 0) {
602
	if (ellipsoid == 0) {
605
		ellipsoid = 22;
603
		ellipsoid = 22;
606
	}
604
	}
607
	
605
 
608
	--ellipsoid; // table indexed differently
606
	--ellipsoid; // table indexed differently
609
	
607
 
610
	if (xtm == 1) {
608
	if (xtm == 1) {
611
		// WAS: if (ellipsoid > 22)
609
		// WAS: if (ellipsoid > 22)
612
		scaleTm = 0.9999;
610
		scaleTm = 0.9999;
613
		eastingOrg = 304800.;
611
		eastingOrg = 304800.;
614
	} else {
612
	} else {
Line 657... Line 655...
657
function parseCoordinate(coordinate, type, format, spaced) {
655
function parseCoordinate(coordinate, type, format, spaced) {
658
	var coordd;
656
	var coordd;
659
	var coordm;
657
	var coordm;
660
	var coords;
658
	var coords;
661
	var coordh = 0;
659
	var coordh = 0;
662
	
660
 
663
	if (coordinate.search(/(^ *-|[WOS])/i) >= 0) {
661
	if (coordinate.search(/(^ *-|[WOS])/i) >= 0) {
664
		coordh = -1;
662
		coordh = -1;
665
	}
663
	}
666
	if (coordinate.search(/(^ *\+|[NE])/i) >= 0) {
664
	if (coordinate.search(/(^ *\+|[NE])/i) >= 0) {
667
		coordh = 1;
665
		coordh = 1;
668
	}
666
	}
669
	
667
 
670
	// if (coordinate.search(/[EW]/i) >= 0 && !type) { type = 'lon'; }
668
	// if (coordinate.search(/[EW]/i) >= 0 && !type) { type = 'lon'; }
671
	// if (coordinate.search(/[NS]/i) >= 0 && !type) { type = 'lat'; }
669
	// if (coordinate.search(/[NS]/i) >= 0 && !type) { type = 'lat'; }
672
	
670
 
673
	coordinate = coordinate.replace(/,/g, '.');  // french commas
671
	coordinate = coordinate.replace(/,/g, '.');  // french commas
674
	// not sure really needed.
672
	// not sure really needed.
675
	coordinate = coordinate.replace(/[NESWO+\-]/gi,' ');  // add also: °, ', "  --  or replace everything that is not a number or a dot
673
	coordinate = coordinate.replace(/[NESWO+\-]/gi,' ');  // add also: °, ', "  --  or replace everything that is not a number or a dot
676
	
674
 
677
	// alert("coordinate = " + coordinate);
675
	// alert("coordinate = " + coordinate);
678
	if (coordinate.search(/[0-9]/i) < 0) {
676
	if (coordinate.search(/[0-9]/i) < 0) {
679
		alert("Can't parse input field");
677
		alert("Can't parse input field");
680
		coordd = "";
678
		coordd = "";
681
		return;
679
		return;
Line 710... Line 708...
710
		}
708
		}
711
		// n = parseFloat(parts[1]);
709
		// n = parseFloat(parts[1]);
712
		// if (parts[2]) { n = n + parseFloat(parts[2])/60; }
710
		// if (parts[2]) { n = n + parseFloat(parts[2])/60; }
713
		// if (parts[3]) { n = n + parseFloat(parts[3])/3600; }
711
		// if (parts[3]) { n = n + parseFloat(parts[3])/3600; }
714
	}
712
	}
715
	
713
 
716
	// Retour des données sous forme d'objet
714
	// Retour des données sous forme d'objet
717
	var Coordonnee = 	{	coordd: coordd,
715
	var Coordonnee = 	{	coordd: coordd,
718
							coordm: coordm,
716
							coordm: coordm,
719
							coords: coords,
717
							coords: coords,
720
							coordh: coordh
718
							coordh: coordh
Line 749... Line 747...
749
	if (lon < 0)
747
	if (lon < 0)
750
		lonbrg = 1;
748
		lonbrg = 1;
751
	// LEW: have to round here, else could end up with 60 seconds :-)
749
	// LEW: have to round here, else could end up with 60 seconds :-)
752
	var tlat = Math.abs(lat) + 0.5 / 360000;  // round up 0.005 seconds (1/100th)
750
	var tlat = Math.abs(lat) + 0.5 / 360000;  // round up 0.005 seconds (1/100th)
753
	var tlon = Math.abs(lon) + 0.5 / 360000;
751
	var tlon = Math.abs(lon) + 0.5 / 360000;
754
	
752
 
755
	var tlatdm = Math.abs(lat) + 0.5 / 60000;  // round up 0.0005 minutes (1/1000th)
753
	var tlatdm = Math.abs(lat) + 0.5 / 60000;  // round up 0.0005 minutes (1/1000th)
756
	var tlondm = Math.abs(lon) + 0.5 / 60000;
754
	var tlondm = Math.abs(lon) + 0.5 / 60000;
757
	
755
 
758
	var deglat = Math.floor(tlat);
756
	var deglat = Math.floor(tlat);
759
	var t = (tlat - deglat) * 60;
757
	var t = (tlat - deglat) * 60;
760
	var minlat = Math.floor(t);
758
	var minlat = Math.floor(t);
761
	
759
 
762
	var minlatdm = Math.floor((tlatdm - Math.floor(tlatdm)) * 60 * 1000) / 1000;
760
	var minlatdm = Math.floor((tlatdm - Math.floor(tlatdm)) * 60 * 1000) / 1000;
763
	
761
 
764
	var seclat = (t - minlat) * 60;
762
	var seclat = (t - minlat) * 60;
765
	seclat = Math.floor(seclat * 100) / 100;  //  works in js 1.4
763
	seclat = Math.floor(seclat * 100) / 100;  //  works in js 1.4
766
	// seclat = seclat.toFixed(2);  // 2 decimal places js 1.5 and later
764
	// seclat = seclat.toFixed(2);  // 2 decimal places js 1.5 and later
767
	
765
 
768
	var deglon = Math.floor(tlon);
766
	var deglon = Math.floor(tlon);
769
	
767
 
770
	t = (tlon - deglon) * 60;
768
	t = (tlon - deglon) * 60;
771
	var minlon = Math.floor(t);
769
	var minlon = Math.floor(t);
772
	
770
 
773
	var minlondm = Math.floor((tlondm - Math.floor(tlondm)) * 60 * 1000) / 1000;
771
	var minlondm = Math.floor((tlondm - Math.floor(tlondm)) * 60 * 1000) / 1000;
Line 774... Line 772...
774
 
772
 
775
	var seclon = (t - minlon) * 60;
773
	var seclon = (t - minlon) * 60;
776
	seclon = Math.floor(seclon * 100) / 100;  // js 1.4
774
	seclon = Math.floor(seclon * 100) / 100;  // js 1.4
Line 789... Line 787...
789
		lonb = 'E'; // 2 = E (est)
787
		lonb = 'E'; // 2 = E (est)
790
	} else {
788
	} else {
791
		lonb = 'W';// 1 = W (west)
789
		lonb = 'W';// 1 = W (west)
792
	}
790
	}
793
	var londms = deglon + "° " + minlon + "' " + seclon + "\"";
791
	var londms = deglon + "° " + minlon + "' " + seclon + "\"";
794
	
792
 
795
	var chaine_latlon_dms = latdms + '  ' + latb + '  ' + londms + '  ' + lonb;
793
	var chaine_latlon_dms = latdms + '  ' + latb + '  ' + londms + '  ' + lonb;
796
	
794
 
797
	// Retour des données sous forme d'objet
795
	// Retour des données sous forme d'objet
798
	var LatLongDms = 	{	lat: lat,
796
	var LatLongDms = 	{	lat: lat,
799
							lat_degre: Math.floor(tlatdm),
797
							lat_degre: Math.floor(tlatdm),
800
							lat_min: minlatdm,
798
							lat_min: minlatdm,
801
							lat_s: seclat,
799
							lat_s: seclat,
Line 866... Line 864...
866
	var valid = validate_dms(latd, latm, lats, latb, lonm, lond, lons, lonb);
864
	var valid = validate_dms(latd, latm, lats, latb, lonm, lond, lons, lonb);
867
	if (valid == 0) {
865
	if (valid == 0) {
868
		alert("Invalid degrees, minutes or seconds");
866
		alert("Invalid degrees, minutes or seconds");
869
		return;
867
		return;
870
	}
868
	}
871
	
869
 
872
	var lat = Number(latd);
870
	var lat = Number(latd);
873
	lat = lat + Number(latm) / 60;
871
	lat = lat + Number(latm) / 60;
874
	lat = lat + Number(lats) / 3600;
872
	lat = lat + Number(lats) / 3600;
875
	if (latb == 'S') {  // 2 = S
873
	if (latb == 'S') {  // 2 = S
876
		lat = lat * -1;
874
		lat = lat * -1;
Line 930... Line 928...
930
	var easting = (k0 * N * (A + (1 - T + C) * A * A * A / 6 + (5 - 18 * T + T * T + 72 * C - 58 * eccPrimeSquared) * A * A * A * A * A / 120) + eastingOrg);
928
	var easting = (k0 * N * (A + (1 - T + C) * A * A * A / 6 + (5 - 18 * T + T * T + 72 * C - 58 * eccPrimeSquared) * A * A * A * A * A / 120) + eastingOrg);
931
	var northing = (k0 * (M + N * Math.tan(latrad) * (A * A / 2 + (5 - T + 9 * C + 4 * C * C) * A * A * A * A / 24 + (61 - 58 * T + T * T + 600 * C - 330 * eccPrimeSquared) * A * A * A * A * A * A / 720)));
929
	var northing = (k0 * (M + N * Math.tan(latrad) * (A * A / 2 + (5 - T + 9 * C + 4 * C * C) * A * A * A * A / 24 + (61 - 58 * T + T * T + 600 * C - 330 * eccPrimeSquared) * A * A * A * A * A * A / 720)));
932
	if (lat < 0) {
930
	if (lat < 0) {
933
		northing += 10000000.0; //10000000 meter offset for southern hemisphere
931
		northing += 10000000.0; //10000000 meter offset for southern hemisphere
934
	}
932
	}
935
	
933
 
936
	// xTM
934
	// xTM
937
	// Arrondi au nombre supérieur
935
	// Arrondi au nombre supérieur
938
	// alert("easting = " + easting);
936
	// alert("easting = " + easting);
939
	preciseEasting = easting;
937
	preciseEasting = easting;
940
	easting = Math.floor(easting + .5);
938
	easting = Math.floor(easting + .5);
Line 954... Line 952...
954
	}
952
	}
Line 955... Line 953...
955
 
953
 
956
	// Latitude/Longitude
954
	// Latitude/Longitude
957
	var chaine_latlon = lat + ' ' + latb + ' ' + lon + ' ' + lonb;
955
	var chaine_latlon = lat + ' ' + latb + ' ' + lon + ' ' + lonb;
958
	var LatLongDms = convertir_en_dms(lat,lon);
956
	var LatLongDms = convertir_en_dms(lat,lon);
959
	
957
 
960
	// Retour des données sous forme d'objet
958
	// Retour des données sous forme d'objet
961
	var Coordonnee = {	xtm: x_tm,
959
	var Coordonnee = {	xtm: x_tm,
962
						nord: northing,
960
						nord: northing,
963
						est: easting,
961
						est: easting,