30,14 → 30,22 |
equalTo: "#courriel" |
}, |
milieu : "required", |
latitude : "required", |
longitude : "required" |
latitude : { |
required: true, |
range: [-90, 90]}, |
longitude : { |
required: true, |
range: [-180, 180]}, |
date : { |
required: true, |
date: true}, |
taxon : "required" |
} |
}); |
|
$("#date").datepicker($.datepicker.regional['fr']); |
|
$("#courriel-confirmation").bind('paste', function(e) { |
$("#courriel_confirmation").bind('paste', function(e) { |
$("#dialogue-bloquer-copier-coller").dialog(); |
return false; |
}); |
52,7 → 60,7 |
'onStart' : function(e) { |
arreter(e); |
$("#gg-map-localisation").height($(window).height() - 100); |
$("#gg-map-carte").height($(window).height() - 230); |
$("#gg-map-carte").height($(window).height() - 200); |
$("#gg-map-localisation").width($(window).width() - 100); |
}, |
'onComplete' : function() { |
258,7 → 266,6 |
if (status == google.maps.GeocoderStatus.OK) { |
if (responses && responses.length > 0) { |
mettreAJourMarkerAdresse(responses[0].formatted_address); |
console.log(responses); |
} else { |
mettreAJourMarkerAdresse("Impossible de trouver d'adresse pour cette position."); |
} |
274,11 → 281,20 |
} |
|
function mettreAJourMarkerPosition(latLng) { |
document.getElementById('marqueur-coordonnees').innerHTML = [ |
latLng.lat().toFixed(5), |
latLng.lng().toFixed(5) |
].join(', '); |
$("#marqueur-coordonnees").data('latLon', {'lat' : latLng.lat().toFixed(5), 'lon' : latLng.lng().toFixed(5)}); |
var lat = latLng.lat().toFixed(5); |
var lon = latLng.lng().toFixed(5); |
document.getElementById('marqueur-wgs84').innerHTML = [lat, lon].join(', '); |
$("#marqueur-coordonnees").data('latLon', {'lat' : lat, 'lon' : lon}); |
|
Proj4js.defs["EPSG:4326"] = "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs"; |
Proj4js.defs["EPSG:2154"]="+title=RGF93 / Lambert-93 +proj=lcc +lat_1=49 +lat_2=44 +lat_0=46.5 +lon_0=3 +x_0=700000 +y_0=6600000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs "; |
var source = new Proj4js.Proj('EPSG:4326');// Coordonnées source : WGS 84 |
var dest = new Proj4js.Proj('EPSG:2154');// Coordonnées destination : Lambert 93 |
var p = new Proj4js.Point(lon+','+lat);//lon+','+lat any object will do as long as it has 'x' and 'y' properties |
Proj4js.transform(source, dest, p); |
//Proj4js.reportError = function(msg) {alert(msg);} |
//console.log(p.toString()); |
document.getElementById('marqueur-lambert93').innerHTML = [p.x.toFixed(0)+' '+dest.units, p.y.toFixed(0)+' '+dest.units].join(', '); |
} |
|
function mettreAJourMarkerAdresse(str) { |