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>
|
<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();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue