up cities page

This commit is contained in:
Tykayn 2025-11-19 22:17:09 +01:00 committed by tykayn
parent 130bf0f49d
commit 971b95b299

View file

@ -143,6 +143,9 @@
<script> <script>
document.addEventListener('DOMContentLoaded', function() { document.addEventListener('DOMContentLoaded', function() {
// Initialize the map // Initialize the map
if (document.getElementById('citiesMap') !== null) {
console.log('citiesMap element found');
const map = new maplibregl.Map({ const map = new maplibregl.Map({
container: 'citiesMap', container: 'citiesMap',
style: 'https://api.maptiler.com/maps/streets/style.json?key={{ maptiler_token }}', style: 'https://api.maptiler.com/maps/streets/style.json?key={{ maptiler_token }}',
@ -175,8 +178,13 @@
.addTo(map); .addTo(map);
{% endif %} {% endif %}
{% endfor %} {% endfor %}
{% endif %} {% else %}
console.log('citiesForMap is empty');
{% endif %}
} else {
console.error('citiesMap element not found');
}
// Enable the labourage form // Enable the labourage form
if (typeof enableLabourageForm === 'function') { if (typeof enableLabourageForm === 'function') {
enableLabourageForm(); enableLabourageForm();