Subversion Repositories eFlore/Applications.cel

Compare Revisions

Ignore whitespace Rev 2721 → 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() {