up cities page
This commit is contained in:
parent
130bf0f49d
commit
971b95b299
1 changed files with 9 additions and 1 deletions
|
|
@ -143,6 +143,9 @@
|
|||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
// Initialize the map
|
||||
if (document.getElementById('citiesMap') !== null) {
|
||||
console.log('citiesMap element found');
|
||||
|
||||
const map = new maplibregl.Map({
|
||||
container: 'citiesMap',
|
||||
style: 'https://api.maptiler.com/maps/streets/style.json?key={{ maptiler_token }}',
|
||||
|
|
@ -175,8 +178,13 @@
|
|||
.addTo(map);
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
console.log('citiesForMap is empty');
|
||||
|
||||
{% endif %}
|
||||
|
||||
} else {
|
||||
console.error('citiesMap element not found');
|
||||
}
|
||||
// Enable the labourage form
|
||||
if (typeof enableLabourageForm === 'function') {
|
||||
enableLabourageForm();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue