Main Map: Difference between revisions
From The Lands Of Liberos Project
Content added Content deleted
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
<syntaxhighlight lang="javascript |
<syntaxhighlight lang="javascript"> |
||
var map = L.map('map', |
var map = L.map('map').setView([51.505, -0.09], 13); |
||
crs: L.CRS.Simple, // CRS.Simple, which represents a square grid: |
|||
L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', { |
|||
minZoom: -2, |
|||
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors' |
|||
maxZoom: 1 |
|||
⚫ | |||
}) |
|||
var bounds = [xy(0, 0), xy(1920, 1067)] |
|||
L.marker([51.5, -0.09]).addTo(map) |
|||
var image = L.imageOverlay('data/Front Page 150.png', bounds) |
|||
.bindPopup('A pretty CSS popup.<br> Easily customizable.') |
|||
⚫ | |||
.openPopup(); |
|||
</syntaxhighlight> |
</syntaxhighlight> |
Revision as of 18:59, 25 January 2024
var map = L.map('map').setView([51.505, -0.09], 13);
L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
}).addTo(map);
L.marker([51.5, -0.09]).addTo(map)
.bindPopup('A pretty CSS popup.<br> Easily customizable.')
.openPopup();