Mapa Lab: Difference between revisions

1,417 bytes added ,  Yesterday at 02:43
No edit summary
Line 175: Line 175:
// STEP 3 Bind the HTML content to the polygon
// STEP 3 Bind the HTML content to the polygon
gusalingpampamahalaanngmalolosPolygon.bindPopup(popupContent);
gusalingpampamahalaanngmalolosPolygon.bindPopup(popupContent);
// POLYGON TYPE
// STEP 1 Define Boundaries: Approximate boundaries of Barasoain Church
var bahayngmgatanchangcoPolygon = L.polygon([
  [14.844311376004542, 120.81256831233246],
  [14.844335385977738, 120.81262031890348],
  [14.844149308615695, 120.81272355582806],
  [14.844086282376098, 120.81260091346655],
  [14.844228841701323, 120.81252018684881],
  [14.844267107609456, 120.8125915988568],
],
{
  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;">Bahay Ng Mga Tanchangco</b><br>
    <img src="https://streetviewpixels-pa.googleapis.com/v1/thumbnail?panoid=Orp4ld-T8LC0zLEimvPujQ&cb_client=search.gws-prod.gps&w=408&h=240&yaw=326.76797&pitch=0&thumbfov=100"
        alt="Bahay Ng Mga Tanchangco"
        style="width: 200px; height: auto; margin-top: 8px; border-radius: 4px;">
    <p style="font-size: 11px; color: #555; margin-bottom: 8px;">The "Aquino, Pormilos, Roxas"</p>
   
    <a href="https://wikimalolos.com/wikimalolos/index.php/Bahay_ng_mga_tanchangco"
      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
bahayngmgatanchangcoPolygon.bindPopup(popupContent);