Subversion Repositories eFlore/Applications.cel

Compare Revisions

Ignore whitespace Rev 1036 → Rev 1037

/trunk/widget/modules/carto/squelettes/scripts/carto.js
159,8 → 159,11
}
timer = window.setTimeout(function() {
var zoom = map.getZoom();
var NELatLng = map.getBounds().getNorthEast().lat()+'|'+map.getBounds().getNorthEast().lng();
var SWLatLng = map.getBounds().getSouthWest().lat()+'|'+map.getBounds().getSouthWest().lng();
// ajout d'un facteur de correction pour charger légerement plus que nécessaire pour stabiliser les points
// à voir si c'est efficace
var facteurCorrection = 0.5;
var NELatLng = (map.getBounds().getNorthEast().lat()+facteurCorrection)+'|'+(map.getBounds().getNorthEast().lng()+facteurCorrection);
var SWLatLng = (map.getBounds().getSouthWest().lat()-facteurCorrection)+'|'+(map.getBounds().getSouthWest().lng()-facteurCorrection);
chargerMarqueurs(zoom, NELatLng, SWLatLng);
}, 400);
}
179,6 → 182,7
if(requeteChargementPoints != null) {
requeteChargementPoints.abort();
cacherMessageChargementPoints();
}
afficherMessageChargementPoints();
213,7 → 217,15
}
 
function creerMarqueur(station) {
var titre = station['nbreMarqueur'];
var titre = '';
if(station.nbreMarqueur) {
titre = station.nbreMarqueur+' points renseignés';
} else {
if(station.nom) {
titre = station.nom;
}
}
//var titre = station['nbreMarqueur'];
var icone = attribuerImageMarqueur(station['id'], station['nbreMarqueur']);
var latLng = new google.maps.LatLng(station['lat'], station['lng']);
var marqueur = new google.maps.Marker({
850,16 → 862,18
function filtrerParTaxon() {
var ntAFiltrer = $('.nt', this).text();
infoBulle.close();
var zoom = map.getZoom();
var NELatLng = map.getBounds().getNorthEast().lat()+'|'+map.getBounds().getNorthEast().lng();
var SWLatLng = map.getBounds().getSouthWest().lat()+'|'+map.getBounds().getSouthWest().lng();
$('#taxon-'+nt).removeClass('taxon-actif');
if (nt == ntAFiltrer) {
nt = '*';
//executerMarkerClusterer(pointsOrigine, boundsOrigine);
stationsUrl = stationsUrl.replace(/num_taxon=[*0-9]+/, 'num_taxon='+nt);
chargerMarqueurs(zoom, NELatLng, SWLatLng);
} else {
stationsUrl = stationsUrl.replace(/num_taxon=[*0-9]+/, 'num_taxon='+ntAFiltrer);
url = stationsUrl;
var zoom = map.getZoom();
var NELatLng = map.getBounds().getNorthEast().lat()+'|'+map.getBounds().getNorthEast().lng();
var SWLatLng = map.getBounds().getSouthWest().lat()+'|'+map.getBounds().getSouthWest().lng();
url += '&zoom='+zoom+
'&ne='+NELatLng+
'&sw='+SWLatLng;