Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
73 lines (53 sloc) 2.35 KB
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="utf-8">
<title>Recherche de tournoi de tennis FFT</title>
<meta name="description" content="Rechercher un tournoi de tennis: sur une carte, c'est plus facile !">
<meta name="author" content="Eric Abouaf">
<!-- Leaflet -->
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.6/leaflet.css" />
<!--[if lte IE 8]>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.6/leaflet.ie.css" />
<![endif]-->
<script src="http://cdn.leafletjs.com/leaflet-0.6/leaflet-src.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- MakerCluster -->
<link rel="stylesheet" href="http://leaflet.github.io/Leaflet.markercluster/dist/MarkerCluster.css" />
<link rel="stylesheet" href="http://leaflet.github.io/Leaflet.markercluster/dist/MarkerCluster.Default.css" />
<!--[if lte IE 8]>
<link rel="stylesheet" href="http://leaflet.github.io/Leaflet.markercluster/dist/MarkerCluster.Default.ie.css" />
<![endif]-->
<script src="http://leaflet.github.io/Leaflet.markercluster/dist/leaflet.markercluster-src.js"></script>
<style>
body { padding: 0; margin: 0; }
html, body, #map { height: 100%; }
</style>
</head>
<body>
<div id="map"></div>
<script src="data_builder/tournois_futurs.js"></script>
<script>
var cloudmadeUrl = 'http://{s}.tile.cloudmade.com/BC9A493B41014CAABB98F0471D759707/997/256/{z}/{x}/{y}.png',
cloudmade = L.tileLayer(cloudmadeUrl, {maxZoom: 17}),
latlng = L.latLng(48.841334, 2.3185184);
var map = L.map('map', {center: latlng, zoom: 12, layers: [cloudmade]});
var markers = L.markerClusterGroup({
maxClusterRadius: 40/*,
singleMarkerMode: true*/
});
for (var i = 0; i < tournois.length; i++) {
var a = tournois[i];
if(a.location.lat) {
//var title = a.club;
var tournoi = a;
var title = tournoi.club+"<br /><a href='http://www.ei.applipub-fft.fr/eipublic/competition.do?dispatch=afficher&hoi_iid="+tournoi.hoi_iid+"' target='_new'>"+tournoi.competition+"</a><br />du "+tournoi.debut+" au "+tournoi.fin
var marker = L.marker(new L.LatLng(a.location.lat, a.location.lng), { title: title });
marker.bindPopup(title);
markers.addLayer(marker);
}
}
map.addLayer(markers);
</script>
</body>
</html>