Subversion Repositories eFlore/Applications.cel

Compare Revisions

Ignore whitespace Rev 2859 → Rev 2858

/trunk/widget/modules/saisie/squelettes/defaut/js/WidgetSaisie.js
406,8 → 406,7
if (this.marker != undefined) {
this.marker.setPosition(latLng);
this.map.setCenter(latLng);
// au chargement de la carte, la position est nulle
this.viderMarkerPosition();
this.mettreAJourMarkerPosition(latLng);
}
};
 
420,11 → 419,6
}
};
 
WidgetSaisie.prototype.viderMarkerPosition = function() {
this.remplirChampLatitude(null);
this.remplirChampLongitude(null);
};
 
WidgetSaisie.prototype.mettreAJourMarkerPosition = function(latLng) {
var lat = latLng.lat().toFixed(5);
var lng = latLng.lng().toFixed(5);
432,27 → 426,13
this.remplirChampLongitude(lng);
};
 
/**
* Définit la valeur de latitude, à travers la "value" du champ "#latitude";
* pour définir une valeur vraiment vide (et non 0), passer null en argument
*/
WidgetSaisie.prototype.remplirChampLatitude = function(latDecimale) {
var lat = '';
if (latDecimale !== null) {
lat = Math.round(latDecimale * 100000) / 100000;
}
var lat = Math.round(latDecimale * 100000) / 100000;
$('#latitude').val(lat);
};
 
/**
* Définit la valeur de longitude, à travers la "value" du champ "#longitude";
* pour définir une valeur vraiment vide (et non 0), passer null en argument
*/
WidgetSaisie.prototype.remplirChampLongitude = function(lngDecimale) {
var lng = '';
if (lngDecimale !== null) {
lng = Math.round(lngDecimale * 100000) / 100000;
}
var lng = Math.round(lngDecimale * 100000) / 100000;
$('#longitude').val(lng);
};