From cb52810298a9adbcff0cd62e3cf415cfee20c0b6 Mon Sep 17 00:00:00 2001 From: Vitor George Date: Sat, 27 Apr 2024 12:55:31 +0100 Subject: [PATCH] Update map --- _includes/home/about.html | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/_includes/home/about.html b/_includes/home/about.html index 968a36d..c2d6077 100644 --- a/_includes/home/about.html +++ b/_includes/home/about.html @@ -42,14 +42,24 @@

Acerca de este evento

var mapElement = document.getElementById('map'); var coordinates = JSON.parse(mapElement.getAttribute('data-coordinates')); var zoomLevel = parseInt(mapElement.getAttribute('data-zoom-level'), 10); - var popupContent = mapElement.getAttribute('data-popup-content'); + + // Define the HTML content for the popup with better organization + var popupContent = ` +
+ IFPA - Instituto Federal do Pará
+ Avenida Almirante Barroso, nº 1155, Marco
+ Belém, PA
+ Brazil
+ View on OpenStreetMap +
+ `; var map = L.map('map', { scrollWheelZoom: false }).setView(coordinates, zoomLevel); L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { attribution: '© OpenStreetMap contributors' }).addTo(map); - L.marker(coordinates) - .addTo(map); + // Create a marker and bind popup with content, and open it by default + var marker = L.marker(coordinates).addTo(map).bindPopup(popupContent).openPopup(); }); \ No newline at end of file