/trunk/widget/modules/carto/squelettes/carto.tpl.html |
---|
9,16 → 9,19 |
<link rel="icon" type="image/png" href="http://www.tela-botanica.org/sites/commun/generique/images/favicones/tela_botanica.png" /> |
<link rel="shortcut icon" type="image/x-icon" href="http://www.tela-botanica.org/sites/commun/generique/images/favicones/tela_botanica.ico" /> |
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.5/leaflet.css" /> |
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7/leaflet.css" /> |
<!--[if lte IE 8]> |
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.5/leaflet.ie.css" /> |
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7/leaflet.ie.css" /> |
<![endif]--> |
<link rel="stylesheet" href="<?=$url_base?>modules/carto/squelettes/css/carto.css" /> |
<link rel="stylesheet" href="<?=$url_base?>modules/carto/squelettes/css/MarkerCluster.css" /> |
<link rel="stylesheet" href="<?=$url_base?>modules/carto/squelettes/css/MarkerCluster.Default.css" /> |
<script type="text/javascript" src="http://cdn.leafletjs.com/leaflet-0.5/leaflet.js"></script> |
<script type="text/javascript" src="http://cdn.leafletjs.com/leaflet-0.7/leaflet.js"></script> |
<script type="text/javascript" src="http://resources.tela-botanica.org/jquery/1.6.4/jquery-1.6.4.min.js"></script> |
<script type="text/javascript" src="http://resources.tela-botanica.org/jquery/jquery-ui/1.8.18/js/jquery-ui-1.8.18.custom.min.js"></script> |
<script type="text/javascript" src="http://resources.tela-botanica.org/jquery/jquery-tmpl/jquery.tmpl.min.js"></script> |
<script src="<?=$url_base?>modules/carto/squelettes/scripts/leaflet.markercluster.js"></script> |
<script type="text/javascript" src="<?=$url_base?>modules/carto/squelettes/scripts/carto.js"></script> |
<script type="text/javascript"> |
//<![CDATA[ |
/trunk/widget/modules/carto/squelettes/scripts/carto.js |
---|
22,7 → 22,9 |
nombreCollections = 0, |
collections = new Array(), |
structures = new Array(), |
coucheStructures = new L.FeatureGroup(), |
coucheStructures = new L.MarkerClusterGroup({ |
disableClusteringAtZoom : 10 |
}), |
infoBulle = null, |
chargementEnCours = false; |
32,8 → 34,6 |
initialiserCarte(); |
initialiserPanneauControle(); |
// obtenirNombreCollections |
// $.getJSON(urlWebService + "CoelRecherche/Nombre/*/*/*/*/*/*/*/" + departement + "/*/", {async:false}).complete(function() { recupererValeurNombreCollections(); }); |
$.ajax({ |
dataType: "json", |
url: urlWebService + "CoelRecherche/Nombre/*/*/*/*/*/*/*/" + departement + "/*/", |
176,20 → 176,27 |
function creerMarqueur(structure) { |
var latlng = new L.LatLng(structure.latitude, structure.longitude); |
var marqueur = new L.Marker(latlng, { |
title : structure.nom, |
structures : [structure] |
//title : structure.nom, |
structures : [structure], |
structuresNom : structure.nom |
}); |
marqueur.on('click', surClickMarqueur); |
marqueur.on('mouseover', construireToolTipMarqueur); |
coucheStructures.addLayer(marqueur); |
} |
function ajouterStructureAMarqueur(marqueur, structure) { |
marqueur.options.structures.push(structure); |
function construireToolTipMarqueur(event) { |
// changer la propriété title du marqueur ne fonctionne pas |
// en dehors du constructeur (mais cette méthode est-elle pérenne ?) |
marqueur._icon.title += "\n"+structure.nom; |
// le clustering n'affichant pas tous les marqueurs, on doit remplir le tooltip |
event.target._icon.title = event.target.options.structuresNom; |
} |
function ajouterStructureAMarqueur(marqueur, structure) { |
marqueur.options.structures.push(structure); |
marqueur.options.structuresNom += "\n"+structure.nom; |
} |
function surClickMarqueur(event) { |
var latlng = event.target.getLatLng(); |
var structures = event.target.options.structures; |
/trunk/widget/modules/carto/squelettes/css/carto.css |
---|
32,3 → 32,11 |
.popup-simple-text { |
font-size: 1.15em; |
} |
#map .marker-cluster-small { |
background-color: rgba(0, 102, 0, 0.5); |
} |
#map .marker-cluster-medium { |
background-color: rgba(241, 211, 87, 0.8); |
} |