parent
4b8b1f7556
commit
e993329939
2 changed files with 33 additions and 0 deletions
|
|
@ -93,6 +93,7 @@
|
|||
|
||||
<script>
|
||||
var coordinates = {{ coordinates | tojson }};
|
||||
var routes = {{ routes | tojson }};
|
||||
|
||||
// Initialize the map
|
||||
var map = L.map('map').fitBounds(coordinates.map(function(station) {
|
||||
|
|
@ -123,6 +124,11 @@ coordinates.forEach(function(item) {
|
|||
marker.bindPopup(item.name);
|
||||
});
|
||||
|
||||
// Draw lines for routes
|
||||
routes.forEach(function(route) {
|
||||
L.polyline(route, {color: 'blue'}).addTo(map);
|
||||
});
|
||||
|
||||
</script>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue