<!-- Mapa interactivo con Leaflet para insertar en tu blog -->
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css" />
<div id="map" style="height: 400px; width: 100%; border: 1px solid #ccc; margin: 1em 0;"></div>
<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"></script>
<script>
var map = L.map('map').setView([40.4168, -3.7038], 13); // Madrid
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: '© <a href="https://www.openstreetmap.org/">OpenStreetMap</a>',
maxZoom: 18
}).addTo(map);
L.marker([40.4168, -3.7038]).addTo(map)
.bindPopup('¡Hola desde Madrid!')
.openPopup();
</script>
No hay comentarios:
Publicar un comentario