After generating the OpenSeaMap tiles, I tried to add them as an overlay upon the openstreet basemap. The idea is after generating the OpenSeaMap tiles to serve them as "static" tiles to the client, from an image folder under /var/www/html from apache.
I copied the tiles/ folder under /var/www/html/map/ (in the same location with index.html) and added
in the section script of index.html the following:
var map = L.map('map');
map.setView([53.45 , 14.55],5);
var basemap = L.tileLayer('http://localhost/osm_tiles/{z}/{x}/{y}.png', {
maxZoom: 18
)}.addTo(map);
var sea = L.tileLayer('tiles/{z}/{x}/{y}.png', {
minZoom: 9,
maxZoom: 18
)}.addTo(map);
but I see in browser only the openstreetmap layer not the seamarks layer. But no error (pink page). I may also open openseamap tiles and view as pictures. Is something wrong with the file structure (see below)? What is wrong?
I also noticed that the x , y (coordinates) of the OpenSeaMap tiles are large numbers like this:
under 18/ (zoom)
I have 219132/ (x)
and then 120318.png
Instead the structure of osm tiles is a little bit different:
18/ (zoom)
under 18/ there exist 33/72/75/80/128.meta
Best Answer
If you use leaflet and you don't have an error, you can add a ControLayer on your map with the following lines :
You can with it check if the both TileLayer are ok.
Hope it will be usefull