[villaterras_map]
VillaTerras HTML Runtime Test
window.addEventListener("load", function () {
var statusBox = document.getElementById("vt-html-status");
function status(message) {
console.log(message);
statusBox.innerHTML += "
" + message;
}
status("WINDOW LOAD EVENT FIRED");
if (typeof L === "undefined") { status("FAIL: Leaflet did not load from CDN."); return; }
status("PASS: Leaflet CDN loaded.");
try {
var map = L.map("vt-html-map").setView([33.7455, -117.8677], 9);
status("PASS: Map object created.");
L.tileLayer( "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", { attribution: "© OpenStreetMap contributors", maxZoom: 19 } ).addTo(map);
status("PASS: Tile layer added.");
L.marker([33.7455, -117.8677]) .addTo(map) .bindPopup("VillaTerras Runtime Active") .openPopup();
status("PASS: Marker added.");
setTimeout(function () { map.invalidateSize(); status("PASS: invalidateSize completed."); }, 800);
} catch (error) {
status("FAIL: " + error.message);
}
});
