Subversion Repositories eFlore/Applications.cel

Compare Revisions

Ignore whitespace Rev 2731 → Rev 2735

/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;
this.latLng = null; // position en cours
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) {
var latLng = new google.maps.LatLng(ui.item.latitude, ui.item.longitude);
lthis.deplacerMarker(latLng);
lthis.latLng = new google.maps.LatLng(ui.item.latitude, ui.item.longitude);
lthis.deplacerMarker(lthis.latLng);
}
});
};
291,12 → 291,14
};
 
WidgetSaisie.prototype.surDeplacementMarker = function() {
this.trouverCommune(this.marker.getPosition());
this.latLng = this.marker.getPosition();
this.trouverCommune(this.latLng);
this.mettreAJourMarkerPosition(this.marker.getPosition());
};
 
WidgetSaisie.prototype.surClickDansCarte = function(event) {
this.deplacerMarker(event.latLng);
this.latLng = event.latLng;
this.deplacerMarker(this.latLng);
};
 
/**
335,7 → 337,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
latLng = new google.maps.LatLng(46.30871, 2.54395);// Centre de la France - @WARNING Prémilhat !! :)
zoomDefaut = 5;
}
 
429,6 → 431,9
};
 
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,6 → 21,7
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({
198,7 → 199,8
};
 
WidgetSaisieSauvages.prototype.surClickDansCarte = function(event) {
this.deplacerMarkerDeb(event.latLng);
this.latLngDeb = event.latLng;
this.deplacerMarkerDeb(this.latLngDeb);
};
 
// surcharge
266,7 → 268,8
};
 
WidgetSaisieSauvages.prototype.surDeplacementMarkerDeb = function() {
this.deplacerMarkerDeb(this.markerDeb.getPosition());
this.latLngDeb = this.markerDeb.getPosition();
this.deplacerMarkerDeb(this.latLngDeb);
};
 
WidgetSaisieSauvages.prototype.deplacerMarkerDeb = function(nouvellePosition) {
/branches/v2.21-plantoir/widget/modules/saisie/squelettes/biodiversite34/js/biodiversite34.js
358,6 → 358,9
}
 
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({