2,9 → 2,12 |
// PARAMÊTRES et CONSTANTES |
// Mettre à true pour afficher les messages de débogage |
var DEBUG = false; |
var communeImageUrl = 'http://www.tela-botanica.org/commun/icones/carto/commune.png'; |
var pointImageUrl = 'http://www.tela-botanica.org/commun/icones/carto/point2.png'; |
var groupeImageUrlTpl = 'http://www.tela-botanica.org/service:cel:CelWidgetMapPoint/icone-groupe?type={type}&nbre={nbre}' |
/** |
* Indication de certaines variables ajoutée par php |
* var communeImageUrl ; |
* var pointImageUrl ; |
* var groupeImageUrlTpl ; |
*/ |
var pointsOrigine = null; |
var boundsOrigine = null; |
var markerClusterer = null; |
138,7 → 141,7 |
if (urlsLimitesCommunales != null) { |
for (urlId in urlsLimitesCommunales) { |
var url = urlsLimitesCommunales[urlId]; |
ctaLayer = new google.maps.KmlLayer(url, {preserveViewport: false}); |
ctaLayer = new google.maps.KmlLayer(url, {preserveViewport: true}); |
ctaLayer.setMap(map); |
} |
} |
200,6 → 203,8 |
$('#zone-chargement-point').css('display','none'); |
} |
|
premierChargement = true; |
|
function rafraichirMarqueurs(data) { |
$.each(marqueurs, function(index, marqueur) { |
marqueur.setMap(null); |
215,6 → 220,16 |
marqueurs.push(nouveauMarqueur); |
} |
}); |
|
if(premierChargement) { |
premierChargement = false; |
var bounds = new google.maps.LatLngBounds(); |
var latMax = new google.maps.LatLng(data.stats.coordmax.latMax, data.stats.coordmax.lngMax); |
var latMin = new google.maps.LatLng(data.stats.coordmax.latMin, data.stats.coordmax.lngMin); |
bounds.extend(latMax); |
bounds.extend(latMin); |
rendrePointsVisibles(bounds); |
} |
} |
|
function creerMarqueur(station) { |
454,6 → 469,9 |
|
var urlObs = observationsUrl+'&start={start}&limit='+limite; |
urlObs = urlObs.replace(/\{stationId\}/g, pointClique.stationInfos.id); |
if (pointClique.stationInfos.type_emplacement == 'communes') { |
urlObs = urlObs.replace(/commune=%2A/g, 'commune='+pointClique.stationInfos.nom); |
} |
urlObs = urlObs.replace(/\{nt\}/g, nt); |
urlObs = urlObs.replace(/\{start\}/g, depart); |
|
474,12 → 492,12 |
if (depart == 0) { |
actualiserInfosStation(observations); |
creerTitreInfoBulle(); |
selectionnerOnglet("#obs-vue-"+pagineur.format); |
surClicPagePagination(0, null); |
surClicPagePagination(0, null); |
} |
|
afficherPagination(); |
actualiserPagineur(); |
selectionnerOnglet("#obs-vue-"+pagineur.format); |
} |
|
function actualiserInfosStation(infos) { |