If you imagine tiles being stored in a file system similar to the image shown below https://i.sstatic.net/6NryK.png
You can take a quick look at this URL
Take a look at the code
var map = L.map('map').setView([0, 0], 2);
L.tileLayer('http://localhost/tiles/eso/0/0/0.png', {
minZoom: 1,
maxZoom: 6,
attribution: 'Testing',
tms: true
}).addTo(map);
Based on the code above, it appears that loading tile 0/0/0.png refers to one tile. So, my question is how will Leaflet load numerous tiles considering that this URL http://localhost/tiles/eso/0/0/0.png refers to just one tile.
Is the code above correct?
Can the code above load a bunch of tiles?
What does setView([0, 0], 2);
do? What do the values of 0, 0, and 2
represent? What is their significance?
Additionally, explain what the following code is attempting to convey
var map = L.map('map').setView([0, 0], 2);
L.tileLayer('eso/{z}/{x}/{y}.jpg', {
minZoom: 1,
maxZoom: 6,
attribution: 'ESO/INAF-VST/OmegaCAM',
tms: true
}).addTo(map);
In the code above, we do not specify any values for z, x, or y?
What approach should I take in real-life scenarios? Do I need to provide values or will Leaflet supply values for z, x, and y at runtime?
Please provide some guidance. Thank you.