Subversion Repositories eFlore/Applications.cel

Compare Revisions

Ignore whitespace Rev 1341 → Rev 1342

/trunk/widget/modules/cartopoint/squelettes/scripts/carto.js
199,10 → 199,14
requeteChargementPoints.abort();
}
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());
chargerMarqueurs(zoom, NELatLng, SWLatLng);
if(map.getBounds() != undefined) {
var zoom = map.getZoom();
var NELatLng = (map.getBounds().getNorthEast().lat())+'|'+(map.getBounds().getNorthEast().lng());
var SWLatLng = (map.getBounds().getSouthWest().lat())+'|'+(map.getBounds().getSouthWest().lng());
chargerMarqueurs(zoom, NELatLng, SWLatLng);
} else {
programmerRafraichissementCarte();
}
}, 400);
}
 
480,7 → 484,7
var urlObs = observationsUrl+'&start={start}&limit='+limite;
urlObs = urlObs.replace(/\{stationId\}/g, encodeURIComponent(pointClique.stationInfos.id));
if (pointClique.stationInfos.type_emplacement == 'communes') {
urlObs = urlObs.replace(/commune=%2A/g, 'commune='+encodeURIComponent(pointClique.stationInfos.nom));
urlObs = urlObs.replace(/commune=%2A/g, formaterParametreCommunePourRequete(pointClique.stationInfos.nom));
}
urlObs = urlObs.replace(/\{nt\}/g, nt);
urlObs = urlObs.replace(/\{start\}/g, depart);
492,6 → 496,18
}
}
 
function formaterParametreCommunePourRequete(nomCommune) {
var chaineRequete = "";
if(nomCommune.indexOf("(", 0) !== false) {
var infosCommune = nomCommune.split("(");
var commune = infosCommune[0];
chaineRequete = 'commune='+encodeURIComponent($.trim(commune));
} else {
chaineRequete = 'commune='+encodeURIComponent($.trim(nomCommune));
}
return chaineRequete;
}
 
function viderTableauObs() {
obsStation = new Array();
surClicPagePagination(0, null);