Subversion Repositories eFlore/Applications.cel

Compare Revisions

Ignore whitespace Rev 491 → Rev 492

/trunk/widget/modules/carto/squelettes/carte_defaut.tpl.html
33,6 → 33,9
<!-- Javascript : appli carto -->
<script type="text/javascript">
//<![CDATA[
var pointImageUrl = 'http://chart.apis.google.com/chart?cht=mm&chs=24x32&chco=FFFFFF,008CFF,000000&ext=.png';
var pointImage = new google.maps.MarkerImage(pointImageUrl, new google.maps.Size(24, 32));
var pointsOrigine = null;
var markerClusterer = null;
var map = null;
var nt = '<?=$num_taxon?>';
42,7 → 45,6
$("#observations table").tablesorter();
}
});
var pointImageUrl = 'http://chart.apis.google.com/chart?cht=mm&chs=24x32&chco=FFFFFF,008CFF,000000&ext=.png';
var carteCentre = new google.maps.LatLng(46.4, 3.10);
var carteOptions = {
zoom: 6,
52,12 → 54,7
var ctaLayer = null;
 
function refreshMap() {
if (markerClusterer) {
markerClusterer.clearMarkers();
}
 
var points = [];
var pointImage = new google.maps.MarkerImage(pointImageUrl, new google.maps.Size(24, 32));
for (var i = 0; i < obs.nombre; ++i) {
var maLatLng = new google.maps.LatLng(obs.points[i].coord_x, obs.points[i].coord_y);
var point = new google.maps.Marker({
76,6 → 73,17
points.push(point);
}
 
if (pointsOrigine == null) {
pointsOrigine = points;
}
executerMakerCulterer(points);
}
 
function executerMakerCulterer(points) {
if (markerClusterer) {
markerClusterer.clearMarkers();
}
markerClusterer = new MarkerClusterer(map, points);
}
 
116,13 → 124,20
google.maps.event.trigger(map, 'resize');
};
 
function filtrerParTaxon(num_taxon) {
var url = '<?=$url_cel_carto?>/carte-defaut-json/<?=$utilisateur?>/<?=$projet?>/<?=$dept?>/'+num_taxon+'?formatRetour=jsonp&callback=?';
$.getJSON(url, function (observations) {
obs = observations;
nt = num_taxon;
refreshMap();
});
function filtrerParTaxon(ntAFiltrer) {
$('#taxon-'+nt).removeClass('taxon-actif');
if (nt == ntAFiltrer) {
nt = '*';
executerMakerCulterer(pointsOrigine);
} else {
var url = '<?=$url_cel_carto?>/carte-defaut-json/<?=$utilisateur?>/<?=$projet?>/<?=$dept?>/'+ntAFiltrer+'?formatRetour=jsonp&callback=?';
$.getJSON(url, function (observations) {
obs = observations;
nt = ntAFiltrer;
$('#taxon-'+nt).addClass('taxon-actif');
refreshMap();
});
}
};
function initialize() {
163,18 → 178,20
</head>
 
<body onload="initialize()">
<h1 id="carte-titre">Obsvertions issues des membres de Tela Botanica</h1>
<div id="panneau-lateral">
<div id="pl-ouverture" title="Ouvrir le panneau latéral"><span>Panneau >></span></div>
<div id="pl-fermeture" title="Fermer le panneau latéral"><span><< Fermer [x]</span></div>
<div id="pl-entete">
<div id="pl-ouverture">Panneau >></div>
<div id="pl-fermeture"><< Fermer [x]</div>
<h2>Filtre par plante</h2>
<p>Cliquer sur un nom de plante pour filtrer les observations sur la carte.</p>
</div>
<div id="pl-corps">
<ol>
<div id="pl-corps" onMouseOver="map.setOptions({'scrollwheel':false});" onMouseOut="map.setOptions({'scrollwheel':true});">
<ol id="taxons">
<? foreach ($taxons as $taxon) : ?>
<li>
<a href="#" onclick="filtrerParTaxon(<?=$taxon['nt']?>);">
<li id="taxon-<?=$taxon['nt']?>">
<a href="#" onclick="filtrerParTaxon(<?=$taxon['nt']?>);" title="<?=$taxon['famille']?>">
<?=$taxon['nom']?>
<span class="famille"><?=$taxon['famille']?></span>
</a>
</li>
<? endforeach; ?>