101 lines
2.9 KiB
HTML
101 lines
2.9 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="fr">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>Carte du parcours</title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css" />
|
|
<style>
|
|
body {
|
|
font-family: Arial, sans-serif;
|
|
margin: 20px;
|
|
background-color: whitesmoke ;
|
|
}
|
|
#container {
|
|
display: flex;
|
|
gap: 20px;
|
|
}
|
|
#map {
|
|
height: 600px;
|
|
width: 60%;
|
|
border-radius: 5%;
|
|
border: 1px solid #aaa;
|
|
}
|
|
#fiche {
|
|
width: 40%;
|
|
max-height: 600px;
|
|
overflow-y: auto;
|
|
border: 1px solid #aaa;
|
|
padding: 10px;
|
|
box-sizing: border-box;
|
|
background-color:#095228;
|
|
border-radius: 5%;
|
|
}
|
|
body h1 {
|
|
display:flex;
|
|
align-items:center;
|
|
justify-content:center;
|
|
text-align: center;
|
|
color: blue;
|
|
font-style: bold;
|
|
margin-bottom: 20px;
|
|
background-color:#70726e;
|
|
border-radius:12px;
|
|
height: 75px;
|
|
}
|
|
#fiche h2{
|
|
color:white;
|
|
}
|
|
#fiche p{
|
|
color:white;
|
|
}
|
|
#fiche img {
|
|
max-width: 100%;
|
|
height: auto;
|
|
margin-top: 10px;
|
|
border-radius: 5px;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<h1>Fiche du parcours</h1>
|
|
<div id="container">
|
|
<div id="map"></div>
|
|
<div id="fiche">
|
|
<h2>parcous1</h2>
|
|
<p><strong>Ville :</strong> Bourg en bresse</p>
|
|
<p><strong>Département :</strong> 1</p>
|
|
<p><strong>Difficulté :</strong> 2</p>
|
|
<p><strong>Durée (heures) :</strong> 2.3</p>
|
|
<p><strong>Longueur (km) :</strong> 17.3</p>
|
|
<img src="data/parcours1.png">
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"></script>
|
|
<script>
|
|
var map = L.map('map').setView([45.5, 1.5], 10); // Vue centrée
|
|
|
|
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
|
attribution: '© OpenStreetMap contributors'
|
|
}).addTo(map);
|
|
L.marker([45.62, -1.03348]).addTo(map).bindPopup("<b>Étape 1</b><br><b>Personnages :</b><ul><li>Quentin</li><li>Malo</li></ul><b>Textes :</b><ul><li>ligne de dialogue 1</li><li>ligne de dialogue 2</li></ul>");
|
|
L.marker([-45.62, 1.03348]).addTo(map).bindPopup("<b>Étape 2</b><br><b>Personnages :</b><ul><li>Antoine</li><li>Giovanni</li></ul><b>Textes :</b><ul><li>ligne de dialogue 1</li><li>ligne de dialogue 2</li></ul>");
|
|
var latlngs = [
|
|
[45.62, -1.03348],
|
|
[-45.62, 1.03348],
|
|
];
|
|
|
|
var polyline = L.polyline(latlngs, {
|
|
color: 'purple',
|
|
weight: 2,
|
|
dashArray: '10, 10',
|
|
opacity: 0.7
|
|
}).addTo(map);
|
|
map.fitBounds(polyline.getBounds());
|
|
|
|
</script>
|
|
</body>
|
|
</html>
|