Subversion Repositories eFlore/Applications.cel

Compare Revisions

Ignore whitespace Rev 2735 → Rev 2731

/branches/v2.21-plantoir/widget/modules/saisie/squelettes/defaut/js/WidgetSaisie.js
8,7 → 8,7
this.nbObsTransmises = 0;
this.map = null;
this.marker = null;
this.latLng = null; // position en cours
this.latLng = null;
this.geocoder = null;
this.debug = null;
this.html5 = null;
274,8 → 274,8
},
// Cette partie est executee a la selection d'une adresse
select: function(event, ui) {
lthis.latLng = new google.maps.LatLng(ui.item.latitude, ui.item.longitude);
lthis.deplacerMarker(lthis.latLng);
var latLng = new google.maps.LatLng(ui.item.latitude, ui.item.longitude);
lthis.deplacerMarker(latLng);
}
});
};
291,14 → 291,12
};
 
WidgetSaisie.prototype.surDeplacementMarker = function() {
this.latLng = this.marker.getPosition();
this.trouverCommune(this.latLng);
this.trouverCommune(this.marker.getPosition());
this.mettreAJourMarkerPosition(this.marker.getPosition());
};
 
WidgetSaisie.prototype.surClickDansCarte = function(event) {
this.latLng = event.latLng;
this.deplacerMarker(this.latLng);
this.deplacerMarker(event.latLng);
};
 
/**
337,7 → 335,7
latLng = new google.maps.LatLng(8.75624, 1.80176);// Afrique de l'Ouest et du Centre
zoomDefaut = 4;
} else {
latLng = new google.maps.LatLng(46.30871, 2.54395);// Centre de la France - @WARNING Prémilhat !! :)
latLng = new google.maps.LatLng(46.30871, 2.54395);// Centre de la France
zoomDefaut = 5;
}
 
431,9 → 429,6
};
 
WidgetSaisie.prototype.trouverCommune = function(pos) {
if (this.latLng == null) { // tentative de protection contre le démon de Prémilhat
return;
}
var lthis = this;
$(function() {
 
/branches/v2.21-plantoir/widget/modules/saisie/squelettes/sauvages/js/WidgetSaisieSauvages.js
21,7 → 21,6
WidgetSaisieSauvages.prototype.initCarto = function() {
this.initialiserGoogleMap();
this.afficherEtapeGeolocalisation(1);
this.latLng = true; // patch cracra pour éviter de surcharger trouvercommune()
 
var lthis = this;
$('#carte-recherche').autocomplete({
199,8 → 198,7
};
 
WidgetSaisieSauvages.prototype.surClickDansCarte = function(event) {
this.latLngDeb = event.latLng;
this.deplacerMarkerDeb(this.latLngDeb);
this.deplacerMarkerDeb(event.latLng);
};
 
// surcharge
268,8 → 266,7
};
 
WidgetSaisieSauvages.prototype.surDeplacementMarkerDeb = function() {
this.latLngDeb = this.markerDeb.getPosition();
this.deplacerMarkerDeb(this.latLngDeb);
this.deplacerMarkerDeb(this.markerDeb.getPosition());
};
 
WidgetSaisieSauvages.prototype.deplacerMarkerDeb = function(nouvellePosition) {
/branches/v2.21-plantoir/widget/modules/saisie/squelettes/biodiversite34/js/biodiversite34.js
358,9 → 358,6
}
 
function trouverCommune(pos) {
if (this.latLng == null) { // tentative de protection contre le démon de Prémilhat
return;
}
$(function() {
var urlNomCommuneFormatee = SERVICE_NOM_COMMUNE_URL.replace('{lat}', pos.lat()).replace('{lon}', pos.lng());
$.ajax({