/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; ?> |
/trunk/widget/modules/carto/squelettes/css/carto.css |
---|
7,6 → 7,12 |
font-family:Arial; |
font-size:12px; |
} |
h1 { |
font-size:1.6em; |
} |
h2 { |
font-size:1.4em; |
} |
/*+-----------------------------------------------------------------------------------------------------------------+*/ |
/* Carte */ |
#carte { |
29,45 → 35,86 |
margin:auto; |
} |
/*+-----------------------------------------------------------------------------------------------------------------+*/ |
/* Carte titre */ |
#carte-titre { |
margin:0; |
padding:0.2em; |
background-color:rgba(29,30,32,0.8); |
color:#CCCCCC; |
} |
/*+-----------------------------------------------------------------------------------------------------------------+*/ |
/* Panneau latéral */ |
#panneau-lateral { |
z-index:10; |
width:300px; |
height:100%; |
padding:0; |
display:none; |
background-color:white; |
background-color:rgba(29,30,32,0.8); |
border-right:1px solid grey; |
box-shadow:2px 2px 6px #979797;-webkit-box-shadow:2px 2px 6px #979797;-moz-box-shadow:2px 2px 6px #979797; |
} |
#pl-entete { |
text-align:right; |
height:5%; |
} |
#pl-corps { |
position:relative; |
top:5%; |
height:95%; |
top:12px; |
height:80%; |
overflow:auto; |
padding:5px; |
width:290px; |
} |
#pl-ouverture, #pl-fermeture { |
z-index:11; |
position:relative; |
top:0; |
width:95px; |
background-color:#FFF; |
text-align:center; |
border:1px solid black; |
cursor:pointer; |
height:16px; |
width:16px; |
} |
#pl-ouverture { |
border-left:0; |
background:url(../images/ouverture.png) no-repeat top left; |
background-color:rgba(29,30,32,0.8); |
box-shadow:2px 2px 6px #979797;-webkit-box-shadow:2px 2px 6px #979797;-moz-box-shadow:2px 2px 6px #979797; |
height:100%; |
} |
#pl-fermeture { |
border-right:0; |
float:right; |
height:6%; |
background:url(../images/fermeture.png) no-repeat top right; |
} |
#pl-ouverture span, #pl-fermeture span{ |
display:none; |
} |
/* Panneau latéral : balises */ |
#panneau-lateral h2, #panneau-lateral p { |
color:#CCCCCC;} |
/* Panneau latéral : Liens */ |
#panneau-lateral a, #panneau-lateral a:active, #panneau-lateral a:visited { |
border-bottom:1px solid #333333; |
color:#CCCCCC; |
text-decoration:none; |
} |
#panneau-lateral a:active { |
outline:none; |
} |
#panneau-lateral a:focus { |
outline:thin dotted; |
} |
#panneau-lateral a:hover { |
color:#56B80E; |
} |
/*+-----------------------------------------------------------------------------------------------------------------+*/ |
/* Liste des taxons de la carte */ |
#taxons { |
color:#999; |
} |
#taxons .taxon-actif, #taxons .taxon-actif a { |
color:#56B80E;} |
/*+-----------------------------------------------------------------------------------------------------------------+*/ |
/* Pop-up observations */ |
#observations { |
margin:23px 0 0 0; |
83,6 → 130,10 |
.champ_nom_latin { |
display:none; |
} |
#obs-msg-info { |
font-size:10px; |
color:#CCC; |
} |
/*+-----------------------------------------------------------------------------------------------------------------+*/ |
/* Onglets */ |
.onglets { |
/trunk/widget/modules/carto/squelettes/obs_tableau.tpl.html |
---|
23,4 → 23,5 |
<? endforeach; ?> |
</tbody> |
</table> |
<? include(dirname(__FILE__).'/obs_msg_info.tpl.html') ?> |
</div> |
/trunk/widget/modules/carto/squelettes/obs_liste.tpl.html |
---|
18,4 → 18,5 |
</li> |
<? endforeach; ?> |
</ol> |
<? include(dirname(__FILE__).'/obs_msg_info.tpl.html') ?> |
</div> |
/trunk/widget/modules/carto/squelettes/obs_msg_info.tpl.html |
---|
New file |
0,0 → 1,3 |
<p id="obs-msg-info"> |
Les observations de cette carte sont regroupées par commune. |
</p> |