1,11 → 1,5 |
//+---------------------------------------------------------------------------------------------------------+ |
// GÉNÉRAL |
// Mettre à true pour afficher les messages de débogage |
var DEBUG = false; |
// URL du web service réalisant l'insertion des données dans la base du CEL. |
var URL_SERVICE_CEL = "http://www.tela-botanica.org/service:cel:CelWidgetSaisie"; |
// Squelette d'URL du web service d'eFlore fournissant les noms de communes. |
var URL_SERVICE_NOM_COMMUNE = "http://www.tela-botanica.org/service:eflore:osm/0.1/nom-commune?lon={lon}&lat={lat}"; |
/** |
* Stope l'évènement courrant quand on clique sur un lien. |
* Utile pour Chrome, Safari... |
159,7 → 153,7 |
|
var erreurMsg = ""; |
$.ajax({ |
url : URL_SERVICE_CEL, |
url : SERVICE_SAISIE_URL, |
type : "POST", |
data : observations, |
dataType : "json", |
346,7 → 340,7 |
|
function trouverCommune(pos) { |
$(function() { |
var urlNomCommuneFormatee = URL_SERVICE_NOM_COMMUNE.replace('{lat}', pos.lat()).replace('{lon}', pos.lng()); |
var urlNomCommuneFormatee = SERVICE_NOM_COMMUNE_URL.replace('{lat}', pos.lat()).replace('{lon}', pos.lng()); |
$.ajax({ |
url : urlNomCommuneFormatee, |
type : "GET", |