Update app.py
Browse files
app.py
CHANGED
|
@@ -142,23 +142,6 @@ If you encounter any issues or need assistance, feel free to [Contact Support on
|
|
| 142 |
gap: 10px;
|
| 143 |
background-color: #f0f0f0;
|
| 144 |
}
|
| 145 |
-
#controls button {
|
| 146 |
-
border: none;
|
| 147 |
-
font-size: 16px;
|
| 148 |
-
padding: 10px 20px;
|
| 149 |
-
border-radius: 5px;
|
| 150 |
-
cursor: pointer;
|
| 151 |
-
font-weight: bold;
|
| 152 |
-
}
|
| 153 |
-
#animateRoute {
|
| 154 |
-
background-color: #FFEB3B; /* Light Yellow */
|
| 155 |
-
}
|
| 156 |
-
#animateAllLocations {
|
| 157 |
-
background-color: #81D4FA; /* Light Blue */
|
| 158 |
-
}
|
| 159 |
-
#stopAnimation {
|
| 160 |
-
background-color: #FFCC80; /* Light Orange */
|
| 161 |
-
}
|
| 162 |
</style>
|
| 163 |
</head>
|
| 164 |
<body>
|
|
@@ -169,9 +152,9 @@ If you encounter any issues or need assistance, feel free to [Contact Support on
|
|
| 169 |
<select id="destination">
|
| 170 |
<option value="">Select Destination</option>
|
| 171 |
</select>
|
| 172 |
-
<button
|
| 173 |
-
<button
|
| 174 |
-
<button
|
| 175 |
</div>
|
| 176 |
<div id="map"></div>
|
| 177 |
<script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script>
|
|
@@ -212,7 +195,7 @@ If you encounter any issues or need assistance, feel free to [Contact Support on
|
|
| 212 |
}
|
| 213 |
const markers = {};
|
| 214 |
for (const [name, coord] of Object.entries(coordinates)) {
|
| 215 |
-
const marker = L.marker(coord).addTo(map).bindPopup(
|
| 216 |
markers[name] = marker;
|
| 217 |
}
|
| 218 |
let currentIndex = 0;
|
|
@@ -290,4 +273,4 @@ If you encounter any issues or need assistance, feel free to [Contact Support on
|
|
| 290 |
</body>
|
| 291 |
</html>
|
| 292 |
"""
|
| 293 |
-
components.html(map_html, height=600)
|
|
|
|
| 142 |
gap: 10px;
|
| 143 |
background-color: #f0f0f0;
|
| 144 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 145 |
</style>
|
| 146 |
</head>
|
| 147 |
<body>
|
|
|
|
| 152 |
<select id="destination">
|
| 153 |
<option value="">Select Destination</option>
|
| 154 |
</select>
|
| 155 |
+
<button onclick="startRouteAnimation()">Animate Route</button>
|
| 156 |
+
<button onclick="animateAllLocations()">Animate All Locations</button>
|
| 157 |
+
<button onclick="stopAnimation()">Stop Animation</button>
|
| 158 |
</div>
|
| 159 |
<div id="map"></div>
|
| 160 |
<script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script>
|
|
|
|
| 195 |
}
|
| 196 |
const markers = {};
|
| 197 |
for (const [name, coord] of Object.entries(coordinates)) {
|
| 198 |
+
const marker = L.marker(coord).addTo(map).bindPopup(<b>${name}</b>);
|
| 199 |
markers[name] = marker;
|
| 200 |
}
|
| 201 |
let currentIndex = 0;
|
|
|
|
| 273 |
</body>
|
| 274 |
</html>
|
| 275 |
"""
|
| 276 |
+
components.html(map_html, height=600)
|