Mapa Lab: Difference between revisions

1,255 bytes added ,  Yesterday at 02:50
no edit summary
No edit summary
Line 354: Line 354:
// STEP 3 Bind the HTML content to the polygon
// STEP 3 Bind the HTML content to the polygon
tampoyPolygon.bindPopup(popupContent);
tampoyPolygon.bindPopup(popupContent);
// POLYGON TYPE
// STEP 1 Define Boundaries: Approximate boundaries of Gobierno Militar De La Plaza De Malolos
var gobiernomilitardelaplazademalolosPolygon = L.polygon([
  [14.84308, 120.81038],
  [14.84311, 120.81050],
  [14.84291, 120.81055],
  [14.84288, 120.81044],
], {
  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;">Gobierno Militar De La Plaza De Malolos</b><br>
    <img src="https://wikimalolos.com/wikimalolos/index.php/File:Gobiernomilitardelaplaza.jpg"
        alt="Gobierno Militar De La Plaza De Malolos"
        style="width: 200px; height: auto; margin-top: 8px; border-radius: 4px;">
    <p style="font-size: 11px; color: #555; margin-bottom: 8px;">Atencio, Bautista, Clavio, Mapa</p>
   
    <a href="https://wikimalolos.com/wikimalolos/index.php/Gobierno_Militar_de_la_Plaza"
      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
gobiernomilitardelaplazademalolosPolygon.bindPopup(popupContent);