Mapa Lab: Difference between revisions

1,159 bytes added ,  Yesterday at 02:45
Line 214: Line 214:
// STEP 3 Bind the HTML content to the polygon
// STEP 3 Bind the HTML content to the polygon
bahayngmgatanchangcoPolygon.bindPopup(popupContent);
bahayngmgatanchangcoPolygon.bindPopup(popupContent);
// POLYGON TYPE
// STEP 1 Define Boundaries: Approximate boundaries of Barasoain Church
var ilogtampoyPolygon = L.polygon([
  [14.844024, 120.810870],
  [14.844004, 120.810990],
  [14.843850, 120.810987],
  [14.843861, 120.810882],
], {
  color: 'red',
  fillColor: '#f03',
  fillOpacity: 0.4
}).addTo(map);
// STEP 2 Define the popup content with an image
var popupContent = `
  <div style="text-align: center;">
    <b style="font-size: 14px;">Ilog Tampoy</b><br>
    <img src="https://wikimalolos.com/wikimalolos/index.php/File:IMG_20260519_075733_008_(1).jpg"
        alt="Ilog Tampoy"
        style="width: 200px; height: auto; margin-top: 8px; border-radius: 4px;">
    <p style="font-size: 11px; color: #555; margin-bottom: 8px;">"Sinaunang Daungan ng Komersyo sa Malolos" Burgos, Dueñas, Reyna</p>
   
    <a href="https://wikimalolos.com/wikimalolos/index.php/Ilog_Tampoy"
      target="_blank"
      style="color: #007bff; text-decoration: none; font-weight: bold; font-size: 12px;">
      Learn More at Wiki Malolos →
    </a>
  </div>
`;
// STEP 3 Bind the HTML content to the polygon
ilogtampoyPolygon.bindPopup(popupContent);