Mapa Lab: Difference between revisions

1,229 bytes added ,  Yesterday at 02:46
Line 247: Line 247:


// STEP 3 Bind the HTML content to the polygon
// STEP 3 Bind the HTML content to the polygon
ilogtampoyPolygon.bindPopup(popupContent);
ilogtampoyPolygon.bindPopup(popupContent);]




// POLYGON TYPE
// STEP 1 Define Boundaries: Approximate boundaries of Barasoain Church
var comisariadeguerraPolygon = L.polygon([
  [14.843755802559375, 120.8102657682469],
  [14.843775729314983, 120.81043291345799],
  [14.84337406121672, 120.81054177852788],
  [14.843300656078007, 120.81037716842492],
], {
  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;">Comisaria De Guerra</b><br>
    <img src="https://wikimalolos.com/wikimalolos/index.php/File:Comisagiadeguerra.jpg"
        alt="Comisaria De Guerra"
        style="width: 200px; height: auto; margin-top: 8px; border-radius: 4px;">
    <p style="font-size: 11px; color: #555; margin-bottom: 8px;">The "Laureta Inocencio Mabingnay Maglalang"</p>
   
    <a href="https://wikimalolos.com/wikimalolos/index.php/Comisaria_De_Guerra"
      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
comisariadeguerraPolygon.bindPopup(popupContent);


//DO EDIT/COPY CODE BEYOND THIS
//DO EDIT/COPY CODE BEYOND THIS
5

edits