Casimiro Buendia: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
< | <!-- Map container --> | ||
<div id="map" style="height: 500px;"></div> | |||
<!-- Load Leaflet --> | |||
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css" /> | |||
<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"></script> | |||
<!-- Initialize the map --> | |||
<script> | |||
var map = L.map('map').setView([48.8584, 2.2945], 13); // Example: Eiffel Tower | |||
L.tileLayer('https://api.maptiler.com/maps/streets/{z}/{x}/{y}.png?key=Y2PXAZcKI4qY0zpEUqOi', { | |||
tileSize: 512, | |||
zoomOffset: -1, | |||
attribution: '© <a href="https://www.maptiler.com/copyright/">MapTiler</a> & <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>' | |||
}).addTo(map); | |||
// Optional marker | |||
L.marker([48.8584, 2.2945]).addTo(map) | |||
.bindPopup('Eiffel Tower') | |||
.openPopup(); | |||
</script> | |||
] | |||
</ |
Revision as of 00:31, 13 May 2025
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css" /> <script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"></script>
<script>
var map = L.map('map').setView([48.8584, 2.2945], 13); // Example: Eiffel Tower
L.tileLayer('https://api.maptiler.com/maps/streets/{z}/{x}/{y}.png?key=Y2PXAZcKI4qY0zpEUqOi', { tileSize: 512, zoomOffset: -1, attribution: '© <a href="https://www.maptiler.com/copyright/">MapTiler</a> & <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>' }).addTo(map);
// Optional marker L.marker([48.8584, 2.2945]).addTo(map) .bindPopup('Eiffel Tower') .openPopup();
</script>