| Line 185... |
Line 185... |
| 185 |
if (VILLE == 'Marseille') {
|
185 |
if (VILLE == 'Marseille') {
|
| 186 |
latLng = new google.maps.LatLng(43.29545, 5.37458);
|
186 |
latLng = new google.maps.LatLng(43.29545, 5.37458);
|
| 187 |
} else if (VILLE == 'Montpellier') {
|
187 |
} else if (VILLE == 'Montpellier') {
|
| 188 |
latLng = new google.maps.LatLng(43.61077, 3.87672);
|
188 |
latLng = new google.maps.LatLng(43.61077, 3.87672);
|
| 189 |
}
|
189 |
}
|
| - |
|
190 |
latLngFin = latLng;
|
| Line 190... |
Line 191... |
| 190 |
|
191 |
|
| 191 |
var options = {
|
192 |
var options = {
|
| 192 |
zoom: 16,
|
193 |
zoom: 16,
|
| 193 |
center: latLng,
|
194 |
center: latLng,
|
| Line 231... |
Line 232... |
| 231 |
if (navigator.geolocation) {
|
232 |
if (navigator.geolocation) {
|
| 232 |
navigator.geolocation.getCurrentPosition(function(position) {
|
233 |
navigator.geolocation.getCurrentPosition(function(position) {
|
| 233 |
var latitude = position.coords.latitude;
|
234 |
var latitude = position.coords.latitude;
|
| 234 |
var longitude = position.coords.longitude;
|
235 |
var longitude = position.coords.longitude;
|
| 235 |
latLng = new google.maps.LatLng(latitude, longitude);
|
236 |
latLng = new google.maps.LatLng(latitude, longitude);
|
| - |
|
237 |
latLngFin = latLng;
|
| 236 |
// si l'utilisateur géolocalise sa ville alors le premier déplacement doit être réinitialisé
|
238 |
// si l'utilisateur géolocalise sa ville alors le premier déplacement doit être réinitialisé
|
| 237 |
premierDeplacement = true;
|
239 |
premierDeplacement = true;
|
| 238 |
deplacerMarker(latLng);
|
240 |
deplacerMarker(latLng);
|
| 239 |
});
|
241 |
});
|
| 240 |
}
|
242 |
}
|
| Line 529... |
Line 531... |
| 529 |
var milieux = [];
|
531 |
var milieux = [];
|
| 530 |
$('input:checked["name=milieux[]"]').each(function() {
|
532 |
$('input:checked["name=milieux[]"]').each(function() {
|
| 531 |
milieux.push($(this).val());
|
533 |
milieux.push($(this).val());
|
| 532 |
});
|
534 |
});
|
| Line -... |
Line 535... |
| - |
|
535 |
|
| - |
|
536 |
var rue = ($("#rue").val() == valeurDefautRechercheLieu) ? 'non renseigné(e)' : $("#rue").val();
|
| 533 |
|
537 |
|
| 534 |
//rassemble les obs dans un tableau html
|
538 |
//rassemble les obs dans un tableau html
|
| 535 |
obsNumero = obsNumero + 1;
|
539 |
obsNumero = obsNumero + 1;
|
| 536 |
$("#liste-obs tbody").append(
|
540 |
$("#liste-obs tbody").append(
|
| 537 |
'<tr id="obs'+obsNumero+'" class="obs">'+
|
541 |
'<tr id="obs'+obsNumero+'" class="obs">'+
|
| 538 |
'<td>'+obsNumero+'</td>'+
|
542 |
'<td>'+obsNumero+'</td>'+
|
| 539 |
'<td>'+$("#date").val()+'</td>'+
|
543 |
'<td>'+$("#date").val()+'</td>'+
|
| 540 |
'<td>'+$("#rue").val()+'</td>'+
|
544 |
'<td>'+rue+'</td>'+
|
| 541 |
'<td>'+$("#taxon option:selected").text()+'</td>'+
|
545 |
'<td>'+$("#taxon option:selected").text()+'</td>'+
|
| 542 |
'<td>'+milieux.join(',<br />')+'</td>'+
|
546 |
'<td>'+milieux.join(',<br />')+'</td>'+
|
| 543 |
'<td>'+$("#latitude").val()+' / '+$("#longitude").val()+'</td>'+
|
547 |
'<td>'+$("#latitude").val()+' / '+$("#longitude").val()+'</td>'+
|
| 544 |
//Ajout du champ photo
|
548 |
//Ajout du champ photo
|
| Line 561... |
Line 565... |
| 561 |
'milieu' : milieux.join(','),
|
565 |
'milieu' : milieux.join(','),
|
| 562 |
'latitude' : $("#latitude").val(),
|
566 |
'latitude' : $("#latitude").val(),
|
| 563 |
'longitude' : $("#longitude").val(),
|
567 |
'longitude' : $("#longitude").val(),
|
| 564 |
'commune_nom' : $("#commune-nom").text(),
|
568 |
'commune_nom' : $("#commune-nom").text(),
|
| 565 |
'commune_code_insee' : $("#commune-code-insee").text(),
|
569 |
'commune_code_insee' : $("#commune-code-insee").text(),
|
| 566 |
'lieudit' : $("#rue").val(),
|
570 |
'lieudit' : rue,
|
| 567 |
'station' : latLng.lat().toFixed(5)+','+latLng.lng().toFixed(5)+';'+latLngFin.lat().toFixed(5)+','+latLngFin.lng().toFixed(5)+';'+$("#rue_cote").val(),
|
571 |
'station' : latLng.lat().toFixed(5)+','+latLng.lng().toFixed(5)+';'+latLngFin.lat().toFixed(5)+','+latLngFin.lng().toFixed(5)+';'+$("#rue_cote").val(),
|
| 568 |
'notes' : $("#notes").val(),
|
572 |
'notes' : $("#notes").val(),
|
| 569 |
//Ajout des champs images
|
573 |
//Ajout des champs images
|
| 570 |
'image_nom' : $("#miniature-img").attr('alt'),
|
574 |
'image_nom' : $("#miniature-img").attr('alt'),
|
| 571 |
'image_b64' : getB64ImgOriginal()
|
575 |
'image_b64' : getB64ImgOriginal()
|