Mapa Lab: Difference between revisions

1,739 bytes added ,  Tuesday at 02:34
Line 63: Line 63:




// POLYGON TYPE
// STEP 1 Define Boundaries: Approximate boundaries of Tahanan ni Dr. Luis Santos
var luissantosPolygon = L.polygon([
[14.841608829967972, 120.81088175637068],
[14.84161820909566, 120.8109041475335],
[14.841661497371982, 120.81088175637068],
[14.841677435302959, 120.81091210759453],
[14.841759254400522, 120.81087246022614],
[14.84180981248059, 120.81097170195507],
[14.841676287272104, 120.81104814490777],
[14.841684713622643, 120.81107094368312],
[14.841604339188663, 120.81111385902497],
[14.841544058342686, 120.81099785349065],
[14.841487666567808, 120.81102869889403],
[14.841446831136428, 120.81095762035908],
[14.841503871101938, 120.81092409274827],
[14.841523964722562, 120.81096164367239],
[14.841549891972234, 120.81094957373247],
[14.841535631985307, 120.8109254338527],
], {
  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;">Tahanan ni Dr. Luis Santos</b><br>
    <img src="https://wikimalolos.com/wikimalolos/images/7/71/Tahanan_ni_Dr._Luis_Santos.jpg"
        alt="Tahanan ni Dr. Luis Santos"
        style="width: 200px; height: auto; margin-top: 8px; border-radius: 4px;">
    <p style="font-size: 11px; color: #555; margin-bottom: 8px;">The "Cradle of Democracy in the East"</p>
   
    <a href="https://wikimalolos.com/wikimalolos/index.php/Tahanan_ni_Dr._Luis_Santos"
      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
luissantosPolygon.bindPopup(popupContent);




6

edits